Skip to content

[internal] useLayoutEffect with ResizeObserver#4814

Open
romgrk wants to merge 3 commits into
mui:masterfrom
romgrk:fix-resize-observer
Open

[internal] useLayoutEffect with ResizeObserver#4814
romgrk wants to merge 3 commits into
mui:masterfrom
romgrk:fix-resize-observer

Conversation

@romgrk
Copy link
Copy Markdown
Contributor

@romgrk romgrk commented May 12, 2026

Make sure we use useLayoutEffect with ResizeObserver.

@romgrk romgrk requested a review from atomiks as a code owner May 12, 2026 19:44
@romgrk romgrk added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label May 12, 2026
@romgrk romgrk added the internal Behind-the-scenes enhancement. Formerly called “core”. label May 12, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

commit: 50f4b41

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 12, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-40B(-0.01%) ▼-3B(0.00%)

Details of bundle changes

Performance

Total duration: 1,087.35 ms -161.66 ms(-12.9%) | Renders: 50 (+0) | Paint: 1,660.72 ms -234.67 ms(-12.4%)

Test Duration Renders
Slider mount (300 instances) 148.78 ms ▼-52.99 ms(-26.3%) 3 (+0)
Popover mount (300 instances) 58.15 ms ▼-17.14 ms(-22.8%) 1 (+0)
Dialog mount (300 instances) 44.65 ms ▼-16.80 ms(-27.3%) 1 (+0)
Tooltip mount (300 contained roots) 44.44 ms ▼-11.16 ms(-20.1%) 1 (+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 12, 2026

Deploy Preview for base-ui ready!

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

@oliviertassinari oliviertassinari changed the title [internals] useLayoutEffect with ResizeObserver [internal] useLayoutEffect with ResizeObserver May 12, 2026
Copy link
Copy Markdown
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth double checking, but I think the registerTabResizeObserverElement in TabsTab should also be a layout effect

@romgrk romgrk requested a review from flaviendelangle May 23, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”. performance 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.

3 participants