Add variants & single select support in labels dropdown
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 likeCreate label
andManage labels
).- Here, dropdown is not visible by default but instead there's an
Edit
link which reveals dropdown button and contents.
- Here, dropdown is not visible by default but instead there's an
-
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 🤖