Skip to content

[checkbox group][radio group] Forward group ids#4997

Merged
atomiks merged 2 commits into
mui:masterfrom
atomiks:codex/group-id-forwarding
Jun 11, 2026
Merged

[checkbox group][radio group] Forward group ids#4997
atomiks merged 2 commits into
mui:masterfrom
atomiks:codex/group-id-forwarding

Conversation

@atomiks

@atomiks atomiks commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

id props on CheckboxGroup and RadioGroup were consumed for field registration and never reached the rendered group element.

Root cause

Both groups destructured id before spreading element props and did not add it back to the root props.

Changes

  • Forwarded the explicit id prop to the CheckboxGroup root.
  • Forwarded the explicit id prop to the RadioGroup root.
  • Added root id forwarding tests for both groups.

@atomiks atomiks added component: checkbox group Changes related to the checkbox group component. component: radio group Changes related to the radio group component. type: bug It doesn't behave as expected. labels Jun 10, 2026 — with ChatGPT Codex Connector
@pkg-pr-new

pkg-pr-new Bot commented Jun 10, 2026

Copy link
Copy Markdown

commit: c80b085

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 10, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+10B(0.00%) 🔺+7B(0.00%)

Details of bundle changes

Performance

Total duration: 1,338.10 ms +59.70 ms(+4.7%) | Renders: 50 (+0) | Paint: 2,002.82 ms +60.93 ms(+3.1%)

Test Duration Renders
Menu mount (300 instances) 183.68 ms 🔺+42.23 ms(+29.9%) 2 (+0)
Scroll Area mount (300 instances) 97.32 ms 🔺+24.90 ms(+34.4%) 3 (+0)
Checkbox mount (500 instances) 67.18 ms ▼-18.36 ms(-21.5%) 1 (+0)

9 tests within noise — details


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

@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit c80b085
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a2a1ac509dad40008dbd7b2
😎 Deploy Preview https://deploy-preview-4997--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.

@atomiks atomiks marked this pull request as ready for review June 10, 2026 07:38

atomiks commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Code Review (GPT-5.5)

Approve ✅ The group id forwarding fix restores the expected public prop behavior for both CheckboxGroup and RadioGroup with narrow, matching tests.

1. Bugs / Issues (None)

I didn’t find any blocking or non-blocking issues in the branch diff.

2. Root Cause & Patch Assessment

Both groups already consumed id for internal field registration, but the explicit prop was not included in the rendered root props. Adding id: idProp to the CheckboxGroup and RadioGroup root prop objects preserves the existing internal id behavior while making the public id prop visible on the DOM element again.

3. Test Coverage Assessment

The added tests cover the public behavior directly for both affected components by rendering each group with an explicit id and asserting the root group/radiogroup receives it.

@atomiks atomiks merged commit a48dc6d into mui:master Jun 11, 2026
23 checks passed
@atomiks atomiks deleted the codex/group-id-forwarding branch June 11, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: checkbox group Changes related to the checkbox group component. component: radio group Changes related to the radio group component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant