Project Topics - Migrate selector to GlCollapsibleListbox
Background
This feature request came from an active bug with the Project Topic selector found here: #386864 (closed)
Relevant thread (internal only): #386864 (comment 1814603014)
Currently, when selecting project topics there are issues when topics share similar names and accessing the new topic button is un-reachable
This is largely in part due to an older pattern using the GlTokenSelector component and the way it expects to handle new items.
After some discussion we determined that rather than attempting to enhance this older component it makes more sense to migrate to a component that aligns more with other areas of GitLab like the selectors found in the right hand rail of this issue. That component being GlCollapsibleListbox.
This would allow for a more familiar UX pattern and much more flexibility in how we would like it to behave. As well as closing out #386864 (closed)
Proposal
Migrate Project Topic selector from GlTokenSelector
=> GlCollapsibleListbox
Screenshots of potential experience
Searching Topic | Creating Topic |
---|---|
Implementation plan
- Migrate
GlTokenSelector
=>GlCollapsibleListbox
intopics_token_selector.vue
- Add a
<footer>
slot with a button that saysCreate project topic
- Add
@click
event to button that hides the collapsable dropdown and shows an<input>
field with actions to create a project label - In the event handler for adding/creating tokens in
topics/index.js
add logic to not add duplicates to the list and simply ignore them. This could be done with aSet