[accordion] Remove deprecated props#47963
Merged
silviuaavram merged 3 commits intomui:masterfrom Mar 16, 2026
Merged
Conversation
Netlify deploy previewBundle size report
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes previously-deprecated Accordion transition customization props (TransitionComponent, TransitionProps) as part of the v9 API surface, standardizing on the slots/slotProps customization model.
Changes:
- Remove
TransitionComponent/TransitionPropsfromAccordionimplementation, TS types, PropTypes, and API docs. - Update
Accordiontests to useslots.transition/slotProps.transition. - Document the breaking removal in the v9 upgrade guide.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/mui-material/src/Accordion/Accordion.js | Removes legacy transition props wiring and PropTypes entries. |
| packages/mui-material/src/Accordion/Accordion.d.ts | Removes legacy transition props from the public TypeScript API. |
| packages/mui-material/src/Accordion/Accordion.test.js | Migrates tests from legacy props to slots/slotProps. |
| docs/pages/material-ui/api/accordion.json | Removes legacy props from generated API docs JSON. |
| docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md | Adds v9 migration notes for the removed props. |
Comments suppressed due to low confidence (1)
packages/mui-material/src/Accordion/Accordion.test.js:252
- Now that the legacy
TransitionComponent/TransitionPropsprops are removed, it would be good to add a regression test asserting they are not forwarded to the DOM (e.g., rendering<Accordion TransitionComponent={...} />should not set aTransitionComponentattribute on the root). This will catch accidental reintroductions of React unknown-prop warnings while still allowing apps to upgrade incrementally.
describe('slotProps.transition', () => {
it('should apply properties to the Transition component', () => {
render(
<Accordion slotProps={{ transition: { 'data-testid': 'transition-testid' } }}>
{minimalChildren}
</Accordion>,
);
expect(screen.getByTestId('transition-testid')).not.to.equal(null);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
0e8b4ba to
1b6f975
Compare
siriwatknp
reviewed
Mar 16, 2026
37 tasks
1b6f975 to
b3474b2
Compare
siriwatknp
approved these changes
Mar 16, 2026
ZeeshanTamboli
approved these changes
Mar 16, 2026
siriwatknp
pushed a commit
to siriwatknp/material-ui
that referenced
this pull request
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes accordion deprecated props, the changes are done by agent.