Skip to content

[Popover][Menu][Select] Remove deprecated props#48021

Merged
siriwatknp merged 15 commits intomui:masterfrom
siriwatknp:remove-deprecated-popover-props
Mar 19, 2026
Merged

[Popover][Menu][Select] Remove deprecated props#48021
siriwatknp merged 15 commits intomui:masterfrom
siriwatknp:remove-deprecated-popover-props

Conversation

@siriwatknp
Copy link
Member

Summary

Remove all deprecated props from the Popover component.

Breaking change

The following deprecated props have been removed:

  • BackdropComponent — use slots.backdrop instead
  • BackdropProps — use slotProps.backdrop instead
  • PaperProps — use slotProps.paper instead
  • TransitionComponent — use slots.transition instead
  • TransitionProps — use slotProps.transition instead
 <Popover
-  BackdropComponent={CustomBackdrop}
-  BackdropProps={{ invisible: true }}
-  PaperProps={{ elevation: 12 }}
-  TransitionComponent={CustomTransition}
-  TransitionProps={{ timeout: 500 }}
+  slots={{ backdrop: CustomBackdrop, transition: CustomTransition }}
+  slotProps={{
+    backdrop: { invisible: true },
+    paper: { elevation: 12 },
+    transition: { timeout: 500 },
+  }}
 />

Changes

  • Removed all 5 deprecated props from source, types, and PropTypes
  • Simplified externalForwardedProps — no longer merges deprecated props
  • Removed unused elementTypeAcceptingRef import
  • Migrated all tests from deprecated to slot API
  • Updated Popover.spec.tsx type tests
  • Added PaperProps as deprecated prop to Menu.d.ts (Menu inherited it from Popover — needed to keep Menu working until its own deprecated props are removed)
  • Added migration guide entry in upgrade-to-v9.md
  • Regenerated API docs

Test plan

  • pnpm prettier passes
  • pnpm eslint passes
  • pnpm typescript passes
  • pnpm test:unit Popover passes (83 tests)

@siriwatknp siriwatknp added breaking change Introduces changes that are not backward compatible. package: material-ui Specific to Material UI. labels Mar 18, 2026
@mui-bot
Copy link

mui-bot commented Mar 18, 2026

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material ▼-448B(-0.09%) ▼-176B(-0.12%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 68f2b3e

Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

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

Looks good ~ there's a small cleanup that could be included in this PR as well: https://github.com/siriwatknp/material-ui/blob/master/packages/mui-material/src/Menu/Menu.js#L220-L223

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 18, 2026
@zannager zannager added component: Popover The React component. and removed package: material-ui Specific to Material UI. labels Mar 18, 2026
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 19, 2026
@siriwatknp siriwatknp force-pushed the remove-deprecated-popover-props branch from 06ca39d to 094b364 Compare March 19, 2026 03:14
@siriwatknp
Copy link
Member Author

@mnajdova @mj12albert I have to do the removal of Menu in this PR because it's affected by the Popper change. As well as SelectInput because it's using Menu internally.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 19, 2026
@siriwatknp siriwatknp changed the title [Popover] Remove deprecated props [Popover][Menu][Select] Remove deprecated props Mar 19, 2026
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 19, 2026
@siriwatknp siriwatknp merged commit 1700f7c into mui:master Mar 19, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. component: Popover The React component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants