Page MenuHomePhabricator

HelpPanel: NamespacesControl component creates a chip when user clicks outside of input
Open, In Progress, LowPublic3 Estimated Story Points

Description

Background
This bug is similar to the bug fixed in T398428.

If a user is typing in one of the inputs created by NamespacesControl, such as "Namespaces with the help panel disabled in both reading and editing mode," and then clicks outside of the dropdown menu, their typed input automatically converts into a chip. Ideally, typed input only becomes a chip after the user selects an item from the dropdown menu. In this scenario, the typed input should remain input. Additionally, after users select an item from the dropdown menu, the input should clear.

Users should only be able to select name spaces from the dropdown menu. Users should not be able to enter custom input.

Lastly, this task requires adding MultiselectLookup to the NamespacesControl.

Acceptance Criteria

  • Replace CdxChipInput and CdxMenu with MultiselectLookup.
  • Ensure input clears after a user selects an item from the dropdown menu.
  • Ensure users can select menu items from the dropdown menu.
  • Ensure that if a user enters input which is already a chip, they can deselect that item from the dropdown menu.
  • If a user clicks outside of the dropdown after typing input, the typed input should remain input.

Antigoals
This task does not require highlighting the search query in menu items.

Event Timeline

EMcFarland-WMF changed the task status from Open to In Progress.Thu, Jan 22, 5:16 PM
EMcFarland-WMF triaged this task as Low priority.

I wanted to clarify a change to the task. Previously, the task incorrectly said that users should be able to enter custom input. After testing on test.wikipedia.org, I realized that is not desired behavior. The task has since been updated.

KStoller-WMF set the point value for this task to 3.Tue, Jan 27, 6:00 PM

Change #1233740 had a related patch set uploaded (by EMcFarland; author: EMcFarland):

[mediawiki/extensions/CommunityConfiguration@master] NamespacesControl: Component no longer allows user to enter custom input.

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

Change #1233740 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] NamespacesControl: Component no longer allows user to enter custom input.

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

Hi @Etonkovidova, I wanted to flag some unusual behavior related to this task. Today while I was pairing with Martin and working on my local master branch, which included this change, I saw an error when attempting to delete a namespace from Namespaces Control. The error message was "NULL value found, but an integer is required." I wasn't able to consistently reproduce the bug, and it may have been causing by forgetting to hard refresh after updating master. That being said, I wanted to highlight this scenario as one to test especially carefully during QA.

Thank you!