Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f68e3ba
initial
MartynasStrazdas Jul 2, 2026
8141849
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 3, 2026
be2238d
adjustments to context menu
MartynasStrazdas Jul 3, 2026
f1fd456
update button sizes
MartynasStrazdas Jul 3, 2026
19ee22d
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 3, 2026
44aa53e
fix context window behavior
MartynasStrazdas Jul 9, 2026
7bfd1cd
change
MartynasStrazdas Jul 9, 2026
f9514b1
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 9, 2026
7eb4597
fixes
MartynasStrazdas Jul 9, 2026
9364d1d
fixes
MartynasStrazdas Jul 9, 2026
cf198d2
update to use catalog
MartynasStrazdas Jul 9, 2026
6724fc8
lock file update
MartynasStrazdas Jul 9, 2026
ac9cc23
rerender all component tests
MartynasStrazdas Jul 9, 2026
1653e5b
fixes
MartynasStrazdas Jul 9, 2026
ee6683d
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 9, 2026
2c66480
test: update visual regression screenshots
imodeljs-admin Jul 9, 2026
57a5253
define our own onClick
MartynasStrazdas Jul 9, 2026
af2fe9d
use Menu for context window
MartynasStrazdas Jul 10, 2026
5d3d9a2
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 10, 2026
b69f666
test: update visual regression screenshots
imodeljs-admin Jul 10, 2026
fceb885
chore: add types for @stratakit/mui in tsconfig files
MartynasStrazdas Jul 13, 2026
70ea14d
fix lint issues because of the addition of types from stratakit
MartynasStrazdas Jul 13, 2026
d358a13
format
MartynasStrazdas Jul 13, 2026
35a90f4
test: update visual regression screenshots
imodeljs-admin Jul 13, 2026
666055e
spinner size adjustment
MartynasStrazdas Jul 13, 2026
d3ff108
remove itwin ui from test app stateless tree
MartynasStrazdas Jul 13, 2026
6801de9
Merge branch 'next' into mast/move-to-MUI
MartynasStrazdas Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/early-facts-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@itwin/presentation-hierarchies-react": minor
Comment thread
MartynasStrazdas marked this conversation as resolved.
---

Moved the package to use `@mui/material` and `@stratakit/mui`.

**Breaking:** Removed `@stratakit/foundations`, `@stratakit/icons` optional peer dependencies. Added `@mui/material` and `@stratakit/mui` as optional peer dependencies.
Comment thread
MartynasStrazdas marked this conversation as resolved.
3 changes: 2 additions & 1 deletion apps/test-app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
"@itwin/unified-selection": "workspace:*",
"@itwin/unified-selection-react": "workspace:*",
"@rolldown/plugin-babel": "catalog:build-tools",
"@stratakit/foundations": "catalog:stratakit",
"@mui/material": "catalog:stratakit",
"@stratakit/icons": "catalog:stratakit",
"@stratakit/mui": "catalog:stratakit",
"@stratakit/structures": "catalog:stratakit",
"@tanstack/react-table": "^8.21.3",
"@test-app/common": "workspace:*",
Expand Down
57 changes: 26 additions & 31 deletions apps/test-app/frontend/src/components/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { createECSchemaProvider, createECSqlQueryExecutor, createIModelKey } fro
import { createCachingECClassHierarchyInspector } from "@itwin/presentation-shared";
import { createHiliteSetProvider, enableUnifiedSelectionSyncWithIModel } from "@itwin/unified-selection";
import { UnifiedSelectionContextProvider } from "@itwin/unified-selection-react";
import { Root } from "@stratakit/foundations";
import { Root } from "@stratakit/mui";
import { MyAppFrontend } from "../../frontendApi/MyAppFrontend";
import { IModelSelector } from "../imodel-selector/IModelSelector";
import { PropertiesWidget } from "../properties-widget/PropertiesWidget";
Expand Down Expand Up @@ -166,37 +166,32 @@ export function App() {
}, [state.imodel]);

return (
<ThemeProvider
theme={"light"}
future={{ themeBridge: true }}
as={Root}
colorScheme={"light"}
synchronizeColorScheme
density="dense"
>
<UnifiedSelectionContextProvider storage={MyAppFrontend.selectionStorage}>
<div className="app">
<div className="app-header">
<h2>{IModelApp.localization.getLocalizedString("Sample:welcome-message")}</h2>
</div>
<div className="app-pickers">
<IModelSelector onIModelSelected={onIModelSelected} activeIModelPath={state.imodelPath} />
<RulesetSelector onRulesetSelected={onRulesetSelected} activeRulesetId={state.rulesetId} />
<UnitSystemSelector
selectedUnitSystem={state.activeUnitSystem}
onUnitSystemSelected={onUnitSystemSelected}
/>
<ToggleSwitch
label="Persist settings"
labelPosition="right"
checked={state.persistSettings}
onChange={onPersistSettingsValueChange}
/>
<Root colorScheme={"light"}>
Comment thread
saskliutas marked this conversation as resolved.
Outdated
<ThemeProvider theme={"light"} future={{ themeBridge: true }}>
<UnifiedSelectionContextProvider storage={MyAppFrontend.selectionStorage}>
<div className="app">
<div className="app-header">
<h2>{IModelApp.localization.getLocalizedString("Sample:welcome-message")}</h2>
</div>
<div className="app-pickers">
<IModelSelector onIModelSelected={onIModelSelected} activeIModelPath={state.imodelPath} />
<RulesetSelector onRulesetSelected={onRulesetSelected} activeRulesetId={state.rulesetId} />
<UnitSystemSelector
selectedUnitSystem={state.activeUnitSystem}
onUnitSystemSelected={onUnitSystemSelected}
/>
<ToggleSwitch
label="Persist settings"
labelPosition="right"
checked={state.persistSettings}
onChange={onPersistSettingsValueChange}
/>
</div>
{state.imodel ? <IModelComponents imodel={state.imodel} rulesetId={state.rulesetId} /> : null}
</div>
{state.imodel ? <IModelComponents imodel={state.imodel} rulesetId={state.rulesetId} /> : null}
</div>
</UnifiedSelectionContextProvider>
</ThemeProvider>
</UnifiedSelectionContextProvider>
</ThemeProvider>
</Root>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { ModelsTreeDefinition } from "@itwin/presentation-models-tree";
import { createCachingECClassHierarchyInspector } from "@itwin/presentation-shared";
import { Selectable, Selectables } from "@itwin/unified-selection";
import { useUnifiedSelectionContext } from "@itwin/unified-selection-react";
import { Icon } from "@stratakit/foundations";
import { Icon } from "@stratakit/mui";
import { MyAppFrontend } from "../../frontendApi/MyAppFrontend";
import { TreeRendererWithFilterAction } from "./TreeRendererWithFilterAction";

Expand Down
14 changes: 7 additions & 7 deletions packages/hierarchies-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@itwin/presentation-hierarchies": "workspace:*",
"@itwin/presentation-shared": "workspace:*",
"@itwin/unified-selection": "workspace:^",
"@stratakit/bricks": "catalog:stratakit",
"@stratakit/icons": "catalog:stratakit",
"@stratakit/structures": "catalog:stratakit",
"@tanstack/react-virtual": "^3.13.24",
"classnames": "catalog:react",
Expand All @@ -76,25 +76,25 @@
"rxjs": "catalog:rxjs"
},
"peerDependencies": {
"@stratakit/foundations": "^0.4.7",
"@stratakit/icons": "^0.3.1",
"@mui/material": "^9.0.0",
"@stratakit/mui": "^0.5.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@stratakit/foundations": {
"@mui/material": {
"optional": true
},
"@stratakit/icons": {
"@stratakit/mui": {
"optional": true
}
},
"devDependencies": {
"@itwin/build-tools": "catalog:build-tools",
"@itwin/eslint-plugin": "catalog:build-tools",
"@mui/material": "catalog:stratakit",
"@rolldown/plugin-babel": "catalog:build-tools",
"@stratakit/foundations": "catalog:stratakit",
"@stratakit/icons": "catalog:stratakit",
"@stratakit/mui": "catalog:stratakit",
"@testing-library/dom": "catalog:test-tools",
"@testing-library/react": "catalog:test-tools",
"@testing-library/user-event": "catalog:test-tools",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/

import { Anchor, Text } from "@stratakit/bricks";
import { Link, Typography } from "@mui/material";
import { unstable_ErrorRegion as ErrorRegion } from "@stratakit/structures";
import { MAX_LIMIT_OVERRIDE } from "../internal/Utils.js";
import { useTranslation } from "../LocalizationContext.js";
Expand Down Expand Up @@ -123,11 +123,11 @@ function ErrorItemContainer({ treeNode, message, actions, scrollToElement }: Err
actions={actions
?.filter(({ condition }) => condition())
.map(({ label, action }) => (
<Text key={label} variant="body-sm">
<Anchor onClick={action} render={<button />}>
<Typography key={label} variant="caption" component="span" sx={{ display: "block" }}>
Comment thread
saskliutas marked this conversation as resolved.
Outdated
<Link component="button" type="button" onClick={action}>
{label}
</Anchor>
</Text>
</Link>
</Typography>
))}
/>
);
Expand All @@ -146,9 +146,15 @@ function MessageWithLink({ linkLabel, scrollToElement, message }: MessageWithLin
return (
<div>
{firstPart}{" "}
<Anchor onClick={scrollToElement} render={<button />}>
<Link
component="button"
type="button"
onClick={scrollToElement}
variant="caption"
sx={{ verticalAlign: "baseline" }}
Comment thread
saskliutas marked this conversation as resolved.
Outdated
>
{linkLabel}
</Anchor>
</Link>
{secondPart ? " " : ""}
{secondPart ? secondPart : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/

import { Button, Text } from "@stratakit/bricks";
import { Icon } from "@stratakit/foundations";
import { Button, Typography } from "@mui/material";
import { Icon } from "@stratakit/mui";
import { useTranslation } from "../LocalizationContext.js";

import errorSvg from "@stratakit/icons/status-error.svg";
Expand Down Expand Up @@ -73,14 +73,14 @@ function RootErrorContainer({ actions, message }: RootErrorContainerProps) {
}}
>
<Icon href={errorSvg} size="large" />
<Text variant={"body-sm"} style={{ textAlign: "center" }}>
<Typography variant="caption" style={{ textAlign: "center" }}>
{message}
</Text>
</Typography>
{actions
?.filter(({ condition }) => condition())
.map((action) => {
return (
<Button key={action.label} onClick={() => action.action()}>
<Button key={action.label} onClick={() => action.action()} size="small">
{action.label}
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
*--------------------------------------------------------------------------------------------*/

import { memo } from "react";
import { DropdownMenu, Tree } from "@stratakit/structures";
import { ListItemIcon, MenuItem, Typography } from "@mui/material";
import { Icon } from "@stratakit/mui";
import { Tree } from "@stratakit/structures";

import type React from "react";
import type { ComponentPropsWithoutRef, NamedExoticComponent } from "react";

/**
Expand Down Expand Up @@ -63,7 +66,13 @@ export const TreeActionBase: NamedExoticComponent<TreeActionBaseProps> = memo(fu
}

if (variant === "context-menu") {
return <DropdownMenu.Item {...actionProps} />;
const { label, icon, onClick } = actionProps;
return (
<MenuItem dense onClick={onClick as unknown as React.MouseEventHandler<HTMLLIElement>}>
Comment thread
saskliutas marked this conversation as resolved.
Outdated
{icon ? <ListItemIcon>{typeof icon === "string" ? <Icon href={icon} /> : icon}</ListItemIcon> : null}
<Typography variant="caption">{label}</Typography>
</MenuItem>
);
}

return <Tree.ItemAction {...actionProps} dot={dot} visible={variant === "inline" ? visible : undefined} />;
Expand Down
Loading
Loading