Skip to content

[select][combobox][slider] Add Label parts#4167

Merged
atomiks merged 12 commits intomui:masterfrom
atomiks:codex/add-label-parts-select-combobox-slider
Mar 11, 2026
Merged

[select][combobox][slider] Add Label parts#4167
atomiks merged 12 commits intomui:masterfrom
atomiks:codex/add-label-parts-select-combobox-slider

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Feb 23, 2026

The Label part is added for components that render a <div> label instead of using <label>. This matches Progress and Meter, and removes the need to use Field.

Forms: https://deploy-preview-4167--base-ui.netlify.app/react/handbook/forms#naming-form-controls

@atomiks atomiks added component: select Changes related to the select component. component: slider Changes related to the slider component. type: new feature Expand the scope of the product to solve a new problem. component: combobox Changes related to the combobox component. labels Feb 23, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 23, 2026

commit: c9bb899

@mui-bot
Copy link

mui-bot commented Feb 23, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+1.7KB(+0.37%) 🔺+510B(+0.34%)

Details of bundle changes


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

@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit e87fdc4
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69b131198fbe640009098914
😎 Deploy Preview https://deploy-preview-4167--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch 5 times, most recently from ef71ee3 to af7312e Compare February 23, 2026 13:59
@atomiks atomiks marked this pull request as ready for review February 23, 2026 14:11
@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch 2 times, most recently from 5493d6f to 253d85c Compare February 23, 2026 15:28
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Feb 24, 2026
@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch from 253d85c to 41e0cd6 Compare February 24, 2026 12:10
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Feb 24, 2026
@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch 2 times, most recently from a856bf4 to 70ff953 Compare February 24, 2026 12:21
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Feb 27, 2026
@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch from c51d4b2 to 097c927 Compare March 9, 2026 08:15
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 9, 2026
@atomiks
Copy link
Contributor Author

atomiks commented Mar 9, 2026

Codex Review

Overview

This patch adds dedicated Label parts for Select, Combobox, and Slider, and updates the shared label plumbing so button-based controls can be labeled without routing everything through Field.Label. It also updates the public docs and handbook examples so the guidance matches the final standalone labeling APIs, including the grouped-slider guidance.

Findings

No blocking issues found in this patch.

1. ℹ️ [Informational] Focused SSR render benchmark remains effectively flat

Impact: The extra label registration and aria-labelledby resolution work in the shared paths does not look like a meaningful render-time regression, so performance is not a blocker here.

Evidence: The hot paths touched by this branch are in packages/react/src/labelable-provider/useLabel.ts, packages/react/src/select/trigger/SelectTrigger.tsx, packages/react/src/combobox/trigger/ComboboxTrigger.tsx, and packages/react/src/slider/root/SliderRoot.tsx. I reran a focused renderToString benchmark on the latest master versus the current PR head, rendering 50 each of Field.Label + Select, Field.Label + Combobox, and Field.Label + Slider per sample.

Ref Mean (ms) p50 (ms) p95 (ms) Sample size
master (e90b027) 13.53 13.12 16.82 30
PR head (e87fdc4) 13.25 12.88 16.94 30

Recommendation: No perf-specific change is needed.

Confidence: 4/5

High confidence based on a full master...HEAD pass over both runtime code and docs, fresh targeted JSDOM coverage for FieldLabel, ComboboxLabel, ComboboxRoot, SelectLabel, SelectRoot, SliderLabel, and SliderRoot, pnpm docs:validate, and the focused SSR render benchmark above. Residual risk is mainly in unusual label compositions that are not yet covered by explicit tests.

Notes

  • Docs were included in this pass: the Select, Combobox, and Slider component pages, the forms handbook page, the generated handbook index, and the updated demos/examples were all rechecked against the shipped API.
  • Latest delta since the previous review: the forms handbook heading structure was flattened, the implicit-label guidance now sits with the naming guidance instead of the description section, and the generated handbook outline was updated to match.

@atomiks atomiks force-pushed the codex/add-label-parts-select-combobox-slider branch from 9daff91 to ad6999e Compare March 11, 2026 08:13
@atomiks atomiks merged commit ca0c645 into mui:master Mar 11, 2026
22 checks passed
@atomiks atomiks deleted the codex/add-label-parts-select-combobox-slider branch March 11, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: combobox Changes related to the combobox component. component: select Changes related to the select component. component: slider Changes related to the slider component. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants