Archived labels: Make sure navigation is always visible
-
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?
Previously, when all labels were archived (i.e. there are no active labels), the navigation bar was missing. This meant that you could no longer unarchive labels, since they were not accessible. You had to create a new label, navigate to the archived tab and unarchive the label.
This MR makes sure the navigation bar is always visible, even when all labels are archived.
All of this is still behind the feature flag :labels_archive.
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable feature flag with
rails c:
Feature.enable(:labels_archive)
- Create a new group with an empty project.
- Create a label and archive this label by editing the details.
- Without this MR, you won't be able to unarchive this label, as the navigation is missing and the filter is set to
archived: falseby default. With this MR applied, you can navigate to the archived tab and unarchive the label.
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 #4233
Edited by Nicholas Wittstruck

