Uncheck "all" in namespace selection if a user manually removes one of the namespaces from the list
Closed, ResolvedPublic2 Story Points

Description

Currently the "all" checkbox stays selected if a user manually removes a namespace from the list but it should be unchecked automatically in this case.

AC:

  • When namespace is removed, checkbox is unchecked
  • When namespace is re-added, checkbox is checked
  • Last Namespace (Article or File, depending on rest of the search) is not removable.
Restricted Application added a project: TCB-Team. · View Herald TranscriptJul 4 2017, 2:57 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
gabriel-wmde claimed this task.

Change 364201 had a related patch set uploaded (by Gabriel Birke; owner: Gabriel Birke):
[mediawiki/extensions/AdvancedSearch@master] Make presets react to namespace selection

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

gabriel-wmde moved this task from Done to Deploy on the WMDE-Fundraising-Funban-1 board.

Move back on todo column, as the demo did not work - need to investigate.

@gabriel-wmde maybe the demo did not work, because it was not merged yet? :->

Change 364201 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Make presets react to namespace selection

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

gabriel-wmde updated the task description. (Show Details)Jul 19 2017, 1:33 PM
gabriel-wmde set the point value for this task to 2.
Pablo-WMDE claimed this task.

Change 367675 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/AdvancedSearch@master] NamespaceFilters: Prevent removal of only NS

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

Change 367675 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] NamespaceFilters: Prevent removal of only NS

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

Change 367908 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/AdvancedSearch@master] NamespacePresets: Fix all-namespace-detection

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

Pablo-WMDE added a comment.EditedJul 26 2017, 4:13 PM

The two perceived bugs that are addressed by this ticket (X-removal of the last tag, all not selected when tag order off) are fixed.
There is, however, a second way to remove tags - using backspace.
This yields two new problems:

  • the last tag is removable via backspace. We currently use the disabled flag of OO.ui.MenuSelectWidget which is documented as "When a widget is disabled, it cannot be used and its appearance is updated to reflect this state." and does indeed prevent the removal of the element via mouse. Based on the documentation it is however not clear if it really should (in which case we found a bug in OOUI) or should not (in which case we have to find a work-around) entail removal-prevention @gabriel-wmde What do you think about this?
  • when removing tags via backspace, not their label (e.g. "Article") is shown (and reduced to "Articl", "Artic", ... as expected), but their id (data attribute) is shown instead. -> T171830

Updated NamespacePresets proposal.
Researching Namespace names as values & labels

Pablo-WMDE added a comment.EditedJul 27 2017, 8:20 AM

When using autosuggest, typing e.g. "Proj", using keyboard arrows to select the "Project", and hitting enter, the "Proj" string remains as text next to the newly added "Project" tag.
Against our hopes, switching tag data from namespace id (as it currently is implemented) to name does not solve this unintuitive behaviour. -> T171828

Change 367908 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] NamespacePresets: Fix namespace preset detection

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

Deployed to test wiki.

gabriel-wmde closed this task as Resolved.Aug 2 2017, 12:00 PM