Implement drawer functionality

Created on 13 March 2024, 8 months ago
Updated 11 April 2024, 7 months ago

Problem/Motivation

In our work to improve and address the feedback received for the submenus interactions we need to replace the flyout with a "drawer".

Note: This designs show also part of the explorations happening around the admin UI layout redesign and are not part neither from this issue nor the Navigation module.

Proposed resolution

With the goal to divide the work in several issues to work in parallel, this issue is aimed to implement the main drawer behavior, leaving for follow-ups style refinements and the accordion behavior inside the drawer.
We need to ensure the drawer works well across all viewports.
This following gifs taken from a Figma prototype show a high-level idea of the interaction expected (technical requirements can make some of these animations and interactions vary slightly):

Somenteraction notes:

  • The drawer opens when a 1st level items that has children is hovered.
  • The drawer should close with either moving outside it, with a cross at the top (can be moved into a follow-up) or when hovering another 1st level item with children.
  • Since the content of the drawer starts at the top, and the item that opens it could be at the bottom of the page, the code should account for the milliseconds the user might be moving the mouse outside the drawer to get to the top.
  • The drawer should be scrollable if it can't fit all the content. It can be moved into a follow-up

Remaining tasks

Implement the drawer.

User interface changes

The submenus interaction will change radically from flyouts to a drawer pattern.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States KeyboardCowboy Denver, CO, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @KeyboardCowboy
  • Assigned to starshaped
  • πŸ‡ΊπŸ‡ΈUnited States starshaped
  • Assigned to bronzehedwick
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York
  • Pipeline finished with Success
    8 months ago
    Total: 251s
    #126459
  • Pipeline finished with Success
    8 months ago
    Total: 200s
    #126587
  • First commit to issue fork.
  • Pipeline finished with Success
    8 months ago
    Total: 203s
    #127790
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    Adding more definition and screenshots on the IS to define and limit the scope.

  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona
  • Pipeline finished with Success
    8 months ago
    Total: 207s
    #128890
  • Pipeline finished with Success
    8 months ago
    Total: 207s
    #128947
  • Pipeline finished with Success
    8 months ago
    Total: 296s
    #128976
  • Pipeline finished with Success
    8 months ago
    Total: 197s
    #129015
  • Pipeline finished with Success
    8 months ago
    Total: 200s
    #129610
  • Pipeline finished with Success
    8 months ago
    Total: 204s
    #129877
  • First commit to issue fork.
  • Pipeline finished with Success
    8 months ago
    Total: 270s
    #130328
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

    Okay, I pushed fixes for the above. Now:

    1. The mobile styles should work again
    2. The expanding nav should be in sync with the submenu animation
    3. The animations should be more performant
    4. The animation timing is abstracted to a variable
    5. Animations are disabled if user prefers-reduced-motion
    6. Lint errors are fixed

    These aspects are ready for review.

    TODO

    There's an outstanding issue with z-index levels for the submenu drawer animation. The submenus should slide out from behind the navigation, and this works, except for the footer element, which is a sibling of the content nav. This causes the footer submenus to animate over the navigation.

    Would it be okay to move the footer nav inside the content nav, and achieve the same visual effect via CSS? I'm not sure if there are accessibility implications here. Screenshot of potential markup below.

  • Pipeline finished with Success
    8 months ago
    Total: 205s
    #130742
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

    I pushed a fix for the footer submenu z-index issue, above, and should now be fixed.

    While fixing that issue, I noticed the mobile submenus don't have the correct size across screen sizes, so I'm looking into that now.

  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

    I've pushed a fix for the mobile submenu size issue, above. All know issues have fixes applied. This issue is now ready for review.

  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York
  • Pipeline finished with Success
    8 months ago
    Total: 202s
    #130770
  • Status changed to Needs work 8 months ago
  • πŸ‡·πŸ‡ΈSerbia finnsky

    I see few issues on mobile and desktop js behaviour. i would like to have them fixed aswell.

  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    This is looking great! Almost there :D

    I'm still seeing the error where, after opening one of the main parent items, it doesn't close when I hover another item:

  • πŸ‡©πŸ‡ͺGermany rkoller NΓΌrnberg, Germany

    one detail i've noticed, if you open up a submenu you then have the label of the top level menu item as the "heading" now. That heading is clickable by the mouse but it has an invisible focus outline when you tab through the menu by keyboard (ref wcag sc 2.4.7 - focus visible).

  • Status changed to Needs review 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

    Confirming receipt. Working on the issues outlined.

  • Pipeline finished with Success
    8 months ago
    Total: 236s
    #130865
  • Pipeline finished with Success
    8 months ago
    Total: 207s
    #130875
  • πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

    @ckrina Woops, I forgot to fix dismissing the submenu on hover out. Pushed a fix for that!

  • Pipeline finished with Success
    8 months ago
    Total: 213s
    #130881
  • Pipeline finished with Success
    8 months ago
    Total: 206s
    #130885
  • Assigned to finnsky
  • Status changed to Needs work 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    Moving it back to Needs work because @finnsky is working on JS fixes.

  • Status changed to Needs review 8 months ago
  • Pipeline finished with Success
    8 months ago
    Total: 239s
    #130915
  • Issue was unassigned.
  • Status changed to Needs work 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    As mentioned yesterday in Slack, I'm still seeing weird behaviors and I think it's related to the fact that the open/close is reacting to hovering something else, when the event to trigger that change should be related to the element itself you’re interacting with. For example, if I leave the user menu to click on the collapse button, that should close its child drawer. But doesn't:

    Moving to Needs Work to draw attention to this, because if an event as key like this needs to be changed it's better to do it in this issue.

  • Status changed to Needs review 8 months ago
  • πŸ‡·πŸ‡ΈSerbia finnsky

    This one is ready to go.

  • Pipeline finished with Success
    8 months ago
    Total: 196s
    #131278
  • Pipeline finished with Success
    8 months ago
    Total: 194s
    #131321
  • Status changed to Fixed 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    And merged! Thanks everybody involved, specially @bronzehedwick and @finnsky for the great work and collaboration with this time-sensitive key feature!

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Skipped
    3 months ago
    #264666
  • Pipeline finished with Canceled
    2 months ago
    Total: 75s
    #281222
  • Pipeline finished with Failed
    2 months ago
    Total: 419s
    #281223
  • Pipeline finished with Success
    2 months ago
    Total: 349s
    #281579
  • Pipeline finished with Success
    about 2 months ago
    Total: 147s
    #291087
Production build 0.71.5 2024