proposals/AgenticMenuButton/decisions.md26 lines · View on GitHub
Decisions: AgenticMenuButton
A separate component, not a Menu Button option (2026-10-21)
Decision: the agentic menu is its own component, AgenticMenuButton. It is a copy of the Menu Button component with the trigger fixed: the AgenticButton in label mode (always the secondary look), and an IconButton with variant='agentic' in iconOnly mode. isAgentic and variant were removed from it; isAgentic was also removed from MenuButton, which keeps its other changes. It reuses the Menu Button's CSS and NavAccordion, and adds the class pds-agentic-menu-button to the root.
Why: the designer decided the agentic menu and split buttons are new components, not extensions of the existing ones.
Port impact: one new component, which imports AgenticButton, the Icon Button's agentic variant, and the Menu Button's CSS and accordion, so it ports after those. MenuButton needs nothing for agentic.
The icon-only open state needs a small CSS override (agentic-menu-button.css), moved over from the Menu Button, so the open (expanded) state still shows a fill on top of the gradient border.
Dependents
Labeled Divider: its selector uses the AgenticMenuButton for the agentic tones and the plain MenuButton for neutral.
Open questions
The copy repeats the whole Menu Button logic (about 850 lines). Should the port instead let Menu Button take a trigger, and keep the agentic menu as a thin wrapper? That would reintroduce a prop on Menu Button.
Should the agentic menu offer a mobile accordion at all? It is copied as is.
2026-11-20: folded into MenuButton as variant='agentic' (reverses 2026-10-21)
Decision: the agentic menu is no longer a separate component. MenuButton (proposals/_base/MenuButton/) takes 'agentic' in variant: label mode passes variant='agentic' to the Button; iconOnly passes variant='agentic' to the IconButton (it was hardcoded 'standard'). The TSDoc says agentic is the one variant allowed with iconOnly. AgenticMenuButton.tsx is deleted; the stories render <MenuButton variant='agentic'>. agentic-menu-button.css (the open-state rule) is kept and imported by MenuButton; it never used the old .pds-agentic-menu-button wrapper class, which is gone with the copy.
Why: the designer approved it after the lessons audit (L1): the copy was the highest-risk item, with only the trigger swapped, and the engineer would have extended MenuButton. This reverses "A separate component, not a Menu Button option" above, and answers its open questions: no trigger prop on MenuButton and no thin wrapper; the mobile accordion stays as MenuButton has it.
Also:isSelected (menu item check, menuitemradio) was removed from the local MenuButton: unused since the Model Selector was retired, and not part of this change (L7). The copy's unused isSplitButton/positionReferenceRef duplicates went with the deleted file; MenuButton keeps its own, as in the package.
Port impact: smaller. Add a variant value to the existing MenuButton and one CSS rule; no new component. Port Button and IconButton agentic first.
Not done: story title unchanged ("Agentic Menu Button") to keep story ids stable. AgenticMenuButton.mdx was added (Usage and Accessibility).