Page MenuHomePhabricator

Default View: Use CdxSelect or CdxCombobox when selecting an item of an enum type
Closed, ResolvedPublic

Description

Description

When creating an instance of Integer:

The user has to fill out "sign", which is an enumeration.

This falls back into ZReference component, which uses CdxLookup set to a restricted type.
When the user knows what they're searching for, what term to use and there are labels in their language, they can easily type and select "positive" or "negative".
But if they don't have this knowledge, the selector will not display the available options, which will be a problem.

We should use a different component when selecting enums. Possibilities are:

  • CdxSelect; works best when we have around 5 or 6 options
  • CdxCombobox; might work best when a predefined list is longish. it gives people the ability of both typing/searching or opening the menu to click to select something from the defined list.

Also:

  • Contemplate the possibility of using both, depending on the number of available options
  • If we use CdxSelect, use visibleItemLimit property of the menuConfig to display a scrollable menu

Desired behavior/Acceptance criteria

  • Users can see available options to choose from when selecting an item of an Enum type

Completion checklist

Event Timeline

Maybe just use CdxSelect for now with visibleItemLimit set to 7? That's roughly the UX pattern we use elsewhere at Wikimedia.

Change #1040214 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] [WIP] Use CdxSelect or CdxCombobox when selecting enum values

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

Change #1040214 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Use CdxSelect when selecting enum values

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