Dropdown > Reconsider component naming
Purpose
Discuss renaming the current listbox component while simplifying the dropdown variants.
In !2832 (merged) the dropdown component naming was discussed, specifically in regards to the listbox. A listbox
itself can be part of a disclosure or a combobox
, but at the moment we're identifying it as its own component that includes the trigger button to reveal it.
It's possible we could reduce the number of documented dropdown variants by treating the listbox as a base component used in composite components.
For example:
-
Disclosure widget:
- Button that opens panel of links or a mix of links and actions (buttons).
- Button that opens a
listbox
containing options (role="option"
).
-
Combobox:
- Text input that opens a
listbox
containing options (role="option"
).
- Text input that opens a
-
Menu:
- Button that opens a panel of JavaScript app-like actions.
Comments from the original MR
This definition makes me wonder whether
GlListbox
is correctly named, since it implements the button and listbox … Maybe whether or not this matters depends on whether we'd ever want to implement a "bare" listbox that's always visible and not just in a popup.
We could name it
GlCollapsibleListbox
as it is named in the specs example.