Skip to content

refactor: remove adaptV4Theme, rewrite theme in native MUI v6 syntax#956

Open
EightRice wants to merge 1 commit into
masterfrom
refactor/native-mui-v6-theme
Open

refactor: remove adaptV4Theme, rewrite theme in native MUI v6 syntax#956
EightRice wants to merge 1 commit into
masterfrom
refactor/native-mui-v6-theme

Conversation

@EightRice

Copy link
Copy Markdown
Collaborator

What

Removes the deprecated adaptV4Theme() runtime adapter from src/theme/index.ts and src/theme/legacy.ts and 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

adaptV4Theme copied the v4 overrides object verbatim — it never translated JSS selectors. So every v4 state selector (&$checked, &$active, $checked$checked + &, and state-class keys like active:/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/build and /lite at 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 --noEmit clean
  • production build passes
  • before/after screenshot pass as above — please also check the Netlify deploy preview, especially creator flows, switches, and dialogs

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.
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for tezos-homebase ready!

Name Link
🔨 Latest commit d792f83
🔍 Latest deploy log https://app.netlify.com/projects/tezos-homebase/deploys/6a58aa96841ce7000869cd73
😎 Deploy Preview https://deploy-preview-956--tezos-homebase.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 26 (no change from production)
Accessibility: 91 (no change from production)
Best Practices: 83 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant