You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d60ee5e
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(devtools): replace deprecated tree APIs in the component tree
`FlatTreeControl` from `@angular/cdk/tree` and `MatTreeFlattener` from
`@angular/material/tree` are deprecated in favor of the tree's
`levelAccessor`/`childrenAccessor` APIs.
The component tree (directive forest) isn't rendered with a CDK tree but
as a flat list in a virtual scroll viewport. It only used
`FlatTreeControl` to track which nodes are expanded, and
`MatTreeFlattener` to flatten the forest and compute the visible nodes.
Replace them with:
- An `ExpansionModel` that tracks expanded nodes with a
`SelectionModel`, like `FlatTreeControl` did internally, and exposes
the `expand`, `collapse`, `toggle`, `isExpanded` and `changed` members
used by devtools.
- Local helpers in `ComponentDataSource` that flatten the forest in
depth-first order and return the nodes whose ancestors are all
expanded, matching the previous behavior.
Also add a spec covering which nodes are visible as nodes are expanded
and collapsed.
Copy file name to clipboardExpand all lines: devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/BUILD.bazel
Copy file name to clipboardExpand all lines: devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/component-data-source.spec.ts
+28-6Lines changed: 28 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,12 @@
6
6
* found in the LICENSE file at https://angular.dev/license
Copy file name to clipboardExpand all lines: devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/index.ts
Copy file name to clipboardExpand all lines: devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/directive-forest-utils.ts
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,8 @@
6
6
* found in the LICENSE file at https://angular.dev/license
Copy file name to clipboardExpand all lines: devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/directive-forest.component.html
0 commit comments