Page MenuHomePhabricator

Merge confirmed and unconfirmed tag arrays into a single array
Closed, ResolvedPublic

Description

Due to the previous paradigm of rejected tags, which has been removed, confirmed and unconfirmed tags are stored in separate arrays within SuggestionGroupWidget. Each time a tag is toggled, the entire group and all of its SuggestionWidgets are rerendered. This is unnecessary now and has the unfortunate side effect of disturbing focus within the widget group. We should refactor the code to store suggestions in a single array and toggle their state.

In addition to updating SuggestionWidgetGroup, we will need to update the code preceding the API call in ImageWithSuggestionsWidget.

Event Timeline

Change 543189 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/MachineVision@master] Refactor suggestions and suggestions group

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

Change 543189 merged by jenkins-bot:
[mediawiki/extensions/MachineVision@master] Refactor suggestions and suggestions group

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

Ramsey-WMF subscribed.

Tested on prod via keyboard tabbing/selection to toggle. Works as expected, no re-render for all tags.