Skip to content

Replace context switcher with header in sidebar

Mark Florian requested to merge 415811-replace-context-switcher into master

What does this MR do and why?

Replace context switcher with header in sidebar

Now that the global search modal replicates the functionality of the context switcher (see #409522 (closed) and #415809 (closed) for prior work), the context switcher can be removed.

In its place, a static header specific to each panel type is shown at the top of the sidebar. The old context header (which was the toggle for the context switcher when logged in, and a non-interactive element when logged out) has largely been replaced by changing the "main" or "overview" link for the current context (if there is one). It now displays the current context's name (when appropriate), and shows that entity's avatar.

This does not remove the frontend code for the context switcher. That will be done in a follow-up.

Addresses #415811 (closed).

See individual commit messages for more detail.

Screenshots or screen recordings

Context Before After
Your work your_work your_work
Explore explore explore
Admin area admin admin
Group (without avatar) group_without_avatar group_without_avatar
Group (with avatar) group_with_avatar group_with_avatar
Project (without avatar) project_without_avatar project_without_avatar
Project (with avatar) project_with_avatar project_with_avatar
User profile user_profile user_profile
User settings user_settings user_settings
Search results search search

How to set up and validate locally

  1. Ensure the new navigation is enabled.
  2. Visit each of the different page contexts listed in the screenshots.
  3. Disable the new nav, and verify that the old nav is unaffected by these changes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #415811 (closed)

Edited by Mark Florian

Merge request reports

Loading