Skip to content

feat(GlLabel): Add ability to disable close button

Coung Ngo requested to merge cngo-add-ability-to-disable-label-close-button into master

What does this MR do?

This MR adds the ability to make the GlLabel x button disabled.

This is for the use case identified in gitlab!42703 (merged) where we want to temporarily disable the x button while a label is being removed so that only one label can be removed at one time.

When the x button is disabled:

  • The x colour opacity is reduced to indicate the x is disabled
  • The button does not change colour on mouse hover
  • The button is not tab-accessible

Screenshot

Normal xs on the left; disabled xs on the right.

Screenshot_2020-10-02_at_12.51.14_pm

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.

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
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Coung Ngo

Merge request reports

Loading