Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions apps/learning-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@
"@itwin/presentation-common": "^5.11.2",
"@itwin/presentation-components": "^6.0.0",
"@itwin/presentation-frontend": "^5.11.2",
"@itwin/presentation-hierarchies": "2.0.0-alpha.15",
"@itwin/presentation-shared": "2.0.0-alpha.10",
"@itwin/presentation-hierarchies": "2.0.0-alpha.16",
"@itwin/presentation-shared": "2.0.0-alpha.11",
"@itwin/property-grid-react": "workspace:*",
"@itwin/quantity-formatting-react": "workspace:*",
"@itwin/tree-widget-react": "workspace:*",
"@itwin/unified-selection": "^1.7.3",
"@stratakit/foundations": "^0.4.8",
"@itwin/unified-selection": "1.8.1-alpha.0",
"@mui/material": "^9.0.0",
"@stratakit/mui": "^0.5.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
Expand Down
915 changes: 767 additions & 148 deletions apps/learning-snippets/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ describe("Tree widget", () => {
classHierarchyInspector: imodelAccess,
hierarchy: {
// For root nodes, select all BisCore.GeometricModel3d instances
rootNodes: async ({ nodeSelectClauseFactory, instanceLabelSelectClauseFactory }) => [
rootNodes: async ({ createSelectClause }) => [
{
fullClassName: "BisCore.GeometricModel3d",
query: {
ecsql: `
SELECT
${await nodeSelectClauseFactory.createSelectClause({
${await createSelectClause({
ecClassId: { selector: "this.ECClassId" },
ecInstanceId: { selector: "this.ECInstanceId" },
nodeLabel: {
selector: await instanceLabelSelectClauseFactory.createSelectClause({ classAlias: "this", className: "BisCore.GeometricModel3d" }),
of: { classAlias: "this", className: "BisCore.GeometricModel3d" },
},
})}
FROM BisCore.GeometricModel3d this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ describe("Tree widget", () => {
classHierarchyInspector: imodelAccess,
hierarchy: {
// For root nodes, select all BisCore.GeometricModel3d instances
rootNodes: async ({ nodeSelectClauseFactory, instanceLabelSelectClauseFactory }) => [
rootNodes: async ({ createSelectClause }) => [
{
fullClassName: "BisCore.GeometricModel3d",
query: {
ecsql: `
SELECT
${await nodeSelectClauseFactory.createSelectClause({
${await createSelectClause({
ecClassId: { selector: "this.ECClassId" },
ecInstanceId: { selector: "this.ECInstanceId" },
nodeLabel: {
selector: await instanceLabelSelectClauseFactory.createSelectClause({ classAlias: "this", className: "BisCore.GeometricModel3d" }),
of: { classAlias: "this", className: "BisCore.GeometricModel3d" },
},
})}
FROM BisCore.GeometricModel3d this
Expand Down
12 changes: 4 additions & 8 deletions apps/learning-snippets/src/test/tree-widget/TestUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BeEvent } from "@itwin/core-bentley";
import { PerModelCategoryVisibility } from "@itwin/core-frontend";
import { SchemaContext } from "@itwin/ecschema-metadata";
import { ECSchemaRpcLocater } from "@itwin/ecschema-rpcinterface-common";
import { Root } from "@stratakit/foundations";
import { Root } from "@stratakit/mui";
import { render as rtlRender } from "@testing-library/react";
// __PUBLISH_EXTRACT_START__ TreeWidget.TreeWidgetInitializeImports
import { TreeWidget } from "@itwin/tree-widget-react";
Expand All @@ -20,18 +20,14 @@ import type { IModelConnection, ScreenViewport, Viewport } from "@itwin/core-fro
import type { RenderOptions, RenderResult } from "@testing-library/react";

/**
* Wraps rendered tree components with the StrataKit `Root` context that the tree widget components require.
* Wraps rendered tree components with the StrataKit MUI `Root` context that the tree widget components require.
*/
function TreeWidgetTestWrapper({ children }: PropsWithChildren<unknown>) {
return (
<Root colorScheme="light" density="dense">
{children}
</Root>
);
return <Root colorScheme="light">{children}</Root>;
}

/**
* Custom `render` that always wraps the rendered UI with the StrataKit `Root` context required by the tree
* Custom `render` that always wraps the rendered UI with the StrataKit MUI `Root` context required by the tree
* widget components. All other `@testing-library/react` utilities are re-exported below, so tests can import
* everything (`render`, `waitFor`, `cleanup`, ...) from this module.
*/
Expand Down
12 changes: 5 additions & 7 deletions apps/performance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
"@itwin/eslint-plugin": "^6.1.0",
"@itwin/presentation-backend": "^5.9.1",
"@itwin/presentation-common": "^5.9.1",
"@itwin/presentation-core-interop": "2.0.0-alpha.1",
"@itwin/presentation-core-interop": "2.0.0-alpha.2",
"@itwin/presentation-frontend": "^5.9.1",
"@itwin/presentation-hierarchies": "2.0.0-alpha.15",
"@itwin/presentation-shared": "2.0.0-alpha.10",
"@itwin/presentation-hierarchies": "2.0.0-alpha.16",
"@itwin/presentation-shared": "2.0.0-alpha.11",
"@itwin/tree-widget-react": "workspace:*",
"@itwin/unified-selection": "1.7.1-alpha.0",
"@stratakit/bricks": "^0.5.4",
"@stratakit/foundations": "^0.4.8",
"@itwin/unified-selection": "1.8.1-alpha.0",
"@stratakit/foundations": "^0.4.9",
"@stratakit/icons": "^0.3.1",
"@stratakit/structures": "^0.5.7",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
Expand Down
Loading
Loading