Skip to content

Enhancement: update menu to use project baseline #505

@TheWebTech

Description

@TheWebTech

Is your feature request related to a problem? Please describe.

Building menus can be tricky, we have JavaScript handling a lot of the interaction accessibility, etc. The pull outs on menus can also be tricky because you want them to display in such a way that they don't get obscured or go off screen.

Our existing menu module code is at: https://github.com/HubSpot/cms-theme-boilerplate/tree/f21d41c50fbc6f28cc8b843a5ad8e497998efebf/src/modules/menu.module

Describe the solution you'd like

Thanks to project baseline, there is now a popover attribute, and CSS properties that can take care of most of these issues for us.

Specifically a combination of position-anchor position-try-options and @position-try.

Due to this being a framework for multi-lingual sites we should use logical properties (inline vs left and right, block vs top and bottom)

Screenshots/source code/links

https://youtu.be/_-6LgEjEyzE?feature=shared&t=1716

Additional context

Solving for this may help resolve #373 out of the box, without additional effort. Note #373 is an old issue and I don't know for sure if the issue still exists.

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityIssues related to accessibilityenhancementImproves upon an existing featurefeature requestmulti-langIssues related to multi-lingual contentperformanceIssues related to website performance and speed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions