Fix pinned items empty state under hide_unpinned_sidebar_items

What does this MR do and why?

When the hide_unpinned_sidebar_items feature flag is enabled and the user has no pinned items, the pinned section becomes the entire navigation. In that state the empty hint ("Your pinned items appear here.") still rendered and, critically, did not hide when the sidebar collapsed to icons only, so the text broke the collapsed layout. This only affected the flag-on path; with the flag off the pinned section behaved correctly.

This MR:

  • Reworks the empty state so the reworded hint and the "More features" trigger are grouped inside a single dashed-border box, making the empty state read as intentional rather than broken.
  • Suppresses the empty hint when the sidebar is collapsed to icons only, fixing the layout issue.
  • Rewords the copy to the more actionable "Pin frequently used features for quick access."
  • Keeps the flag-off pinned section's original inline hint unchanged.

The change is scoped to the hide_unpinned_sidebar_items feature flag, which is default_enabled: false, so no changelog entry is required.

References

Screenshots or screen recordings

:hide_unpinned_sidebar_items ON

Before After
CleanShot_2026-08-24_at_13.47.41 CleanShot_2026-08-24_at_14.18.36
CleanShot_2026-08-24_at_13.47.48 CleanShot 2026-08-24 at 14.18.25.png

:hide_unpinned_sidebar_items OFF

Before After

CleanShot 2026-08-24 at 13.48.10.png

CleanShot 2026-08-24 at 14.18.49.png

CleanShot 2026-08-24 at 13.48.03.png

CleanShot 2026-08-24 at 14.18.56.png

How to set up and validate locally

  1. In the Rails console, enable the feature flag:

    Feature.enable(:hide_unpinned_sidebar_items)
  2. Visit a project or group where you have no pinned sidebar items (or remove all pins).

  3. Confirm the empty state shows the reworded hint and the "More features" trigger grouped together inside a dashed-border box.

  4. Collapse the sidebar to icons only and confirm the hint no longer renders and the layout is intact.

  5. Disable the flag and confirm the standard pinned section (with the "Pinned" header and inline hint) is unchanged.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Austin Regnery

Merge request reports

Loading
Loading