chore(deps): bump @mui/material 7 -> 9 and @mui/x-date-pickers 8 -> 9#9961
Draft
asheshv wants to merge 1 commit into
Draft
chore(deps): bump @mui/material 7 -> 9 and @mui/x-date-pickers 8 -> 9#9961asheshv wants to merge 1 commit into
asheshv wants to merge 1 commit into
Conversation
Supersedes dependabot #9843 and #9888, which must land together because date-pickers v9 requires @mui/material v9 as a peer. @mui/material skipped v8 on npm (7.x -> 9.x), so only v9's breaking changes apply. ## Manifest changes - @mui/material ^7.3.10 -> ^9.0.0 (resolved 9.0.1) - @mui/icons-material ^7.3.10 -> ^9.0.0 (resolved 9.0.1) - @mui/x-date-pickers ^8.28.3 -> ^9.0.2 (resolved 9.2.0) ## Source changes (98 files, mostly mechanical) 1. Two legacy icon imports renamed (v9 removed these in favor of the *Outlined variants): -import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; +import ErrorOutlineIcon from '@mui/icons-material/ErrorOutlined'; -import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; +import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutlined'; Both in web/pgadmin/static/js/Explain/AIInsights.jsx. 2. `styled(Box)` -> `styled('div')` across 50 files. v9's `Box` stopped filtering CSS-property-named keys (flexDirection, marginLeft, etc.) out of the props it forwarded to the DOM, so any `styled(Box)(({theme}) => ({ flexDirection: 'column', ... }))` leaked those CSS keys to the underlying `<div>` as React props. Using `styled('div')` keeps the CSS-in-JS layer working as expected and removes the now-redundant Box layer (every affected styled wrapper was a pure styling container, not using Box's sx-passthrough or component-swap behavior). 3. Box / Stack / Typography / Link / Grid / DialogContentText / TimelineContent / TimelineOppositeContent system props moved to `sx`. v9 removed individual system-prop syntax from these components; `<Box flexGrow={1}>` is now `<Box sx={{flexGrow: 1}}>`. Applied via the official codemod: npx @mui/codemod@latest v9.0.0/system-props pgadmin 65 files transformed, 6 Jinja-templated `.js` files skipped (parse errors, not real JS; no MUI usage in them). 4. One test updated for v9's class-name split. Button's variant+color combo class (`MuiButton-containedPrimary`) is now emitted as two separate classes (`MuiButton-contained` + `MuiButton-colorPrimary`). web/regression/javascript/components/Buttons.spec.js ## Test plan - [x] `yarn install` resolved cleanly - [x] `yarn run test:js-once` -> 140/0/0 suites, 824/0/0 tests - [x] `yarn run linter` -> clean (silent) - [ ] CI matrix (Linux/Mac/Windows) passes - [ ] Visual sweep of main UI surfaces in `yarn start`: login screen, browser tree, query tool, ERD, schema dialogs (table/function/trigger/index), theme switcher (light/dark/high-contrast), file manager, debugger panel, backup/restore dialogs. ## Notes for reviewers The major risk surface for this PR is not API breakage (all caught by jest) but **visual regression**. v9's "sx prop performance" and "deprecated API cleanup" work shifts a few pixels in places — most notably ListItemIcon spacing (which v9 changed from hardcoded `minWidth` to theme spacing). Worth a careful look at menus and toolbars. The other Box-related changes (system props -> sx) preserve behavior 1:1 — they're a pure syntactic migration. `@mui/x-date-pickers`'s legacy `LocalizationProvider` API was removed, but we already use the modern `dateAdapter={AdapterDateFns}` form in `Theme/index.jsx`, so no change needed there.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
Supersedes dependabot #9843 and #9888, which must land together (date-pickers v9 requires @mui/material v9 as a peer). @mui/material skipped v8 on npm (7.x → 9.x), so only v9's breaking changes apply.
Manifest changes
@mui/material^7.3.10^9.0.0(9.0.1)@mui/icons-material^7.3.10^9.0.0(9.0.1)@mui/x-date-pickers^8.28.3^9.0.2(9.2.0)Source changes (98 files, mostly mechanical)
1. Two legacy icon imports renamed
v9 removed legacy
*Outlineicons in favor of the*Outlinedvariants. Both inweb/pgadmin/static/js/Explain/AIInsights.jsx:2.
styled(Box)→styled('div')across 50 filesIn v9,
Boxstopped filtering CSS-property-named keys (flexDirection,marginLeft,alignItems, etc.) out of the props it forwarded to the DOM. Anystyled(Box)(({theme}) => ({ flexDirection: 'column', ... }))leaked those CSS keys to the underlying<div>as React props, surfacing as a "React does not recognize theflexDirectionprop on a DOM element" warning. Usingstyled('div')keeps the CSS-in-JS layer working unchanged and removes the now-redundant Box layer — every affected styled wrapper was a pure styling container, not using Box's sx-passthrough orcomponent=swap behavior.3. Box system props →
sx(official MUI codemod)v9 removed individual system-prop syntax from
Box,Stack,Typography,Link,Grid,DialogContentText,TimelineContent, andTimelineOppositeContent. Applied via:65 files transformed; 6 Jinja-templated
.jsfiles in templates/ skipped (parse errors, not real JS, no MUI usage).Example transform:
4. One test updated for class-name split
MUI v9 Button no longer emits the combined
MuiButton-containedPrimaryclass. It now emitsMuiButton-containedandMuiButton-colorPrimaryas separate classes. Updatedweb/regression/javascript/components/Buttons.spec.jsaccordingly.Test plan
yarn installresolves cleanlyyarn run test:js-once→ 140/0/0 suites, 824/0/0 testsyarn run linter(web) → clean (silent)yarn startof: login screen, browser tree, query tool, ERD, schema dialogs (table/function/trigger/index), theme switcher (light/dark/high-contrast), file manager, debugger panel, backup/restore dialogs.Notes for reviewers
The major risk surface is visual regression, not API breakage. v9's "sx prop performance" and "deprecated API cleanup" work shifts a few pixels in places — most notably
ListItemIconspacing (changed from hardcodedminWidthto theme spacing). Worth a careful look at menus and toolbars.The other Box-related changes (system props → sx) preserve behavior 1:1 — they're a pure syntactic migration.
@mui/x-date-pickers's legacyLocalizationProviderAPI was removed in v9, but we already use the moderndateAdapter={AdapterDateFns}form inTheme/index.jsx:959, so no change needed there.Supersedes