Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionMenu component #3081

Merged
merged 279 commits into from
Oct 11, 2024
Merged

ActionMenu component #3081

merged 279 commits into from
Oct 11, 2024

Conversation

KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented Aug 9, 2024

Description

ActionMenu will act as new and improved replacement for our Dropdown, with functionality for

  • Sub-menus
  • Shortcuts
  • Checkboxes
  • Grouping
  • Radio-buttons
  • Separators
  • Full keyboard support
  • and lots of other small improvements ✨

TODO:

  • Update exports in index.ts
  • Check names in CSS
  • Update MenuItem with OverridableComponent
  • Move icon in item and checkbox to a prop

Examples and demonstrations for the website will be a new PR after this one is completed.

KenAJoh and others added 30 commits February 4, 2024 22:33
HalvorHaugan
HalvorHaugan previously approved these changes Oct 8, 2024
KenAJoh and others added 2 commits October 9, 2024 20:20
* memo: ActionMenu documentation

* refactor: Update to use Icons

* bug: Fixed use of Item with nextjs link-component

* memo: Updated examples

* memo: Updated examples, removed div-wrapper

* TODOS

* memo: Oppdatert submenu med table-vising

* feat: Oppdatert eksempler

* memo: Default open first submenu in demo

* memo: Use norwegian in link docs

* Update aksel.nav.no/website/pages/eksempler/actionmenu/shortcuts.tsx

Co-authored-by: Halvor Haugan <[email protected]>

* memo: Shortcut easter egg

* ⚡ Simplify indeterminate toggle for actionmenu

* refactor: remove redundant aria-label

* Update aksel.nav.no/website/pages/eksempler/actionmenu/sub-menu.tsx

Co-authored-by: Halvor Haugan <[email protected]>

* Update aksel.nav.no/website/pages/eksempler/actionmenu/links.tsx

Co-authored-by: Halvor Haugan <[email protected]>

* memo: removed reference to nextjs app-router

* bug: Removed empty aria-label

---------

Co-authored-by: Halvor Haugan <[email protected]>
* bug: Fixed scroll + wrapping issue

* bug: undo scrollbar gutter change
@KenAJoh
Copy link
Collaborator Author

KenAJoh commented Oct 11, 2024

This bug only happens when they all are defaultOpen. In that case the "last submenu" is first in the DOM, thus Getting lower z-index. In actual use this won't happen since each submenu comes after "main" content in dom. We could in theory increment the z-index based on "level", but don't think that is necessary

Screenshot 2024-10-11 at 12 38 14

HalvorHaugan
HalvorHaugan previously approved these changes Oct 11, 2024
@KenAJoh KenAJoh merged commit 20ced9b into main Oct 11, 2024
5 checks passed
@KenAJoh KenAJoh deleted the dropdownmenu branch October 11, 2024 12:13
@github-actions github-actions bot mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants