Archived labels: Make sure navigation is always visible

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.

🛠️ with ❤️ at Siemens

References

Screenshots or screen recordings

Before After
before after

How to set up and validate locally

  1. Enable feature flag with rails c:
 Feature.enable(:labels_archive)
  1. Create a new group with an empty project.
  2. Create a label and archive this label by editing the details.
  3. Without this MR, you won't be able to unarchive this label, as the navigation is missing and the filter is set to archived: false by default. With this MR applied, you can navigate to the archived tab and unarchive the label.

MR acceptance checklist

checklist

Related to #4233

Edited by Nicholas Wittstruck

Merge request reports

Loading