Skip to content

Fine-tune context switcher UX

What does this MR do and why?

This improves the context switcher UX buy...

  • ...making search sections collapsible.
  • ...truncating nav items' titles and subtitles to prevent the menus from taking too much vertical space, or an horizontal scrollbar from appearing.
  • ...adding the persistent links below the search input. Until now, we already showed the "Your work" and "Explore" links, but those were still mocked in the frontend. Now, all links are built in the backend, and we add a link to the admin area if the user is authorized.

Makes search results collapsible in the context switcher. Also adds truncation to displayed items to prevent long titles from taking up too much space.

Screenshots or screen recordings

Before After
Screenshot_2023-03-16_at_3.41.28_PM Screenshot_2023-03-16_at_3.37.13_PM
Sections collapsed
Screenshot_2023-03-16_at_3.39.08_PM
Screen recording
collapse
Persistent links
Screenshot_2023-03-17_at_7.48.46_AM

How to set up and validate locally

  1. Enable the new nav:
    1. Enable the feature flag:

      echo "Feature.enable(:super_sidebar_nav)" | rails c
    2. Enable the user setting from the user dropdown:

      Screenshot_2022-12-13_at_1.32.43_PM

  2. In the super sidebar, click on the context title to expand the context switcher.

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 #378541 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports