Ensure item_id of navigation menu_items is unique within each different panel
What does this MR do and why?
Add specs which check for unique menu item item_id
We need a unique item_id
for each menu item for three purposes:
- QA Specs. Clicking menu items by their item id might be helpful
- Pinning items feature. Pinning menu items inside Groups / Project menus uses the item_id to save which items a user has pinned
- Telemetry. We measure clicks in the navigation and if two menu items share the same ID, we cannot differentiate it in our telemetry data
Unique ids for merge request menu items
The following used to have :merge_request
as their id:
- Project > Analyze > Merge request analytics
(
:merge_request_analytics
) - Project > Settings > Merge requests (
:merge_request_settings
)
Ensure uniqueness of more menu item ids
-
ee/lib/ee/sidebars/admin/menus/admin_settings_menu.rb
: Minor copy-paste error between two menu item ids. -
lib/sidebars/admin/menus/monitoring_menu.rb
: Background Migrations clearly had the wrong menu id withusage_trends
and is now usingbackground_migrations
-
lib/sidebars/projects/super_sidebar_menus/operations_menu.rb
: Accidental copy paste error, because:activity
is part of the Manage Menu and not the Operations Menu
Screenshots or screen recordings
N/A
How to set up and validate locally
- Run the specs
😄 - Also pin: Settings > Merge Requests in a project and see that it is now pinned correctly (#407139 (closed))
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.
Edited by Lukas Eipert