Page MenuHomePhabricator

Refactor CaptionsPanel button state implementation
Closed, ResolvedPublic

Description

CaptionsPanel.js & DepictsPanel.js both update the submit button state (enabled/disabled) in response to changes, and what those changes are.
DepictsPanel does so by subscribing to the change event in DepictsWidget; CaptionsPanel has some calls in relevant places to a method that then compares the content (and the logic in there is in part a duplication of the code that actually submits)
It would be neat to bring CaptionsPanel & DepictsPanel more in line with one another, and reduce the duplication of code in CaptionsPanel (lest they get out of sync later on...)

More context: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/492976/5/resources/filepage/CaptionsPanel.js

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 6 2019, 3:20 PM
Ha78na claimed this task.Mar 6 2019, 10:17 PM
greg added a project: Multimedia.Mar 7 2019, 10:59 PM
Ramsey-WMF triaged this task as Low priority.Mar 8 2019, 2:10 AM
Ramsey-WMF moved this task from Untriaged to Triaged on the Multimedia board.
Ha78na moved this task from Triaged to Next up on the Multimedia board.

Change 496851 had a related patch set uploaded (by Ha78na; owner: Ha78na):
[mediawiki/extensions/WikibaseMediaInfo@master] Refactor CaptionsPanel publish button refresh implementation

https://gerrit.wikimedia.org/r/496851

Change 496851 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Refactor CaptionsPanel publish button refresh implementation

https://gerrit.wikimedia.org/r/496851

matthiasmullie closed this task as Resolved.Mar 20 2019, 4:00 PM

No new functionality to test, except that things still work - which they do!