Skip to content

docs: add v11 prop API freeze review to roadmap - #3242

Merged
Niznikr merged 1 commit into
masterfrom
chore/major-version-roadmap
Oct 21, 2026
Merged

Niznikr merged 1 commit into
masterfrom
chore/major-version-roadmap

Conversation

@interactivellama

@interactivellama interactivellama commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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.md

  • Reviews every component except utilities, five at a time in directory order.
  • "P1 — Prop API freeze review (before GA)": changes that are breaking if they ship after GA.
  • "P2 — Additive hardening (safe after GA)": non-breaking follow-ups.
  • A summary of the breaking changes grouped into nine themes: removals, uncontrolled data and selection, child and slot contracts, callback shapes, booleans, className/root, labels and naming, typing, and bugs to fix now.
  • Lists the removal of the deprecated forms/input/inline and the forms/checkbox alias.

docs/codebase-overview.md (decisions the review applies)

  • Props that pass straight to a DOM attribute keep their native names (no is* prefix).
  • App-state data and any selection that drives other UI (would reasonably live in Redux) is controlled. Ephemeral UI state such as isOpen may be uncontrolled.
  • Child-props contracts are allowed when every accepted child is a library component with typed props. Slots taking arbitrary consumer elements are not.
  • When a parent merges a child element's props with its own, the consumer's props win.

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.

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]>
@interactivellama

interactivellama commented Oct 14, 2026 •

Copy link
Copy Markdown
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

  • Removals of deprecated surface.
  • Booleans
  • Callback shapes
  • Labels, assistiveText and naming
  • Typing the contract.

Modernize for 11.x epic (deferred)

  • Uncontrolled data and selection
  • Child and slot contracts
  • className and root
  • Fix now (bugs, not breaking)

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.
@Niznikr
Niznikr merged commit 8f2a1b1 into master Oct 21, 2026
9 checks passed
@Niznikr
Niznikr deleted the chore/major-version-roadmap branch October 21, 2026 18:40
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants