Page MenuHomePhabricator

MultiselectLookup: Resolve open questions and take out of WIP
Closed, ResolvedPublic5 Estimated Story Points

Description

Once the Vue version has been added, reviewed by design, and finalized, and the guidelines have been added, the component can be taken out of WIP and published as part of the next Codex release.

Open issues

  • Finalize the name of the component. (patch)
    • Discuss with users and make a decision. It's MultiselectLookup!
  • Finalize open/close behavior of the menu: (patch)
    • When the user selects an item, the input clears - should it? Yes, always.
    • When the user selects an item, should the menu remain open or close? Should this be configurable? Always close the menu. We can make this configurable in the future if needed.
      • On one hand, if the menu remains open, it's weird that there are menu items that don't correspond to the input (since the input has been cleared)
      • On the other hand, if you close the menu and the user wanted to select another item from it, they have to re-type the search term. Is this the most common behavior? Or is it more common to select one item per search term? Does this depend on the feature?
  • Structure of the demo page (patch)
    • Should this match the Lookup page? If so, one should be changed? Yes, and Lookup should be simplified/reorganized
  • When there are enough chips to make the input span more than 1 line, the menu does not move to the bottom of the reference element and overlaps it (patch)
  • When you click a chip, its value becomes the input value. This is okay if the chip only has a value, but if it has a label and a value (e.g. label: "carrot", value: "Q81"), you want the label to become the input value so you can search for the human-readable label instead of the unique ID. (patch)
  • Chip editing race condition (patch)
    • When you select an item, then click the chip so its label goes into the input, you should be able to easily and clearly undo this action (i.e. reselect the item) via keyboard navigation. For example, in this demo, if you search for and select "carrot", then click the chip, the menu shows the "carrot" item as highlighted but you can't hit enter to select it. This is confusing, and the items should potentially not be highlighted at all since there might be multiple items matching that label.
  • Pending animation doesn't apply to the input element (patch)
    • When you search for something in the demo that fetches Wikidata items, the pending animation is applied to the element outside the <input> but not within it

Acceptance criteria

  • All open issues have been resolved
  • The component has passed a final design review
  • Update the Figma library to include the new component
  • The component is moved out of WIP by exporting the component in lib.ts instead of components-wip/index.ts. (patch)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
CCiufo-WMF raised the priority of this task from Medium to High.Sep 27 2024, 2:57 PM
CCiufo-WMF renamed this task from LookupMultiselect: Take out of WIP to LookupMultiselect: Resolve open questions and take out of WIP.Sep 30 2024, 5:54 PM
CCiufo-WMF set the point value for this task to 5.
AnneT changed the task status from Open to In Progress.Sep 30 2024, 7:11 PM
AnneT claimed this task.

Change #1076845 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] LookupMultiselect, ChipInput: Improve floating menu UX

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

Change #1077411 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] [WIP] LookupMultiselect: offer options for menu UX

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

Change #1077463 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] LookupMultiselect: Clear the input on selection

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

Change #1077411 abandoned by Anne Tomasevich:

[design/codex@main] [WIP] LookupMultiselect: offer options for menu UX

Reason:

no longer needed

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

Change #1077464 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] ChipInput: On chip click, show chip label or value

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

Change #1076845 merged by jenkins-bot:

[design/codex@main] LookupMultiselect, ChipInput: Improve floating menu UX

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

Change #1077463 merged by jenkins-bot:

[design/codex@main] LookupMultiselect: Clear the input on selection

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

Change #1077798 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] Lookup, LookupMultiselect: Refactor demo pages

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

Change #1077464 merged by jenkins-bot:

[design/codex@main] ChipInput: On chip click, show chip label or value

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

bmartinezcalvo renamed this task from LookupMultiselect: Resolve open questions and take out of WIP to MultiselectLookup: Resolve open questions and take out of WIP.Oct 7 2024, 2:04 PM

Change #1078425 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] MultiselectLookup: Rename component

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

Change #1078470 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] MultiselectLookup: Handle race condition when editing chip

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

Change #1078472 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] ChipInput: Make input background transparent

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

Change #1077798 merged by jenkins-bot:

[design/codex@main] Lookup, LookupMultiselect: Refactor demo pages

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

Change #1078425 merged by jenkins-bot:

[design/codex@main] MultiselectLookup: Rename component

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

Change #1078472 merged by jenkins-bot:

[design/codex@main] ChipInput: Make input background transparent

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

Change #1078470 merged by jenkins-bot:

[design/codex@main] MultiselectLookup: Handle race condition when editing chip

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

This is looking really good at https://doc.wikimedia.org/codex/main/components/demos/multiselect-lookup.html. I especially like the choice of using namespace lookup to demo the behavior within a Field.

@AnneT this look great. Just a couple of improvements. Since this works as a Lookup, I would make this MultiselectLookup demos as similar as possible to Lookup.

  1. Let's update the Form field demo to include a warning and error messages when the entry in invalid as we are doing in T362650: Lookup: address usability issues.
  2. Let's use the same demos names in both MultiselectLookup and Lookup pages (I prefer using the shorter titles used in the Multiselect Lookup page).
  1. Let's update the Form field demo to include a warning and error messages when the entry in invalid as we are doing in T362650: Lookup: address usability issues.

Done, patch here!

  1. Let's use the same demos names in both MultiselectLookup and Lookup pages (I prefer using the shorter titles used in the Multiselect Lookup page).

Done on the main branch!

Change #1078998 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] MultiselectLookup: Export component for use

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

Change #1078998 merged by jenkins-bot:

[design/codex@main] MultiselectLookup: Export component for use

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

Change #1080747 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/core@master] Update Codex from v1.13.1 to v1.14.0

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

Change #1080747 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.13.1 to v1.14.0

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