Skip to content

[popups] Remove dead code and enum retention in dialog and popover - #5193

Merged
atomiks merged 3 commits into
mui:masterfrom
atomiks:claude/base-ui-dialog-popover-simplify-19599c
Jul 10, 2026
Merged

atomiks merged 3 commits into
mui:masterfrom
atomiks:claude/base-ui-dialog-popover-simplify-19599c

Conversation

@atomiks

@atomiks atomiks commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Removes dead code across the popup components: enum members referenced from runtime code (which retained the whole enum), a redundant element Set mirroring the id map in PopupTriggerMap, write-only popover store members, always-true guards, and the { store } context wrapper objects in dialog and popover. Also fixes useDialogRootContext so the intended missing-context error actually throws.

Trims ~9.4 kB parsed / ~2.1 kB gzip across 14 entrypoints, led by dialog (−1,503 / −330) and alert-dialog (−1,506 / −282). Overlaps trivially with #5192 in DialogPopup, DialogViewport, and popupStateMapping; whichever lands second needs a rebase.

@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 10, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 10, 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@5193
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5193
    

commit: 6fb7210

@code-infra-dashboard

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

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-2.02KB(-0.43%) ▼-445B(-0.30%)

Details of bundle changes

Performance

Total duration: 1,481.31 ms +109.11 ms(+8.0%) | Renders: 78 (+0) | Paint: 2,273.71 ms +136.40 ms(+6.4%)

Test Duration Renders
Tabs mount (200 instances) 299.44 ms 🔺+52.08 ms(+21.1%) 4 (+0)
Select mount (200 instances) 167.47 ms 🔺+41.39 ms(+32.8%) 3 (+0)
Mixed surface mount (app-like density) 92.33 ms 🔺+20.87 ms(+29.2%) 5 (+0)
Dialog mount (300 instances) 66.52 ms 🔺+13.33 ms(+25.1%) 1 (+0)
Combobox type — 500 items, narrows to ~11 (type "Row 25") 38.79 ms 🔺+7.46 ms(+23.8%) 17 (+0)

…and 1 more (+8 within noise) — details

Metric alarms

Test Metric Change
Select mount (200 instances) bench:paint 🔺 +59.53 ms
Mixed surface mount (app-like density) bench:paint 🔺 +28.74 ms
Dialog mount (300 instances) bench:paint 🔺 +19.07 ms

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

@netlify

netlify Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 6fb7210
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a508c6ae5d797000803daf4
😎 Deploy Preview https://deploy-preview-5193--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 10, 2026 06:12
@atomiks
atomiks merged commit 5b11036 into mui:master Jul 10, 2026
6 checks passed
@atomiks
atomiks deleted the claude/base-ui-dialog-popover-simplify-19599c branch July 10, 2026 08:06
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