Skip to content

[all components] Correct effect timing - #5337

Merged
atomiks merged 5 commits into
mui:masterfrom
atomiks:codex/correct-effect-timing
Jul 27, 2026
Merged

atomiks merged 5 commits into
mui:masterfrom
atomiks:codex/correct-effect-timing

Conversation

@atomiks

@atomiks atomiks commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Correct effect timing where Drawer state needs to be available before paint, while keeping future-only and diagnostic work out of layout effects.

Changes

  • Report Drawer provider, nested state, swipe cleanup, snap progress, and popup measurements during layout.
  • Remove the provider's dependency on a passive React 17 fallback ID.
  • Move development warnings, future ResizeObserver setup, and deferred scroll-lock acquisition to passive effects.
  • Add timing regression coverage for controlled, default-open, kept-mounted, nested, Strict Mode, and React 17 fallback cases.

@atomiks atomiks added type: bug It doesn't behave as expected. component: drawer Changes related to the drawer component. component: dialog Changes related to the dialog component. component: accordion Changes related to the accordion component. component: collapsible Changes related to the collapsible component. component: menu Changes related to the menu component. component: navigation menu Changes related to the navigation menu component. component: slider Changes related to the slider component. component: toggle Changes related to the toggle component. labels Jul 26, 2026 — with ChatGPT Codex Connector
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@5337
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5337
    

commit: 1f0fd5c

@code-infra-dashboard

code-infra-dashboard Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-171B(-0.04%) ▼-8B(-0.01%)

Details of bundle changes

Performance

Total duration: 1,392.18 ms +70.51 ms(+5.3%) | Renders: 78 (+0) | Paint: 2,151.79 ms +104.30 ms(+5.1%)

Test Duration Renders
Scroll Area mount (300 instances) 103.45 ms 🔺+23.48 ms(+29.4%) 3 (+0)
Checkbox mount (500 instances) 91.19 ms 🔺+18.71 ms(+25.8%) 1 (+0)
Select open (500 options) 56.24 ms 🔺+12.09 ms(+27.4%) 14 (+0)

12 tests within noise — details

Metric alarms

Test Metric Change
Scroll Area mount (300 instances) bench:paint 🔺 +24.25 ms
Checkbox mount (500 instances) bench:paint 🔺 +30.81 ms

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

@netlify

netlify Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 1f0fd5c
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a66addb809f6e0008abd248
😎 Deploy Preview https://deploy-preview-5337--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 added scope: all components Widespread work has an impact on almost all components. and removed component: menu Changes related to the menu component. component: slider Changes related to the slider component. component: collapsible Changes related to the collapsible component. component: drawer Changes related to the drawer component. component: toggle Changes related to the toggle component. component: accordion Changes related to the accordion component. component: dialog Changes related to the dialog component. component: navigation menu Changes related to the navigation menu component. labels Jul 26, 2026
@atomiks
atomiks marked this pull request as ready for review July 27, 2026 01:32
@atomiks
atomiks requested a review from jjenzz as a code owner July 27, 2026 01:32
@atomiks
atomiks merged commit b38becd into mui:master Jul 27, 2026
6 checks passed
@atomiks
atomiks deleted the codex/correct-effect-timing branch July 27, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant