Replace sidebar display options with Compact and Full

What does this MR do and why?

The sidebar now has two layout options instead of three. This is behind the hide_unpinned_sidebar_items feature flag.

Before, users chose between Flat, Organized, and Everything. That asked them to pick a layout before they had enough pins for the choice to matter.

Option What it shows
Compact (default) Pinned items only. A category with 3 or more pins is grouped automatically. Pins from smaller categories stay in a flat list above the groups, in the order the user pinned them.
Full Same as the old "Everything": a flat list of pins, then all categories.
  • Full keeps the stored value all_categories, so users who picked "Everything" land in Full.
  • The retired values pinned_only and grouped_pins fall back to Compact.
  • The tracking event now reports compact or all_categories as the selected option.

Known limitation (not new): if you open a pinned page through a regular link and its group is collapsed, nothing in the sidebar marks it as the current page. The old Organized option had the same problem. We'll handle it in a follow-up.

References

Screenshots or screen recordings

How to set up and validate locally

  1. Enable the feature flag in the Rails console: Feature.enable(:hide_unpinned_sidebar_items)
  2. Go to any project. Open the Customize sidebar menu (the ... button next to the project name) and check that it has two options: Compact and Full.
  3. In Compact, pin 2 items from one category (for example Code). They show in the flat pinned list.
  4. Pin a third item from the same category. All 3 move into a Code group below the flat list.
  5. Unpin one of them. The remaining 2 go back to the flat list.
  6. Switch to Full. All pins show in one flat list, followed by all categories.
  7. Collapse the sidebar to icons only. In Compact, a divider separates the flat pins from the grouped ones.

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