Skip to content

Add variants & single select support in labels dropdown

Kushal Pandya requested to merge kp-add-variant-support-vue-labels-dropdown into master

What does this MR do?

This MR is a follow-up on !24576 (merged) and it adds support for variant prop for the dropdown where one can use labels dropdown in 2 possible modes;

  • sidebar: This is default UI as appearing on Issuable sidebars (with header-bar and actions like Create label and Manage labels).
    • Here, dropdown is not visible by default but instead there's an Edit link which reveals dropdown button and contents.
  • standalone: This is a simple labels dropdown with just the searchbar and labels list.
    • Here, dropdown button is visible by default (and shows selected labels) and clicking this button reveals the droopdown contents.

Additionally, this MR also adds support for allowMultiselect prop which can be set to false to prevent multiple labels selection.

Screenshots

sidebar variant standalone variant
Screen_Recording_2020-05-04_at_2.05.19_PM Screen_Recording_2020-05-04_at_2.08.31_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports