[material-ui] Remove unnecessary overridesResolvers from styled components#48204
Merged
sai6855 merged 5 commits intomui:masterfrom Apr 6, 2026
Merged
[material-ui] Remove unnecessary overridesResolvers from styled components#48204sai6855 merged 5 commits intomui:masterfrom
sai6855 merged 5 commits intomui:masterfrom
Conversation
Netlify deploy previewhttps://deploy-preview-48204--material-ui.netlify.app/ Bundle size report
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies Material UI styled slot definitions by removing redundant overridesResolver functions where a slot maps 1:1 to a single styleOverrides key, relying on createStyled’s default slot-based resolver behavior.
Changes:
- Removed redundant
overridesResolverfromTableSortLabel’sIconslot styled component. - Removed redundant
overridesResolverfromStepConnector’sLineslot styled component. - Removed redundant
overridesResolverfromListItem’ssecondaryActionslot andDrawer’sPaperslot styled components.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/mui-material/src/TableSortLabel/TableSortLabel.js | Drops redundant Icon slot overridesResolver so defaults handle styleOverrides.icon. |
| packages/mui-material/src/StepConnector/StepConnector.js | Drops redundant Line slot overridesResolver so defaults handle styleOverrides.line. |
| packages/mui-material/src/ListItem/ListItem.js | Drops redundant secondaryAction slot overridesResolver so defaults handle styleOverrides.secondaryAction. |
| packages/mui-material/src/Drawer/Drawer.js | Drops redundant Paper slot overridesResolver so defaults handle styleOverrides.paper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
defaultOverridesResolver is run for all Material UI styled components, so these become redundant when there is only one style overrides slot.
changes done in this PR are similar to changes in #48082