Skip to content

Super sidebar peek on viewport edge hover

Scott de Jonge requested to merge 390773-super-sidebar-peek into master

What does this MR do and why?

The user will be able to access the sidebar when it is collapsed by hovering over the left edge of the page which will expose the full sidebar in an overlay.

Changes

  • Create super_sidebar_peek feature flag
  • Remove gl-visibility-hidden class from super sidebar collapsed state
  • Add hover area which toggles isPeek state on mouseover
  • Decrease transition to 100ms when peeking
  • Replace super sidebar border-right with box-shadow when peeking
  • Add hasCollapseButton prop to <user-bar> to hide when peeking
  • Use prefers-reduced-motion: no-preference for transitions
  • Add 100ms delay to isPeek to compensate for unintentional triggers
  • Move SUPER_SIDEBAR_PEEK_DELAY to constants.js
  • Add setTimeoutSpy to tests, restore createWrapper on test

Screenshots or screen recordings

Default

Expanded

CleanShot_2023-04-12_at_17.46.27

Collapsed

CleanShot_2023-04-12_at_17.46.01

Reduced motion

Expanded

CleanShot_2023-04-12_at_17.49.26

Collapsed

CleanShot_2023-04-12_at_17.49.10

Closed by

How to set up and validate locally

  1. Enable super sidebar (if not currently on)
    1. In rails c enable feature flag Feature.enable(:super_sidebar_nav)
    2. Toggle on "new navigation" in user menu
  2. Enable peek feature flag Feature.enable(:super_sidebar_peek)
  3. Collapse the sidebar
  4. Move mouse to viewport left edge

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

Edited by Scott de Jonge

Merge request reports