Loading
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_onlyandgrouped_pinsfall back to Compact. - The tracking event now reports
compactorall_categoriesas 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
- Feature issue: #601398 (closed)
- Feature flag rollout: #604888
- MR that added the tracking event: !253007 (merged)
Screenshots or screen recordings
How to set up and validate locally
- Enable the feature flag in the Rails console:
Feature.enable(:hide_unpinned_sidebar_items) - 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. - In Compact, pin 2 items from one category (for example Code). They show in the flat pinned list.
- Pin a third item from the same category. All 3 move into a Code group below the flat list.
- Unpin one of them. The remaining 2 go back to the flat list.
- Switch to Full. All pins show in one flat list, followed by all categories.
- 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