proposals/ModelSelector/decisions.md13 lines · View on GitHub
Decisions
New component, MenuButton's foundations. Wraps the local MenuButton (menu, keyboard, typeahead, focus and placement behavior all come from it). Not a variant of MenuButton: the controlled value / options API and the no-fill trigger are specific to picking a model.
No fill in any state (Erika's call). The trigger is the subtle Button, whose hover, press and open fills are all cleared (model-selector.css), including the open-state fill menu-button.css adds. The state shows in text and chevron color instead: --pds-color-foreground-default-secondary at rest, --pds-color-foreground-default on hover, press and open. Focus ring unchanged. Open: confirm a color change is enough of a hover cue.
Selected marker: a trailing check and role='menuitemradio' / aria-checked, from a small isSelected extension to MenuButton items (see MenuButton decisions.md).
Controlled:value (the selected option id) and onValueChange(id). The trigger label is the selected option's name; nothing is hardcoded in the component.
Options:{ id, label, description?, iconName?, disabled? }, mapped straight onto MenuButton items. Groups, headings and badges are not supported.
Chevron kept (it comes with the MenuButton trigger). Open: the design shows text only; same open item as ChatInput.
Sizes xs, s, m, as MenuButton. Default s.
Storybook: Proposals/Buttons/Model Selector. Marked with the new-pattern tag. Depends on the MenuButton proposal (and through it Button and Icon).
Not changed: ChatInput still composes a plain subtle MenuButton; swapping in ModelSelector is a follow-up.
No meta. A muted secondary text next to the name in the trigger was tried and removed. The trigger is just the selected name and the chevron; extra detail goes in each option's description.