Archive labels: Allow toggle attribute via dropdown in list view
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This MR allows toggling the labels archived status right from the dropdown menu in the label lists. Previously, you had to edit
each label and tick the checkbox.
It will:
- Update the label counter for
prioritized
,other
andarchived
labels. - Show the empty state for
prioritized
labels - Will not show the empty state for
other
labels, since this is currently the same behaviour when prioritizing a label.
References
Screenshots or screen recordings
How to set up and validate locally
- Enable feature flag with
rails c
:
Feature.enable(:labels_archive)
- You can now archive
group
andproject
labels right from the three-dot-dropdown in the index view. - When archiving the last prioritized label, the empty state should be shown
- Archiving a label should move it from the
Active
tab to theArchived
tab. - After unarchiving a label from the
Archived
tab, it should now show up in theActive
tab.
MR acceptance checklist
checklist
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Related to #554227
Edited by Nicholas Wittstruck