Auto-selects labels created in dropdown
What does this MR do and why?
Automatically selects labels created through the dropdown using "Create new label" and clears the search to return to a selection state. Previously, label was created but not selected. Selection is not saved until dropdown is closed (no change in behavior).
This completes the flow started in Pre-fill create label form (!116590 - merged)
What does this MR not do and why?
- This does not attempt to change the behavior when using the non-sidebar component, such as on the New Issue form or MR form.
- This is a different component built in HAML
Screenshots or screen recordings
Original (pre-!116590) | Before | After |
---|---|---|
Closes https://gitlab.com/gitlab-org/gitlab/-/issues/338124
How to set up and validate locally
- Open an issue or MR
- Open the label selector ("Edit")
- Enter a search term that doesn't match an existing label
- Click "Create project label", optionally edit the label
- Click "Create"
- Confirm the label you created is selected (you may need to search if you have many labels)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nick Leonard