Skip to content

[switch][test] Add regression coverage and fix id doc#4932

Open
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/switch-test-coverage
Open

[switch][test] Add regression coverage and fix id doc#4932
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/switch-test-coverage

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 28, 2026

Adds regression coverage for Switch cancellation and unchecked form values, plus aligns the id API docs with the current hidden-input/native-button behavior.

Changes

  • Added tests that cancel onCheckedChange from root and hidden input clicks.
  • Added Chromium coverage for custom value and uncheckedValue across an off/on/off cycle.
  • Updated the Switch id JSDoc and generated API docs.

@atomiks atomiks added component: switch Changes related to the switch component. docs Improvements or additions to the documentation. test labels May 28, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 28, 2026

commit: fb60d61

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 28, 2026

Bundle size

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

Details of bundle changes

Performance

Total duration: 1,225.74 ms +76.28 ms(+6.6%) | Renders: 50 (+0) | Paint: 1,871.68 ms +129.88 ms(+7.5%)

Test Duration Renders
Select mount (200 instances) 160.66 ms 🔺+29.26 ms(+22.3%) 3 (+0)
Popover mount (300 instances) 77.78 ms 🔺+15.56 ms(+25.0%) 1 (+0)
Select open (500 options) 54.44 ms 🔺+12.05 ms(+28.4%) 14 (+0)
Scroll Area mount (300 instances) 68.87 ms ▼-26.28 ms(-27.6%) 3 (+0)

8 tests within noise — details


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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit fb60d61
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a181f987cd767000935c3bb
😎 Deploy Preview https://deploy-preview-4932--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 changed the title [switch][test] Add regression coverage for canceled changes [switch][test] Add regression coverage and fix id doc May 28, 2026
@atomiks atomiks marked this pull request as ready for review May 28, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: switch Changes related to the switch component. docs Improvements or additions to the documentation. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant