Repository navigation
docs: add v11 prop API freeze review to roadmap - #3242
Merged
Merged
Conversation
Record the component-by-component prop review (all components except utilities) in ROADMAP.md: P1 breaking-if-deferred items, P2 additive hardening, and a summary of breaking changes by theme. Document the decisions behind it in codebase-overview.md: native attribute names keep HTML spelling, app-state data and selection are controlled while ephemeral UI state may be uncontrolled, library-component child contracts are allowed, and consumer props win when merged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Author
|
After discussion with @Niznikr, we will move forward with the straightforward breaking changes and delay items that need more deliberation. Modernize for 11.x epic
Modernize for 11.x epic (deferred)
|
showerbee
added a commit
that referenced
this pull request
Oct 15, 2026
…r onSelect
`optionsSearchEntity` and `optionsAddItem` rows behaved differently by input
method. Clicking a row skipped the item's `onClick` and called `onSelect`
(and in single-select variants pushed the action row into `selection`),
while Enter called the item's `onClick` and skipped `onSelect`. Consumers
had to wire both paths and filter sentinel ids out of `onSelect`.
Root cause: the menu sent every row click through `handleSelect`, while
`handleInputSubmit` special-cased `type: 'header' | 'footer'` and called
`option.onClick` directly. The two paths never converged.
Action rows are now commands, not options:
- Click and Enter both go through `handleSelect`, which detects action rows
via a module-private symbol that combobox sets only when it builds rows
from the two props. It calls the deprecated item `onClick`
(if any), then `events.onSelectActionItem(event, { option, value })`,
closes the menu, and returns without touching `onSelect` or selection.
- Disabled action rows do nothing for click or Enter and render
`aria-disabled="true"`.
- Item `onClick` is deprecated (deprecated-property warning, removal in
v12). Its signature on `ComboboxActionItem` is widened to
`(event: MouseEvent | KeyboardEvent, { option })`. `ComboboxOption.onClick`
keeps its old type and its old behavior (Enter on a `type: 'header' |
'footer'` row passed directly in `options`), and is marked `@deprecated`.
How #3242 (v11 prop-API freeze review) shaped this:
- It flags callback-presence mode switches as a smell (input-icon, pill).
The first version of this fix used one, routing to `onSelect` only when
`onClick` was absent. Now both handlers are dispatched independently.
- "`onSelect` is really a request." An action row is not a selection
request, so it gets its own callback instead of overloading `onSelect`.
- It keeps Combobox's grouped `events` object. The new callback lives
there, with the repo's `(event, data)` convention.
- Discriminated unions are preferred, and `type: ... | string` collapses
them. Action rows are marked with a module-private symbol instead of
another `type` string, so consumer rows in `options` (any `type`, any
extra keys) can't be mistaken for action items.
- The controlled-`isOpen` close bug is already tracked there. This fix
reuses `handleClose()` and leaves that bug out of scope.
The design was debated with an adversarial reviewer (Codex) over three
rounds. Round 1 changed `ComboboxOption.onClick` in place, which broke
consumer types, so the widened signature moved to `ComboboxActionItem`.
Round 2 typed the payload `option` as `ComboboxActionItem`, which hands
back the consumer's own item object. Round 3 found that a string
`actionItem` key could be spoofed by consumer data (crashing on
`actionItem: null`) and that header/footer rows passed directly in
`options` lost their Enter `onClick`. Both are fixed with regression
tests, and the deprecation test now runs against a fresh module.
BREAKING CHANGE: choosing an `optionsSearchEntity` or `optionsAddItem` row
by mouse no longer calls `onSelect` or adds the row to `selection`.
Migrate sentinel-id checks from `events.onSelect` to
`events.onSelectActionItem`. Rows that only use the item `onClick` keep
working for click and Enter, with a deprecation warning. Rows with
`type: 'header' | 'footer'` passed directly in `options` are unchanged.
12 of 15 tasks
Niznikr
approved these changes
Oct 21, 2026
interactivellama
pushed a commit
that referenced
this pull request
Oct 26, 2026
…r onSelect (#3243) * style(combobox): apply prettier formatting * fix(combobox): make action items behave the same for mouse and keyboard `optionsSearchEntity` (header) and `optionsAddItem` (footer) items took two different code paths. A mouse click went through option selection, so the action item itself was sent to `onSelect` as the new selection. Enter called the item's undocumented `onClick` and returned early, leaving the menu open, and did nothing when no `onClick` was given. Both inputs now go through `handleSelect`. If the item has `onClick`, it is called with `(event, { option })`, the menu closes, and the selection is left alone. Without `onClick`, both inputs keep the existing mouse behavior and fire `onSelect`. Adds an exported `ComboboxActionItem` type that documents `onClick` and `disabled`. `ComboboxOption` is unchanged. * style(combobox): apply prettier formatting to menu * fix(combobox)!: route action items to events.onSelectActionItem, never onSelect `optionsSearchEntity` and `optionsAddItem` rows behaved differently by input method. Clicking a row skipped the item's `onClick` and called `onSelect` (and in single-select variants pushed the action row into `selection`), while Enter called the item's `onClick` and skipped `onSelect`. Consumers had to wire both paths and filter sentinel ids out of `onSelect`. Root cause: the menu sent every row click through `handleSelect`, while `handleInputSubmit` special-cased `type: 'header' | 'footer'` and called `option.onClick` directly. The two paths never converged. Action rows are now commands, not options: - Click and Enter both go through `handleSelect`, which detects action rows via a module-private symbol that combobox sets only when it builds rows from the two props. It calls the deprecated item `onClick` (if any), then `events.onSelectActionItem(event, { option, value })`, closes the menu, and returns without touching `onSelect` or selection. - Disabled action rows do nothing for click or Enter and render `aria-disabled="true"`. - Item `onClick` is deprecated (deprecated-property warning, removal in v12). Its signature on `ComboboxActionItem` is widened to `(event: MouseEvent | KeyboardEvent, { option })`. `ComboboxOption.onClick` keeps its old type and its old behavior (Enter on a `type: 'header' | 'footer'` row passed directly in `options`), and is marked `@deprecated`. How #3242 (v11 prop-API freeze review) shaped this: - It flags callback-presence mode switches as a smell (input-icon, pill). The first version of this fix used one, routing to `onSelect` only when `onClick` was absent. Now both handlers are dispatched independently. - "`onSelect` is really a request." An action row is not a selection request, so it gets its own callback instead of overloading `onSelect`. - It keeps Combobox's grouped `events` object. The new callback lives there, with the repo's `(event, data)` convention. - Discriminated unions are preferred, and `type: ... | string` collapses them. Action rows are marked with a module-private symbol instead of another `type` string, so consumer rows in `options` (any `type`, any extra keys) can't be mistaken for action items. - The controlled-`isOpen` close bug is already tracked there. This fix reuses `handleClose()` and leaves that bug out of scope. The design was debated with an adversarial reviewer (Codex) over three rounds. Round 1 changed `ComboboxOption.onClick` in place, which broke consumer types, so the widened signature moved to `ComboboxActionItem`. Round 2 typed the payload `option` as `ComboboxActionItem`, which hands back the consumer's own item object. Round 3 found that a string `actionItem` key could be spoofed by consumer data (crashing on `actionItem: null`) and that header/footer rows passed directly in `options` lost their Enter `onClick`. Both are fixed with regression tests, and the deprecation test now runs against a fresh module. BREAKING CHANGE: choosing an `optionsSearchEntity` or `optionsAddItem` row by mouse no longer calls `onSelect` or adds the row to `selection`. Migrate sentinel-id checks from `events.onSelect` to `events.onSelectActionItem`. Rows that only use the item `onClick` keep working for click and Enter, with a deprecation warning. Rows with `type: 'header' | 'footer'` passed directly in `options` are unchanged. --------- Co-authored-by: showerbee <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional description
Docs-only. Records the v11 prop API freeze review so that no breaking prop change is needed for ~6 months after 11.0 GA.
ROADMAP.mdutilities, five at a time in directory order.className/root, labels and naming, typing, and bugs to fix now.forms/input/inlineand theforms/checkboxalias.docs/codebase-overview.md(decisions the review applies)is*prefix).isOpenmay be uncontrolled.No code changes. Findings were produced by reading source (several by delegated read-only reviewers) and spot-checked against the code; nothing was run. Individual entries may still contain errors, so please flag any that look wrong.