Move Admin and Organization admin settings to the sidebar disclosure
What does this MR do and why?
Behind the hide_unpinned_sidebar_items feature flag, group and project settings already open from the sidebar's settings disclosure in the footer. This MR does the same for the Admin area so the layout matches across panels.
The Admin area has no pins, so it keeps all of its categories in the sidebar. Only its Settings section moves to the footer disclosure, where it renders as Admin settings next to Help.
The same change for the Organization admin area (!265261 (merged)) has been merged into this branch, so this MR covers both panels: Admin settings and Organization settings. The regular Organization sidebar (organization panel) is deliberately unchanged — it is excluded from PANELS_WITH_HIDEABLE_UNPINNED_ITEMS and not in the panel map, so it keeps its in-place settings section.
How it works
On master, settingsAsDisclosure only applies to panels in PANELS_WITH_HIDEABLE_UNPINNED_ITEMS (group and project), and it matches on the settings_menu item ID. The Admin area qualifies on neither count: it is not a pinnable panel, and its menu ID is admin_settings_menu.
This MR adds a panel-type → settings-menu-id map in super_sidebar/constants.js, so a mapped panel checks the flag directly and matches its own menu ID:
settingsAsDisclosure(navItem) {
const adminSettingsId = ADMIN_PANEL_SETTINGS_MENU_ITEM_IDS[this.panelType];
if (adminSettingsId) {
return this.glFeatures.hideUnpinnedSidebarItems && navItem.id === adminSettingsId;
}
return !this.showUnpinnedItems && this.isSettingsSection(navItem);
}The Admin settings and Organization settings labels are defined in this MR, as disclosure_title overrides on the two admin settings menus, together with their .pot strings. They were originally written in !270748 (merged) alongside the disclosure_title mechanism, but were deferred out of it so each label ships with the change that makes it reachable. The mechanism itself — Sidebars::Menu#disclosure_title and the serialized field — comes from the target branch.
Unmapped panels keep the existing behaviour, so group, project and the flag-off sidebar are unchanged.
Stack (2 of 3): footer placement (!270747) → this MR → user settings (!265262). Each MR targets the branch below it.
Organization admin (!265261 (merged)) has been merged into this branch and disclosure labels (!270748 (merged)) into the target, so neither needs separate review.
References
- Targets: !270747
- Merged in: !265261 (merged)
- Rollout issue: #604888
- Related: #621643
Screenshots or screen recordings
Admin area
| Before | After |
|---|---|
![]() |
![]() |
Organization admin (from !265261 (merged), merged in)
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
-
Enable the feature flag in the Rails console:
Feature.enable(:hide_unpinned_sidebar_items) -
As an administrator, visit
/admin. -
Confirm an Admin settings button appears in the sidebar footer above Help, and the other Admin categories stay in the sidebar.
-
Open it and confirm it lists the Admin settings pages.
-
Visit an Admin settings page, for example
/admin/application_settings/general. Confirm the button shows as selected. -
Collapse the sidebar to icon-only and confirm it becomes a gear with an Admin settings tooltip.
-
Visit a project and a group, and confirm their disclosures are unchanged (Project settings / Group settings).
Organization admin (merged in from !265261 (merged)), with Feature.enable(:org_stage_la_100) also set:
- Visit
/o/<organization>/admin(for example/o/tanuki-inc/admin). - Confirm an Organization settings button appears in the sidebar footer above Help, and Overview stays in the sidebar.
- Visit the regular organization pages (for example
/o/<organization>/groups_and_projects) and confirm they still show an in-place Settings section and no footer disclosure. - Disable the flag and confirm both admin areas show their in-place Settings section again.
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.



