Skip to content

build: upgrade material-table to v8 - #1710

Draft
shivoomiess wants to merge 2 commits into
fix/frontend-effect-dependenciesfrom
build/frontend-material-table-8
Draft

build: upgrade material-table to v8#1710
shivoomiess wants to merge 2 commits into
fix/frontend-effect-dependenciesfrom
build/frontend-material-table-8

Conversation

@shivoomiess

@shivoomiess shivoomiess commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request upgrades the @material-table/core package from version 6.4.4 to 8.0.3 in our frontend application.

Motivation and Context

This upgrade is required to keep our dependencies up-to-date, ensure we benefit from the latest features, improvements, and bug fixes provided by the package. It also helps in maintaining the overall health and security of our codebase.

Changes

  • The @material-table/core version in package-lock.json has been updated to ^8.0.3.
  • Removed dependencies and peer dependencies that are no longer needed with the upgraded version of @material-table/core.
  • Updated the resolved URL and integrity hash for the @material-table/core package.

These changes have been thoroughly tested to ensure that they do not introduce any breaking changes or negatively impact the functionality of our application.

How Has This Been Tested?

Fixes Jira Issue

https://jira.ess.eu//browse/

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@shivoomiess shivoomiess changed the title build/frontend material table 8 build: upgrade material-table to v8 Aug 5, 2026
@shivoomiess shivoomiess closed this Aug 5, 2026
@shivoomiess shivoomiess reopened this Aug 5, 2026
@shivoomiess
shivoomiess force-pushed the build/frontend-material-table-8 branch from 4ca8a8f to 42d5454 Compare August 6, 2026 08:47
@shivoomiess
shivoomiess force-pushed the build/frontend-material-table-8 branch from 42d5454 to 2bce325 Compare August 6, 2026 09:20
@shivoomiess
shivoomiess force-pushed the build/frontend-material-table-8 branch from 2bce325 to 1b76c81 Compare August 6, 2026 11:41
The exact `6.4.4` pin existed because the package was built against MUI v5 and
could not be moved without moving MUI. v8 targets `@mui/material ^9.2.0`,
`@mui/x-date-pickers ^9.10.0` and `@hello-pangea/dnd ^18.0.1`, all of which the
earlier layers of this stack already satisfy, so the pin becomes a normal range.

Removes three coupled workarounds:

- **The nested MUI v5 tree.** 6.4.4 dragged in its own `@mui/material@5.18.0` and
  `@mui/x-date-pickers@6.20.2`, which produced the standing
  `@mui/system@9.2.0 deduped invalid: "^5.8.0"` peer conflict. `npm ls @mui/system`
  is now a single 9.2.0.
- **The Vite `DeleteOutline` alias.** 6.4.4 imported an icon name removed in
  @mui/icons-material v9; v8 imports `DeleteOutlined` directly.
- **The `@types/react` / `@types/react-dom` overrides.** Those were added in the
  React 19 commit purely because material-table pinned `@types/react@18.3.31`
  alongside ours. v8 has no `@types/react` dependency, so there is a single copy
  without forcing one.

All 19 type errors had one cause: MUI v9 removed `inputProps` from Checkbox in
favour of `slotProps.input`, and v8 types `selectionProps` / `headerSelectionProps`
as MUI v9 `CheckboxProps`. The v9 prop sweep on `chore/mui-upgrade-pt1` could not
reach these, because 6.4.4 typed them against MUI v5 and they silently type-checked.
22 sites migrated. Other `inputProps` uses - `min`/`max` on number inputs, and
`slotProps.input.inputProps` - are untouched and still correct.

Side effect worth recording: the vendor chunk drops from 4,084 kB to 3,385 kB
(gzip 1,274 kB to 1,093 kB), which is the duplicated MUI v5 tree going away.

Two expectations this upgrade did *not* meet, recorded so they are not assumed again:

- **The `forwardRef` wrappers in `materialIcons.tsx` still have to stay.** v8's
  `Icons` type still declares every icon as
  `ForwardRefExoticComponent<any> & RefAttributes<SVGSVGElement>`, which an
  ordinary function component does not satisfy.
- **The 5 deferred `react-hooks/exhaustive-deps` warnings are still there.** v8
  did not rewrite those components. `useExpandCollapseAll` keeps working because
  `MaterialTable` is still `class extends React.Component` with a `dataManager`
  field, and rows still carry `tableData` - but it is still reaching into
  internals through an `any` ref, which no type will protect.

`zustand` resolves to a nested 5.0.14 for material-table while reactflow keeps
4.5.2 at the top level; the two stores are independent.

`tsc --noEmit`, `eslint` and `vite build` pass. Not exercised at runtime.
`npm ci` warned on every clean install:

    peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from use-sync-external-store@1.2.0
    node_modules/zustand/node_modules/use-sync-external-store

The chain is reactflow@11 -> @reactflow/* -> zustand -> use-sync-external-store.
zustand up to 4.5.4 pinned that dependency at exactly `1.2.0`, whose peer range
predates React 19. **zustand 4.5.6 changed the pin to the range `^1.2.2`**, and
4.5.7 is already inside reactflow's declared `^4.4.1` - the lockfile was simply
holding a stale 4.5.2. Updating within the existing range resolves
use-sync-external-store to 1.6.0, which declares React 19 support.

No `overrides` entry and no dependency migration: the range already allowed the
fix. A clean `npm ci` is now silent - zero warnings, no ERESOLVE.

Worth recording, because it is the obvious-looking fix and it is wrong:
**migrating reactflow to @xyflow/react would not have solved this.** v12.11.2
still declares `zustand ^4.4.0`, so it lands on the same 4.x line. Only
@material-table/core v8 is on zustand 5, which dropped the
use-sync-external-store dependency entirely because React has the hook built in.

The warning was cosmetic rather than a latent crash. The shim picks React's own
implementation when it exists (`React.useSyncExternalStore !== undefined ?
React.useSyncExternalStore : shim`), so on React 19 its body is dead code. That
matters because the 1.2.0 shim reads
`React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` at module scope, which
React 19 renamed and no longer exports - had anything reached its `error()` path,
`printWarning` would have thrown on `undefined`.

Committed on this branch rather than the React 19 one, where the peer conflict
originates, because the resolution is computed against the final dependency tree
including material-table v8's zustand 5.
@shivoomiess
shivoomiess force-pushed the build/frontend-material-table-8 branch from 1b76c81 to 79c511d Compare August 10, 2026 12:22
@shivoomiess shivoomiess added dependencies Pull requests that update a dependency file review: please labels Aug 20, 2026
@yoganandaness
yoganandaness marked this pull request as ready for review August 21, 2026 08:29
@yoganandaness
yoganandaness requested a review from a team as a code owner August 21, 2026 08:29
@yoganandaness
yoganandaness requested review from ellen-wright and removed request for a team August 21, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants