Remove label close button when lock on merge
What does this MR do and why?
When the :enforce_locked_labels_on_merge
feature flag is turned on for a group/project, then when we show a label that is locked (remember only for merged MRs), then do not show the close button (x)
on the label. This gives an initial visual indication that the label can not be removed.
Another iteration could show an actual lock icon instead.
Screenshots or screen recordings
Note that the two locked labels, workflow::production
and Jetta
are locked, and do not show the close button in the second image
Before | After |
---|---|
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:enforce_locked_labels_on_merge)
- Enable the feature flag:
Feature.enable(:visible_label_selection_on_metadata)
. This is for labels to appear when you edit an MR. - Visit a group or project label list and create two or three labels, such as
workflow::ready
,workflow::dev
, andworkflow::production
. - Edit each label and click the checkbox to lock it.
- Choose a merged MR, and add one of the locked labels and a regular label. The close button should not be visible for the locked label.
- Edit the merged MR, under the labels section you should see the label without the close button.
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.
Related to #408676
Edited by Brett Walker