Foundations for Super Sidebar categories
What does this MR do and why?
Foundations for Super Sidebar categories
This is a new approach to Super Sidebar categories, while maintaining the old menu data as the single-source of truth for menu items.
The idea behind this approach is simple:
- Each menu item has a defined
super_sidebar_parent. This will be the Menu the item is part of in the Super Sidebar - There is an optional
super_sidebar_beforefield, if one needs to influence the order of the items. - The actual Panel for the Super Sidebar extends the existing Panel and mutates the internal "menu state". This transformation is done with a concern, in order to make this concept reusable for e.g. Groups.
In order to prove this concept, the existing Project menus for Issues, Project Information and Wiki have been merged into the new plan menu. All other menus have been copied untouched. The Develop and Operations Menu Grouping can happen in a separate iteration, so that we can keep the changes of this MR smaller.
Super Sidebar: Add uncategorized and removals
While we work on the conversions from old sidebar to Super Sidebar, it is helpful to support both Uncategorized Menu Items and removals.
If we just drop all Menu Items which have no Super Sidebar defined, we might miss to categorize items. Furthermore it enables us to move certain items to a temporary category, while we work on categorizing everything.
The explicit removal with the help of ::Sidebars::NilMenuItem is
needed, because some menu entries are duplicated (e.g. Issues List
appears twice).
Project Super Sidebar: Add static section
This adds a static section to the Project Super Sidebar, containing Issues, Merge Requests and a link to the Project overview.
Screenshots or screen recordings
In the screenshot above we can see:
- (Orange arrows) that the menu items of "Project information" and "Issues" have been combined into Plan. The top-level "Wiki" entry also appears inside the Plan section.
- (Blue box) The "Issues" and "Merge requests" top-level items have been moved to the top section (also called Static Menu), above the Plan menu. Another entry "Project overview" has been added in the same section.
- (Blue arrow) The current implementation also moves "Snippets" to "Uncategorized". This is just temporary and shouyld be fixed once the "Develop" Menu is implemented.
The other sidebars (e.g. Group & Your work) are left untouched from those changes.
How to set up and validate locally
- Enable the
super_sidebar_navand recommended:your_work_sidebarfeature flags. - Log into the GDK and enable the New Navigation for the current user via the Profile Menu
- Go to any project
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
