Skip to content

[combobox][autocomplete] Remove unsupported data-instant documentation - #5351

Open
lyzno1 wants to merge 4 commits into
mui:masterfrom
lyzno1:codex/combobox-data-instant-docs
Open

[combobox][autocomplete] Remove unsupported data-instant documentation#5351
lyzno1 wants to merge 4 commits into
mui:masterfrom
lyzno1:codex/combobox-data-instant-docs

Conversation

@lyzno1

@lyzno1 lyzno1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the unsupported data-instant entry from the Combobox popup data attribute metadata
  • regenerate the Combobox and Autocomplete API references
  • update the generated component API index

Both Combobox.Popup and Autocomplete.Popup share ComboboxPopup. Its runtime state and state attribute mapping do not implement an instant animation reason, so the documented attribute was never generated on the DOM.

This documentation-only correction does not change runtime behavior.

Fixes #5350

@lyzno1
lyzno1 marked this pull request as ready for review July 27, 2026 10:00
@pkg-pr-new

pkg-pr-new Bot commented Jul 27, 2026

Copy link
Copy Markdown

commit: fd829f6

@code-infra-dashboard

code-infra-dashboard Bot commented Jul 27, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,224.51 ms +57.46 ms(+4.9%) | Renders: 78 (+0) | Paint: 1,919.55 ms +95.39 ms(+5.2%)

Test Duration Renders
Tooltip mount (300 contained roots) 65.61 ms 🔺+16.17 ms(+32.7%) 1 (+0)

14 tests within noise — details

Metric alarms

Test Metric Change
Tooltip mount (300 contained roots) bench:paint 🔺 +23.38 ms

Check out the code infra dashboard for more information about this PR.

@lyzno1 lyzno1 changed the title [combobox] Remove unsupported data-instant documentation [combobox][autocomplete] Remove unsupported data-instant documentation Jul 27, 2026
@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fd829f6
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a70a49c41917000084cbee3
😎 Deploy Preview https://deploy-preview-5351--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aarongarciah aarongarciah added component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component. docs Improvements or additions to the documentation. labels Jul 28, 2026
@aarongarciah

Copy link
Copy Markdown
Member

@atomiks is the #⁠2 docs discovery in the PR review below a real gap? Is it intentional?

Regarding #⁠1, you can address it in this same PR @lyzno1.

PR review

Docs-only change, and the premise checks out: ComboboxPopup state has no instant/instantType and its mapping is popupStateMapping + transitionStatusMapping only, so data-instant was never emitted on Combobox.Popup or Autocomplete.Popup. Removal is correct, nothing merge-blocking.

Docs (2)

1. ℹ️ Combobox.Popup emits data-anchor-hidden but the enum still doesn't document it

Location: packages/react/src/combobox/popup/ComboboxPopupDataAttributes.ts:29

  align = CommonPopupDataAttributes.align,
  // no `anchorHidden` entry
  empty = 'data-empty',

Inverse of the gap this PR fixes, in the same file. ComboboxPopup puts anchorHidden: positioning.anchorHidden in state ([ComboboxPopup.tsx:78](packages/react/src/combobox/popup/ComboboxPopup.tsx:78)) and spreads popupStateMapping, which maps anchorHiddendata-anchor-hidden. So the popup renders an attribute the reference table omits (ComboboxPositioner documents it, Combobox.Popup does not). Pre-existing, out of the stated scope.

Failure scenario: Someone styling Combobox.Popup[data-anchor-hidden] finds no mention of it in the Popup data-attributes table and assumes only the positioner carries it.

Fix: Optional follow-up — add anchorHidden = CommonPopupDataAttributes.anchorHidden to the enum and regenerate, or confirm the omission is intentional (Menu/Popover popups don't carry anchorHidden in state at all, so combobox is the odd one out).

2. ℹ️ Doc removal hides a real behavior gap vs Menu/Popover

Location: packages/react/src/combobox/popup/ComboboxPopupDataAttributes.ts:30

Menu/Popover/Tooltip track instantType and skip exit animations on click/dismiss; combobox has no such state anywhere in packages/react/src/combobox/. Documenting reality is the right call for this PR, but the underlying parity gap (selecting a combobox item always plays the exit animation, unlike a menu item) stays unaddressed.

Failure scenario: A user migrating menu styles to combobox has no data-instant hook to suppress the close transition on item click.

Fix: No change here; worth a separate issue if instant parity is wanted.

Verdict

Approve - correct, narrowly scoped docs fix verified against the runtime state mapping, with only optional follow-up notes.


🤖 Review generated with Claude Code

@lyzno1

lyzno1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@aarongarciah Done — addressed #1 by documenting data-anchor-hidden for both Combobox.Popup and Autocomplete.Popup.

@atomiks

atomiks commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@aarongarciah Since combobox is keyboard-interactive even for pointer users I think leaving it off makes sense, since iirc its purpose was to make keyboard interaction instant, with no animations (especially for Tooltip).

We can leave it off until someone files an issue about it.

@lyzno1

lyzno1 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@atomiks Can this PR be merged before the 1.7.0 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[combobox] Remove unsupported data-instant documentation

3 participants