Skip to content

Migrate MUI system props to sx (fix MUI 9 build break) - #267

Merged
Puturbold merged 1 commit into
mainfrom
fix/mui9-migration
Jun 5, 2026
Merged

Migrate MUI system props to sx (fix MUI 9 build break)#267
Puturbold merged 1 commit into
mainfrom
fix/mui9-migration

Conversation

@Puturbold

Copy link
Copy Markdown
Collaborator

Why

Merging the dependency updates (#265) bumped MUI from v7 to v9, which removed two APIs the app relied on and broke the main build with TypeScript errors:

  • System-style shorthand props passed directly to Box/Typography (display, flexDirection, alignItems, justifyContent, mb, mt, fontWeight, fontFamily, etc.) are no longer accepted — they must go in sx.
  • The Typography paragraph prop was removed.
  • Drawer's PaperProps was replaced by slotProps={{ paper }}.

What

Moved all offending shorthand props into sx and updated the Drawer slot API across:

  • components/organisms/Home.tsx
  • components/organisms/SidePanel.tsx (incl. PaperPropsslotProps, paragraphsx)
  • components/molecules/Slide.tsx
  • components/molecules/SidePanelPercentageModal.tsx
  • pages/about.tsx
  • pages/methodology.tsx

No visual change intended — these are style-prop relocations only.

Verification

  • npx tsc --noEmit: 0 source errors
  • npm run build: ✅ compiles, 12/12 static pages generated

Recommend merging this right after #265 to restore a green main. (The Insights PR #266 also builds red until this lands, since it sits on the MUI 9 main.)

🤖 Generated with Claude Code

MUI 9 removed support for system-style shorthand props passed directly
to Box/Typography (display, flexDirection, alignItems, mb, fontWeight,
fontFamily, etc.) and the Typography `paragraph` prop, which broke the
frontend build with TypeScript errors. Move those styles into `sx`, and
replace Drawer's removed `PaperProps` with `slotProps={{ paper }}`.

No visual change intended. `npm run build` passes (12/12 pages).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Puturbold
Puturbold merged commit 71058e5 into main Jun 5, 2026
1 check passed
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