Skip to content

Pre-fill create label form

Nick Leonard requested to merge nl-autofill-label-create into master

What does this MR do and why?

Automatically fills the create label form from the sidebar with any entered search and the default color picker color. This allows labels to be created in 2 actions (create label -> create) instead of 4.

This assumes the user did not find a label they were searching for, and wants to create that label, however as the form is still presented the user can still change the label name.

What does this MR not do?

  • 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
  • This does not automatically select the newly created label, which will be the last step to resolve https://gitlab.com/gitlab-org/gitlab/-/issues/338124

Related #338124

Screenshots or screen recordings

Before After
labels_old labels_new

How to set up and validate locally

  1. Open any Issue or MR
  2. Open the Labels dropdown
  3. Enter a keyword for the label that doesn't match an existing label
  4. Click "Create project label"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nick Leonard

Merge request reports

Loading