Once T363858 is complete, there is some follow-up work which will need to happen before the MenuButton component can be taken out of WIP and made available to users.
Feature updates
- Question: Do we want persistent selection state in this component, or should it only be responsible for triggering actions (via emitting events based on selection), with the selection immediately cleared after an event is emitted? Currently the component functions both as a menu (persistent selection remains after a choice is made) AND as a button (an event is immediately fired upon selection, allowing the parent component to respond in whatever way is appropriate).
- The toggle button should only have one label, either an aria-label for icon-only buttons or the visible button label (when the button has text).
Design Updates
- Include minimum and maximum width.
- Evaluate removing the selection within the menu within the main demo, since this selection is not recommended in the MenuButton Best practices.
Documentation Updates
The component should include a full documentation page in the Codex docs site before publication, including component guidelines, illustrations, and interactive demos.
- Add the complete set of component guidelines to the docs page (Completed in patch 1035775)
- Add a configurable demo to the docs page
- Add demos illustrating key modes of usage: default icon ("..."), custom button content, menu items with icons
- Add a demo illustrating selection behavior similar to ARIA APG's MenuButton Pattern example. Refer to this comment for implementation.
Acceptance criteria
- Move the component out of WIP and export in the lib
- Include the 2 new types introduced with this component (MenuButtonItemData and FloatingMenuOptions) in the lib