Skip to content

[WV-4833] Upgrade to Mui 7, or to the latest version MUI 9 (from MUI 5) - #4923

Open
pravingv wants to merge 1 commit into
wevote:developfrom
pravingv:WV_4833_MUIupgrade9
Open

[WV-4833] Upgrade to Mui 7, or to the latest version MUI 9 (from MUI 5)#4923
pravingv wants to merge 1 commit into
wevote:developfrom
pravingv:WV_4833_MUIupgrade9

Conversation

@pravingv

@pravingv pravingv commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What github.com/wevote/WebApp/issues does this fix?

WV-4833 Upgrade to Mui 7, or to the latest version MUI 9 (from MUI 5)

Changes included this pull request?

Foundation & Package Alignment (package.json):

  • Upgraded @mui/material, @mui/icons-material, @mui/lab, and @mui/styled-engine-sc to ^9.0.0.
  • Upgraded react and react-dom to ~18.3.1.
  • Upgraded styled-components to ~6.1.8, @stripe/react-stripe-js to ^2.5.0, react-toastify to ^10.0.0, and removed obsolete react-hot-loader.
  • Added explicit npm overrides for "@mui/system": "^9.0.0" and "@mui/styled-engine": "^9.0.0" to ensure internal dependency synchronization.

Core Engine & Multi-Engine Theme Alignment (src/index.jsx, src/App.jsx):

  • src/index.jsx: Replaced deprecated ReactDOM.render with React 18 createRoot(container).render(...).
  • src/App.jsx: Implemented Proposal 1 (App-Level Multi-Engine Theme Provider Alignment) by nesting (@mui/styles) and (styled-components) under @mui/material/styles's . This resolved theme.spacing and theme.breakpoints crashes across all legacy and modern styling engines without touching individual components.

Icon Exports & Concurrent Effect Lifecycle Cleanup:

  • Replaced deprecated icon exports across 8 component files (MailOutline -> Mail, DeleteOutline -> DeleteOutlined, PersonOutline -> Person, ChatBubbleOutline -> Comment).
  • Fixed React 18 useEffect cleanup returns in DisplayWhileRetrievingBallot.jsx and ReviewAppModal.jsx: changed return null / return <></> to return undefined to eliminate TypeError: destroy is not a function.

Codebase-Wide Styled-Components Syntax Standardization (96 Files):

  • Converted all 96 styled-components files from unsupported 2nd-argument options syntax (styled('tag', { shouldForwardProp })) to .withConfig({ shouldForwardProp }).
  • Resolved DOM attribute casing and typos: corrected styleid to standard id in BallotTitleHeaderStyles.jsx, and filtered fetchpriority in CampaignCardStyles.jsx while preserving lowercase fetchpriority="high" in JSX per user directive.
  • Filtered custom props across components (showAsLink, hideCardMargins, animate, selected, primary, secondary, size, scrolledDown, padTop, padBottom, desktopMode, leftAlign).

MUI Layout & Form Component API Modernization:

  • Refactored top-level layout props (justifyContent, display, gap, alignItems) into the sx prop on across CardForListBody.jsx, CardForListBodySkeleton.jsx, OrganizationModal.jsx, and PoliticianDetailsEndorsementsSkeleton.jsx.
  • Migrated legacy InputProps on to MUI v9 slotProps={{ input: { ... } }} in VoterPhoneVerificationEntry.jsx and VoterEmailAddressEntry.jsx.
  • Removed invalid icon prop from in TextBox.jsx.
  • Migrated legacy <Dialog ModalProps={{ disableScrollLock: true }}> to standard top-level prop in ShareModal.jsx.
  • Removed unused ContentProps from wrapping in SnackNotifier.jsx.

React PropTypes & Modal State Hardening (35 Modal Files):

  • Audited all modal and dialog components across src/js/ and cast the required open prop on and to Boolean() (open={Boolean(show)}) across 35 modal files to prevent React PropTypes undefined warnings.

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