[Hierarchies-react]: move to MUI#1425
Conversation
🦋 Changeset detectedLatest commit: d3ff108 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR migrates @itwin/presentation-hierarchies-react’s StrataKit-based renderers from @stratakit/bricks / @stratakit/foundations UI primitives to MUI (@mui/material) via @stratakit/mui, and updates the monorepo dependency graph and tests accordingly.
Changes:
- Add MUI /
@stratakit/muidependencies and update pnpm catalogs/lockfile to new StrataKit versions. - Replace several StrataKit UI primitives (buttons, text, inputs, menus, spinner) with MUI equivalents in the Stratakit renderers.
- Adjust component tests and Vitest browser config for the new UI stack.
Reviewed changes
Copilot reviewed 11 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bumps Stratakit catalog versions and adds @stratakit/mui to the catalog. |
| pnpm-lock.yaml | Lockfile refresh reflecting the new MUI + Stratakit dependency graph. |
| packages/hierarchies-react/vitest.config.ts | Ensures Vitest browser pre-bundles @mui/material for component tests. |
| packages/hierarchies-react/src/test/components/TreeRenderer.test.tsx | Tweaks rendering/viewport sizing for context-menu visibility assertions. |
| packages/hierarchies-react/src/test/components/RenderUtils.tsx | Switches test theme root provider from @stratakit/foundations to @stratakit/mui. |
| packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeNodeRenderer.tsx | Replaces dropdown/context menu and label editor UI with MUI components. |
| packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeAction.tsx | Renders context-menu actions using MUI MenuItem + @stratakit/mui Icon. |
| packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/RootErrorRenderer.tsx | Replaces error UI primitives with MUI equivalents. |
| packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/ErrorItemRenderer.tsx | Replaces link/text primitives with MUI Link/Typography. |
| packages/hierarchies-react/package.json | Updates dependencies/peers to MUI + @stratakit/mui and drops old optional peers. |
| apps/test-app/frontend/package.json | Adds MUI + @stratakit/mui so the test app can consume the updated renderers. |
| .changeset/early-facts-hide.md | Adds a changeset documenting the migration and peer dependency changes. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Co-authored-by: MartynasStrazdas <43886789+MartynasStrazdas@users.noreply.github.com>
Co-authored-by: MartynasStrazdas <43886789+MartynasStrazdas@users.noreply.github.com>
|
Looks like config for TypeScript is missing https://github.com/iTwin/stratakit/tree/main/packages/mui#typescript |
Added, |
grigasp
left a comment
There was a problem hiding this comment.
Just to clarify, this has no breaking changes besides peer deps?
Because we still use the tree from structures and have primarily replaced the stratakit/bricks components to MUI, there was no need for any api changes. |
|
/update-screenshots |
Co-authored-by: MartynasStrazdas <43886789+MartynasStrazdas@users.noreply.github.com>
| // `aria-required-children` is being triggered because anchor element of context menu is rendered next to `treeitem` under `tree` and | ||
| // it expects that `tree` contains only `treeitem` children. | ||
| await expect.element(page.getByText("Context Action 2")).toBeVisible(); | ||
| await validateSnapshot(locator, { skipA11y: ["aria-hidden-focus", "aria-required-children"] }); |
There was a problem hiding this comment.
can you check if we still need skipA11y?
There was a problem hiding this comment.
Seems to no longer be needed, removed.
There was a problem hiding this comment.
There're a couple more usages of skipA11y in this test file - are they required?


No description provided.