[Tree-widget]: update hierarchies to 16 - #1754
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the tree-widget codebase to work with @itwin/presentation-hierarchies@2.0.0-alpha.16 (and related packages), including the API shift from nodeSelectClauseFactory / instanceLabelSelectClauseFactory to createSelectClause / createFilterClauses, plus corresponding dependency bumps and snippet/doc updates.
Changes:
- Migrated multiple hierarchy definitions to the updated select/filter clause APIs.
- Updated docs and learning-snippet tests to the new hierarchy-definition callback shape.
- Bumped
@itwin/presentation-*and@itwin/unified-selectiondependency versions and refreshed lockfiles.
Reviewed changes
Copilot reviewed 14 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/tree-widget/src/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.ts | Migrates models tree query-building to createSelectClause / createFilterClauses and updated label clause shape. |
| packages/tree-widget/src/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.ts | Same migration for iModel content tree hierarchy queries. |
| packages/tree-widget/src/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeDefinition.ts | Updates query-building API usage and introduces a local label select-clause factory for composite labels. |
| packages/tree-widget/src/tree-widget-react/components/trees/common/components/TreeNodeVisibilityButton.tsx | Adjusts TreeActionBase usage for the disabled/loading state. |
| packages/tree-widget/src/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeDefinition.ts | Migrates classifications tree query-building to new clause APIs. |
| packages/tree-widget/src/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.ts | Migrates categories tree query-building to new clause APIs and updates helper type usage. |
| packages/tree-widget/README.md | Updates examples to the new createSelectClause / nodeLabel.of pattern. |
| packages/tree-widget/package.json | Bumps tree-widget runtime deps to the newer @itwin/presentation-* / unified-selection alpha versions. |
| packages/tree-widget/pnpm-lock.yaml | Lockfile refresh reflecting updated dependency graph. |
| packages/test-utilities/package.json | Bumps @itwin/presentation-shared alpha version. |
| packages/test-utilities/pnpm-lock.yaml | Lockfile refresh for test-utilities dependency bump. |
| apps/test-viewer/package.json | Bumps @itwin/presentation-* and unified-selection alpha versions. |
| apps/test-viewer/pnpm-lock.yaml | Lockfile refresh reflecting updated dependency graph. |
| apps/performance-tests/package.json | Bumps @itwin/presentation-* and unified-selection alpha versions. |
| apps/performance-tests/pnpm-lock.yaml | Lockfile refresh reflecting updated dependency graph. |
| apps/learning-snippets/src/test/tree-widget/CustomVisibilityTree.test.tsx | Updates snippet test to new hierarchy-definition API shape. |
| apps/learning-snippets/src/test/tree-widget/CustomTree.test.tsx | Updates snippet test to new hierarchy-definition API shape. |
| apps/learning-snippets/package.json | Bumps @itwin/presentation-* and unified-selection alpha versions. |
| apps/learning-snippets/pnpm-lock.yaml | Lockfile refresh reflecting updated dependency graph. |
Files not reviewed (5)
- apps/learning-snippets/pnpm-lock.yaml: Generated file
- apps/performance-tests/pnpm-lock.yaml: Generated file
- apps/test-viewer/pnpm-lock.yaml: Generated file
- packages/test-utilities/pnpm-lock.yaml: Generated file
- packages/tree-widget/pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)
packages/tree-widget/pnpm-lock.yaml:1495
- The dependency graph is now pulling in both @stratakit/icons@0.3.1 and @stratakit/icons@0.4.2. Keeping two minor lines of a 0.x package can increase bundle size and risk subtle asset-path differences; it’s better to align the workspace on a single
@stratakit/iconsversion (and update peer/dev ranges accordingly) before regenerating the lockfile.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Tree-Widget Next benchmark
| Benchmark suite | Current: c53c845 | Previous: 9ab33ea | Deviation | Status |
|---|---|---|---|---|
models tree 50k 3D elements search > get search paths |
866 ms |
1326 ms |
-34.69% |
✅ |
models tree 50k 3D elements search > get search paths (P95 of main thread blocks) |
45 ms |
50 ms |
-10% |
〰️ |
models tree 50k 3D elements search > load hierarchy from search paths |
99109 ms |
115619 ms |
-14.28% |
✅ |
models tree 50k 3D elements search > load hierarchy from search paths (P95 of main thread blocks) |
30 ms |
38 ms |
-21.05% |
〰️ |
models tree 50k categories > collect nodes |
2341 ms |
2961 ms |
-20.94% |
✅ |
models tree 50k categories > collect nodes (P95 of main thread blocks) |
99 ms |
107 ms |
-7.48% |
〰️ |
models tree 50k categories > validate initial visibility |
1503 ms |
1790 ms |
-16.03% |
✅ |
models tree 50k categories > validate initial visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k categories > change visibility |
179 ms |
203 ms |
-11.82% |
〰️ |
models tree 50k categories > change visibility (P95 of main thread blocks) |
68 ms |
57 ms |
19.30% |
〰️ |
models tree 50k categories > validate changed visibility |
1871 ms |
2280 ms |
-17.94% |
✅ |
models tree 50k categories > validate changed visibility (P95 of main thread blocks) |
0 ms |
25 ms |
-100% |
〰️ |
models tree 50k 3D elements > collect nodes |
39249 ms |
47201 ms |
-16.85% |
✅ |
models tree 50k 3D elements > collect nodes (P95 of main thread blocks) |
39 ms |
50 ms |
-22% |
〰️ |
models tree 50k 3D elements > validate initial visibility |
1191 ms |
1384 ms |
-13.95% |
✅ |
models tree 50k 3D elements > validate initial visibility (P95 of main thread blocks) |
27 ms |
0 ms |
2700% |
〰️ |
models tree 50k 3D elements > change model visibility |
84 ms |
110 ms |
-23.64% |
〰️ |
models tree 50k 3D elements > change model visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D elements > validate changed model visibility |
1715 ms |
2163 ms |
-20.71% |
✅ |
models tree 50k 3D elements > validate changed model visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D elements > change category node visibility |
381 ms |
472 ms |
-19.28% |
✅ |
models tree 50k 3D elements > change category node visibility (P95 of main thread blocks) |
37 ms |
43 ms |
-13.95% |
〰️ |
models tree 50k 3D elements > validate changed category visibility |
1300 ms |
1476 ms |
-11.92% |
✅ |
models tree 50k 3D elements > validate changed category visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D elements > validate per-model category override |
1272 ms |
1449 ms |
-12.22% |
✅ |
models tree 50k 3D elements > validate per-model category override (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D elements > change element visibility |
34 ms |
39 ms |
-12.82% |
〰️ |
models tree 50k 3D elements > change element visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D elements > validate changed element visibility |
1767 ms |
2228 ms |
-20.69% |
✅ |
models tree 50k 3D elements > validate changed element visibility (P95 of main thread blocks) |
43 ms |
70 ms |
-38.57% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > collect nodes |
53708 ms |
65769 ms |
-18.34% |
✅ |
models tree 50k 3D child elements with different categories and excluded classes > collect nodes (P95 of main thread blocks) |
71 ms |
55 ms |
29.09% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > validate initial visibility |
1848 ms |
2137 ms |
-13.52% |
✅ |
models tree 50k 3D child elements with different categories and excluded classes > validate initial visibility (P95 of main thread blocks) |
40 ms |
49 ms |
-18.37% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > change visibility |
46 ms |
53 ms |
-13.21% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > change visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D child elements with different categories and excluded classes > validate changed visibility |
4583 ms |
5533 ms |
-17.17% |
✅ |
models tree 50k 3D child elements with different categories and excluded classes > validate changed visibility (P95 of main thread blocks) |
79 ms |
88 ms |
-10.23% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > collect nodes |
54977 ms |
65769 ms |
-16.41% |
✅ |
models tree 50k 3D child elements with different categories and excluded classes > collect nodes (P95 of main thread blocks) |
65 ms |
55 ms |
18.18% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > validate initial visibility |
2130 ms |
2137 ms |
-0.33% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > validate initial visibility (P95 of main thread blocks) |
33 ms |
49 ms |
-32.65% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > change visibility |
52 ms |
53 ms |
-1.89% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > change visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
models tree 50k 3D child elements with different categories and excluded classes > validate changed visibility |
5920 ms |
5533 ms |
6.99% |
〰️ |
models tree 50k 3D child elements with different categories and excluded classes > validate changed visibility (P95 of main thread blocks) |
54 ms |
88 ms |
-38.64% |
〰️ |
categories tree 50k subCategories search > get search paths |
1178 ms |
1715 ms |
-31.31% |
✅ |
categories tree 50k subCategories search > get search paths (P95 of main thread blocks) |
67 ms |
110 ms |
-39.09% |
〰️ |
categories tree 50k subCategories search > load hierarchy from search paths |
4399 ms |
5819 ms |
-24.40% |
✅ |
categories tree 50k subCategories search > load hierarchy from search paths (P95 of main thread blocks) |
41 ms |
58 ms |
-29.31% |
〰️ |
categories tree 50k subCategories > collect nodes |
4697 ms |
6415 ms |
-26.78% |
✅ |
categories tree 50k subCategories > collect nodes (P95 of main thread blocks) |
24 ms |
43 ms |
-44.19% |
〰️ |
categories tree 50k subCategories > validate initial visibility |
870 ms |
986 ms |
-11.76% |
✅ |
categories tree 50k subCategories > validate initial visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
categories tree 50k subCategories > change visibility |
338 ms |
347 ms |
-2.59% |
〰️ |
categories tree 50k subCategories > change visibility (P95 of main thread blocks) |
24 ms |
29 ms |
-17.24% |
〰️ |
categories tree 50k subCategories > validate changed visibility |
954 ms |
1063 ms |
-10.25% |
✅ |
categories tree 50k subCategories > validate changed visibility (P95 of main thread blocks) |
25 ms |
28 ms |
-10.71% |
〰️ |
categories tree 50k categories and excluded classes > collect nodes |
100507 ms |
114664 ms |
-12.35% |
✅ |
categories tree 50k categories and excluded classes > collect nodes (P95 of main thread blocks) |
96 ms |
110 ms |
-12.73% |
〰️ |
categories tree 50k categories and excluded classes > validate initial visibility |
4550 ms |
5218 ms |
-12.80% |
✅ |
categories tree 50k categories and excluded classes > validate initial visibility (P95 of main thread blocks) |
38 ms |
37 ms |
2.70% |
〰️ |
categories tree 50k categories and excluded classes > change visibility |
722 ms |
788 ms |
-8.38% |
〰️ |
categories tree 50k categories and excluded classes > change visibility (P95 of main thread blocks) |
42 ms |
52 ms |
-19.23% |
〰️ |
categories tree 50k categories and excluded classes > validate changed visibility |
4906 ms |
5496 ms |
-10.74% |
✅ |
categories tree 50k categories and excluded classes > validate changed visibility (P95 of main thread blocks) |
32 ms |
38 ms |
-15.79% |
〰️ |
categories tree 50k categories and excluded classes > collect nodes |
102971 ms |
114664 ms |
-10.20% |
✅ |
categories tree 50k categories and excluded classes > collect nodes (P95 of main thread blocks) |
153 ms |
110 ms |
39.09% |
〰️ |
categories tree 50k categories and excluded classes > validate initial visibility |
4868 ms |
5218 ms |
-6.71% |
〰️ |
categories tree 50k categories and excluded classes > validate initial visibility (P95 of main thread blocks) |
32 ms |
37 ms |
-13.51% |
〰️ |
categories tree 50k categories and excluded classes > change visibility |
703 ms |
788 ms |
-10.79% |
✅ |
categories tree 50k categories and excluded classes > change visibility (P95 of main thread blocks) |
40 ms |
52 ms |
-23.08% |
〰️ |
categories tree 50k categories and excluded classes > validate changed visibility |
6613 ms |
5496 ms |
20.32% |
🚨 |
categories tree 50k categories and excluded classes > validate changed visibility (P95 of main thread blocks) |
29 ms |
38 ms |
-23.68% |
〰️ |
classifications tree 50k classifications search > get search paths |
1889 ms |
2521 ms |
-25.07% |
✅ |
classifications tree 50k classifications search > get search paths (P95 of main thread blocks) |
148 ms |
190 ms |
-22.11% |
〰️ |
classifications tree 50k classifications search > load hierarchy from search paths |
54637 ms |
64162 ms |
-14.85% |
✅ |
classifications tree 50k classifications search > load hierarchy from search paths (P95 of main thread blocks) |
0 ms |
27 ms |
-100% |
〰️ |
classifications tree 50k classifications and excluded classes > collect nodes |
25729 ms |
33874 ms |
-24.04% |
✅ |
classifications tree 50k classifications and excluded classes > collect nodes (P95 of main thread blocks) |
75 ms |
99 ms |
-24.24% |
〰️ |
classifications tree 50k classifications and excluded classes > validate initial visibility |
2305 ms |
2846 ms |
-19.01% |
✅ |
classifications tree 50k classifications and excluded classes > validate initial visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
classifications tree 50k classifications and excluded classes > change visibility |
137 ms |
159 ms |
-13.84% |
〰️ |
classifications tree 50k classifications and excluded classes > change visibility (P95 of main thread blocks) |
21 ms |
0 ms |
2100% |
〰️ |
classifications tree 50k classifications and excluded classes > validate changed visibility |
2753 ms |
3484 ms |
-20.98% |
✅ |
classifications tree 50k classifications and excluded classes > validate changed visibility (P95 of main thread blocks) |
47 ms |
98 ms |
-52.04% |
✅ |
classifications tree 50k classifications and excluded classes > collect nodes |
26684 ms |
33874 ms |
-21.23% |
✅ |
classifications tree 50k classifications and excluded classes > collect nodes (P95 of main thread blocks) |
57 ms |
99 ms |
-42.42% |
〰️ |
classifications tree 50k classifications and excluded classes > validate initial visibility |
2262 ms |
2846 ms |
-20.52% |
✅ |
classifications tree 50k classifications and excluded classes > validate initial visibility (P95 of main thread blocks) |
0 ms |
0 ms |
0% |
🟰 |
classifications tree 50k classifications and excluded classes > change visibility |
234 ms |
159 ms |
47.17% |
🚨 |
classifications tree 50k classifications and excluded classes > change visibility (P95 of main thread blocks) |
35 ms |
0 ms |
3500% |
〰️ |
classifications tree 50k classifications and excluded classes > validate changed visibility |
2708 ms |
3484 ms |
-22.27% |
✅ |
classifications tree 50k classifications and excluded classes > validate changed visibility (P95 of main thread blocks) |
46 ms |
98 ms |
-53.06% |
✅ |
This comment was automatically generated by workflow using github-action-benchmark.
saskliutas
reviewed
Jul 29, 2026
saskliutas
approved these changes
Jul 30, 2026
MartynasStrazdas
enabled auto-merge (squash)
July 30, 2026 13:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.