Skip to content

[utils] Fix pseudo-element bounds in dev#5000

Open
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/fix-pseudo-element-dev-bounds
Open

[utils] Fix pseudo-element bounds in dev#5000
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/fix-pseudo-element-dev-bounds

Conversation

@atomiks

@atomiks atomiks commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Pseudo-element hit-area expansion was skipped in every non-production build. This keeps jsdom on the safe path while allowing real development browsers to calculate pseudo-element bounds.

Root cause

The jsdom workaround was tied to NODE_ENV, so development browsers returned the element rect before reading pseudo-element styles.

Changes

  • Replace the broad non-production guard with a jsdom-specific guard and fallback catch.
  • Add coverage for the jsdom safe path and pseudo-element bounds calculation.

@atomiks atomiks added component: combobox Changes related to the combobox component. component: menu Changes related to the menu component. component: select Changes related to the select 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: 77ce714

@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 🔺+19B(0.00%) 🔺+5B(0.00%)

Details of bundle changes

Performance

Total duration: 1,402.17 ms +211.42 ms(+17.8%) | Renders: 50 (+0) | Paint: 2,110.49 ms +329.24 ms(+18.5%)

Test Duration Renders
Tabs mount (200 instances) 281.62 ms 🔺+52.17 ms(+22.7%) 4 (+0)
Select mount (200 instances) 173.90 ms 🔺+42.34 ms(+32.2%) 3 (+0)
Checkbox mount (500 instances) 86.54 ms 🔺+22.86 ms(+35.9%) 1 (+0)
Select open (500 options) 72.42 ms 🔺+22.45 ms(+44.9%) 14 (+0)
Popover mount (300 instances) 82.23 ms 🔺+17.57 ms(+27.2%) 1 (+0)

7 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 77ce714
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a29162ca481ca00081e2f00
😎 Deploy Preview https://deploy-preview-5000--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 force-pushed the codex/fix-pseudo-element-dev-bounds branch from b5b9a55 to ff64de3 Compare June 10, 2026 07:43
@atomiks atomiks force-pushed the codex/fix-pseudo-element-dev-bounds branch from ff64de3 to 77ce714 Compare June 10, 2026 07:45
@atomiks atomiks marked this pull request as ready for review June 10, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: combobox Changes related to the combobox component. component: menu Changes related to the menu component. component: select Changes related to the select component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant