Page MenuHomePhabricator

Lookup, Select, Combobox: Set sensible defaults for number of Items to show before scrolling
Open, In Progress, MediumPublic3 Estimated Story Points

Description

In T306932, we add an optional prop to limit the number of items being shown by the Menu component before it starts to scroll. By default, the Menu shows all items, and that is probably fine for an internal component.

But as a user of the public Codex components, I would appreciate if they had sensible defaults set.

For comparison:

  • Wikit Lookups show 6 items by default
  • CodexTypeaheadSearch currently shows 10 Items (+ an interactive footer)
  • Vuetify has a different approach and allows setting a max-height with :menu-props="{ maxHeight: '400' }"
  • (not sure what other reference we use)

Acceptance Criteria:

  • Design: decide what the default number of items to show should be for Lookup, Select, Combobox, or if they should continue to show all options (Specs)
  • Implement the decision if it deviates from the current behavior

Event Timeline

I think we should apply an initial limit of 6 options to Lookup, Select and Combobox. (And of course maintain the 10 limit default applied to TypeaheadSearch).
I have a slight concern regarding the perception of the scroll: displaying only 6 options might not contribute to make apparent to users that they're actually in front of a longer, scrollable list (e.g. specifically in Chrome and Safari, where the scroll is not made apparent before it's attempted). Still, I think this is a reasonable limit to adopt in all cases as a start.

AnneT triaged this task as High priority.Sep 19 2022, 3:47 PM
AnneT subscribed.

Michael and Noa are working on this as part of the configurable scroll work

ldelench_wmf changed the task status from Open to In Progress.Sep 19 2022, 7:44 PM

Change 833329 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[design/codex@main] Lookup: Limit default number of visible menu items to 6

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

Change 834504 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[design/codex@main] Combobox: Limit default number of visible menu items to 6

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

Change 834514 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[design/codex@main] Select: Limit default number of visible menu items to 6

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

I've left these patches as WIP for now as discussions are still ongoing regarding whether they are at all needed.

Change 833329 abandoned by Noa wmde:

[design/codex@main] Lookup: Limit default number of visible menu items to 6

Reason:

This is still under discussions as a potentially breaking change

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

ldelench_wmf set the point value for this task to 3.Oct 24 2022, 3:35 PM
ldelench_wmf lowered the priority of this task from High to Medium.Oct 24 2022, 4:26 PM

Change 834504 abandoned by Noa wmde:

[design/codex@main] Combobox: Limit default number of visible menu items to 6

Reason:

Abandoning per DST decision

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

Change 834514 abandoned by Noa wmde:

[design/codex@main] Select: Limit default number of visible menu items to 6

Reason:

Abandoning per DST decision

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