feat(GlFormCombobox): Add GlCombobox component
What does this MR do?
This MR backports the GlFormCombobox
component created originally in gitlab!29124 (merged). That MR includes screenshots of the functionality.
It behaves as follows:
- Typing matches tokens; dropdown disappears when there is no match
- Up and down arrows navigate the dropdown
- Enter selects keyboard-highlighted item; clicking overrides this
- Esc closes dropdown when it is open, clears field when it is not
- Browser/native dropdown hidden when ours is open, shows when it is not
- Tab selects current entered text and moves to next field
This behavior based on w3c pattern and this accessible combobox example
Shouldn't This Share Logic with the Token Selector?
Because the Combobox
and TokenSelector
were written in parallel unknowingly, they take slightly different approaches. It would be possible to reconcile the architecture, but I don't think it is worth the effort at this point. I am open to opening another issue about it though, if we think it necessary.
Does this MR meet the acceptance criteria?
Conformity
This addresses #716 (closed)
Edited by Sarah Groff Hennigh-Palermo