Skip to content

Commit fd365a8

Browse files
committed
refactor(devtools): abstract and reuse the tree visualizer
Abstract the injector tree visualizer so it can be used for both the Injector Tree and Router Tree tabs without having to rely on separate identical implementations.
1 parent f849803 commit fd365a8

24 files changed

+2031
-2099
lines changed

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/BUILD.bazel

Lines changed: 0 additions & 16 deletions
This file was deleted.

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/injector-tree-visualizer.ts

Lines changed: 0 additions & 306 deletions
This file was deleted.

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ ng_project(
6363
"//:node_modules/rxjs",
6464
"//devtools/projects/ng-devtools/src/lib/application-environment:application-environment_rjs",
6565
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager_rjs",
66-
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection:injector_tree_visualizer_rjs",
67-
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path:resolution-path_rjs",
6866
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest:index-forest_rjs",
6967
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver:property-resolver_rjs",
68+
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/resolution-path:resolution-path_rjs",
7069
"//devtools/projects/protocol:protocol_rjs",
7170
],
7271
)

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/dependency-viewer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import {Component, input} from '@angular/core';
1010
import {SerializedInjectedService} from '../../../../../../../protocol';
11-
import {ResolutionPathComponent} from '../../../dependency-injection/resolution-path/resolution-path.component';
11+
import {ResolutionPathComponent} from './resolution-path/resolution-path.component';
1212
import {MatTooltip} from '@angular/material/tooltip';
1313
import {MatExpansionModule} from '@angular/material/expansion';
1414

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/BUILD.bazel renamed to devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/resolution-path/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("//devtools/tools:ng_project.bzl", "ng_project")
22
load("//devtools/tools:typescript.bzl", "ts_test_library")
33
load("//tools:defaults2.bzl", "ng_web_test_suite", "sass_binary")
44

5-
package(default_visibility = ["//:__subpackages__"])
5+
package(default_visibility = ["//devtools:__subpackages__"])
66

77
sass_binary(
88
name = "resolution_path_styles",

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/resolution-path.component.scss renamed to devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/resolution-path/resolution-path.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use '../../../../styles/typography';
1+
@use '../../../../../../styles/typography';
22

33
:host {
44
display: flex;

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/resolution-path.component.spec.ts renamed to devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/resolution-path/resolution-path.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
1010
import {By} from '@angular/platform-browser';
1111

1212
import {NODE_TYPE_CLASS_MAP, ResolutionPathComponent} from './resolution-path.component';
13-
import {SerializedInjector} from '../../../../../../protocol';
13+
import {SerializedInjector} from '../../../../../../../../protocol';
1414

1515
describe('ResolutionPath', () => {
1616
let component: ResolutionPathComponent;

devtools/projects/ng-devtools/src/lib/devtools-tabs/dependency-injection/resolution-path/resolution-path.component.ts renamed to devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/resolution-path/resolution-path.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {Component, computed, input} from '@angular/core';
10-
import {SerializedInjector} from '../../../../../../protocol';
10+
import {SerializedInjector} from '../../../../../../../../protocol';
1111

1212
export const NODE_TYPE_CLASS_MAP: {[key in SerializedInjector['type']]: string} = {
1313
'element': 'type-element',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy