refactor: remove adaptV4Theme, rewrite theme in native MUI v6 syntax#956
Open
EightRice wants to merge 1 commit into
Open
refactor: remove adaptV4Theme, rewrite theme in native MUI v6 syntax#956EightRice wants to merge 1 commit into
EightRice wants to merge 1 commit into
Conversation
The adaptV4Theme adapter copied v4 overrides verbatim into styleOverrides without translating JSS selectors, so every v4 state selector (&$checked, &$active, $checked$checked + &, state-class keys like active/completed) has been dead CSS since the v6 migration. This rewrite: - converts props -> components.MuiX.defaultProps and overrides -> components.MuiX.styleOverrides in theme/index.ts and theme/legacy.ts - translates v4 JSS selectors to global class equivalents (&$disabled -> &.Mui-disabled etc.), resurrecting the intended styling (visible change: creator stepper active step regains its green fill) - folds state-class keys (active/completed) into their slot as &.Mui-active / &.Mui-completed nested selectors - retypes themeOptions as ThemeOptions (DeprecatedThemeOptions removed) Verified: tsc clean, production build passes, before/after screenshots of /explorer/daos, /creator/build and /lite are pixel-identical except the intended stepper fix.
✅ Deploy Preview for tezos-homebase ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.

What
Removes the deprecated
adaptV4Theme()runtime adapter fromsrc/theme/index.tsandsrc/theme/legacy.tsand rewrites all component overrides in native MUI v6 syntax (components.MuiX.defaultProps/styleOverrides). This clears the second of the three v7 blockers (legacy Grid and @mui/styles remain).Why the diff looks bigger than a mechanical move
adaptV4Themecopied the v4overridesobject verbatim — it never translated JSS selectors. So every v4 state selector (&$checked,&$active,$checked$checked + &, and state-class keys likeactive:/completed:) has been dead CSS since #953 landed. This PR translates them to global-class equivalents (&.Mui-disabled,.Mui-checked.Mui-checked + &, …), which resurrects the originally intended styling.Visual impact
Before/after screenshots of
/explorer/daos,/creator/buildand/liteat 1440x900: pixel-identical except the DAO creator stepper, where the active step icon regains its green fill and full-brightness label (the pre-migration design).Verification
tsc --noEmitclean