Repository navigation
[select][combobox] Share item indicator implementation - #5728
Merged
flaviendelangle merged 1 commit intoSep 18, 2026
Merged
Conversation
flaviendelangle
requested review from
atomiks,
colmtuite,
jjenzz and
michaldudak
as code owners
September 16, 2026 06:36
commit: |
Bundle size
PerformanceTotal duration: 1,059.43 ms -2.97 ms(-0.3%) | Renders: 76 (+0) | Paint: 1,715.56 ms -31.57 ms(-1.8%) No significant changes — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atomiks
approved these changes
Sep 18, 2026
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.
Select and Combobox duplicate their item indicator rendering and transition logic. Move that implementation into a shared memoized component, with each public wrapper passing its context's
selectedvalue and retaining the existing lazy-mount boundary. Public props and state types remain unchanged.Add tests for mounting, unmounting, reselection, and preserving the same DOM element with
keepMounted. The tests also verify that selection updates reach the memoized implementation and the internalselectedprop does not reach the DOM.Bundle sizes were measured locally before opening this PR, using freshly built packages on
masterat5246e9ff5and on this change, with the repository's bundle-size checker. All values below are bytes.The combined measurement uses the same checker's builder with both component namespaces imported and retained via
console.log(Select, Combobox), with React and React DOM external. The other measurements use the standard entrypoints.Validation:
pnpm test:jsdom ItemIndicator --no-watch: 68 passed, 6 skipped.pnpm test:chromium ItemIndicator --no-watch: 74 passed.pnpm build,pnpm typescript,pnpm eslint,pnpm stylelint, andpnpm prettier --branch upstream/masterpassed.Bundle command after each build:
pnpm -F ./test/bundle-size exec bundle-size-checker --filter '**/select' '**/combobox' '**/autocomplete' '@base-ui/rea[c]t' --output /tmp/indicator-size.json --concurrency 4.I have followed the PR section of the contributing guide.