Skip to content

[all components] Simplify lifecycle effect ownership - #5341

Merged
atomiks merged 4 commits into
mui:masterfrom
atomiks:codex/simplify-lifecycle-effects
Jul 27, 2026
Merged

atomiks merged 4 commits into
mui:masterfrom
atomiks:codex/simplify-lifecycle-effects

Conversation

@atomiks

@atomiks atomiks commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Removes effect work only where an existing event or lifecycle already owns the same state. Timing-sensitive merges without a clear safety win were reverted after the compatibility audit.

Changes

  • Remove redundant combobox-trigger, delay-group, dismissal, and typeahead synchronization.
  • Avoid permanently force-mounting a Combobox list after a programmatic value change.
  • Merge same-phase previous-value bookkeeping.
  • Move Select scroll-arrow reset into the explicit unmount lifecycle.
  • Snapshot swipe thresholds at gesture start.
  • Add focused Strict and non-Strict regressions, including a retained popup viewport whose active trigger remounts while closed.

Compatibility

Verified with exact React/ReactDOM pairs 17.0.2, 18.3.1, and 19.2.5 in both Strict and non-Strict modes. Timing-sensitive cases also pass in Chromium. On React 19, the full affected suites pass in jsdom and Chromium, along with ESLint, Prettier, and TypeScript.

@atomiks atomiks added scope: all components Widespread work has an impact on almost all components. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. 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@5341
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5341
    

commit: d26da68

@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 ▼-378B(-0.08%) ▼-128B(-0.09%)

Details of bundle changes

Performance

Total duration: 1,338.19 ms +88.46 ms(+7.1%) | Renders: 78 (+0) | Paint: 2,078.69 ms +131.97 ms(+6.8%)

Test Duration Renders
Select mount (200 instances) 183.48 ms 🔺+44.08 ms(+31.6%) 3 (+0)
Menu open (500 items) 90.83 ms 🔺+18.68 ms(+25.9%) 12 (+0)
Mixed surface mount (app-like density) 79.86 ms 🔺+16.10 ms(+25.2%) 5 (+0)
Combobox open — 500 items 43.21 ms 🔺+9.94 ms(+29.9%) 4 (+0)
Combobox type — 500 items, all stay mounted (type "Row ") 32.61 ms +3.03 ms(+10.3%) 11 (+0)

10 tests within noise — details

Metric alarms

Test Metric Change
Select mount (200 instances) bench:paint 🔺 +52.23 ms
Menu open (500 items) bench:paint 🔺 +29.94 ms
Menu open (500 items) bench:paint#menu-open 🔺 +29.94 ms
Mixed surface mount (app-like density) bench:paint 🔺 +24.67 ms
Combobox open — 500 items bench:paint#combobox-open 🔺 +18.79 ms

…and 3 more metric alarms — details


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 d26da68
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a66c55ab3f1430008a5770f
😎 Deploy Preview https://deploy-preview-5341--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 July 27, 2026 03:07
@atomiks
atomiks merged commit 006a72a into mui:master Jul 27, 2026
6 checks passed
@atomiks
atomiks deleted the codex/simplify-lifecycle-effects branch July 27, 2026 03:07
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: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant