File tree Expand file tree Collapse file tree 7 files changed +6
-24
lines changed
devtools/projects/ng-devtools/src/lib
directive-explorer/property-tab
property-view/property-view-body/property-view-tree Expand file tree Collapse file tree 7 files changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ export class Settings {
3333 initialValue : false ,
3434 } ) ;
3535
36- readonly signalGraphEnabled = this . settingsStore . create ( {
37- key : 'signal_graph_enabled' ,
38- category : 'general' ,
39- initialValue : false ,
40- } ) ;
41-
4236 readonly transferStateEnabled = this . settingsStore . create ( {
4337 key : 'transfer_state_enabled' ,
4438 category : 'general' ,
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {ThemePreference} from '../theme_types';
1414export class SettingsMock extends Settings {
1515 routerGraphEnabled = signal ( false ) ;
1616 showCommentNodes = signal ( false ) ;
17- signalGraphEnabled = signal ( false ) ;
1817 timingAPIEnabled = signal ( false ) ;
1918 theme = signal < ThemePreference > ( 'system' ) ;
2019 activeTab = signal ( 'Components' ) ;
Original file line number Diff line number Diff line change 132132 < span class ="ng-mat-menu-label-text "> Enable Router Tree</ span >
133133 </ label >
134134 }
135- @if (supportedApis().signals) {
136- < label mat-menu-item disableRipple >
137- < mat-slide-toggle
138- [checked] ="signalGraphEnabled() "
139- (change) ="setSignalGraph($event.checked) "
140- />
141- < span class ="ng-mat-menu-label-text "> Enable Signal Graph (experimental)</ span >
142- </ label >
143- }
144135 @if (supportedApis().transferState) {
145136 < label mat-menu-item disableRipple >
146137 < mat-slide-toggle
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export class DevToolsTabsComponent {
8484 protected readonly showCommentNodes = this . settings . showCommentNodes ;
8585 protected readonly routerGraphEnabled = this . settings . routerGraphEnabled ;
8686 protected readonly timingAPIEnabled = this . settings . timingAPIEnabled ;
87- protected readonly signalGraphEnabled = this . settings . signalGraphEnabled ;
87+ protected readonly signalGraphEnabled = ( ) => this . supportedApis ( ) . signals ;
8888 protected readonly transferStateEnabled = this . settings . transferStateEnabled ;
8989 protected readonly activeTab = this . settings . activeTab ;
9090
@@ -202,10 +202,6 @@ export class DevToolsTabsComponent {
202202 }
203203 }
204204
205- protected setSignalGraph ( enabled : boolean ) : void {
206- this . signalGraphEnabled . set ( enabled ) ;
207- }
208-
209205 protected setTransferStateTab ( enabled : boolean ) : void {
210206 this . transferStateEnabled . set ( enabled ) ;
211207 if ( ! enabled && this . activeTab ( ) === 'Transfer State' ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ ng_project(
2222 deps = [
2323 "//:node_modules/@angular/core" ,
2424 "//:node_modules/@angular/material" ,
25+ "//devtools/projects/ng-devtools/src/lib/application-providers:supported_apis" ,
2526 "//devtools/projects/ng-devtools/src/lib/application-services:settings" ,
2627 "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest" ,
2728 "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-tab-header/component-metadata" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {IndexedNode} from '../../directive-forest/index-forest';
1414import { ComponentMetadataComponent } from './component-metadata/component-metadata.component' ;
1515import { ButtonComponent } from '../../../../shared/button/button.component' ;
1616import { Settings } from '../../../../application-services/settings' ;
17+ import { SUPPORTED_APIS } from '../../../../application-providers/supported_apis' ;
1718
1819@Component ( {
1920 templateUrl : './property-tab-header.component.html' ,
@@ -24,11 +25,12 @@ import {Settings} from '../../../../application-services/settings';
2425} )
2526export class PropertyTabHeaderComponent {
2627 private readonly settings = inject ( Settings ) ;
28+ private readonly supportedApis = inject ( SUPPORTED_APIS ) ;
2729
2830 protected readonly currentSelectedElement = input . required < IndexedNode > ( ) ;
2931 protected readonly showSignalGraph = output < void > ( ) ;
3032
3133 protected readonly expanded = signal ( false ) ;
3234
33- protected readonly signalGraphEnabled = this . settings . signalGraphEnabled ;
35+ protected readonly signalGraphEnabled = ( ) => this . supportedApis ( ) . signals ;
3436}
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ import {Settings} from '../../../../../../application-services/settings';
4242export class PropertyViewTreeComponent {
4343 protected readonly supportedApis = inject ( SUPPORTED_APIS ) ;
4444 private readonly signalGraph = inject ( SignalGraphManager ) ;
45- private readonly settings = inject ( Settings ) ;
4645
4746 readonly dataSource = input . required < PropertyDataSource > ( ) ;
4847 readonly treeControl = input . required < FlatTreeControl < FlatNode > > ( ) ;
@@ -51,7 +50,7 @@ export class PropertyViewTreeComponent {
5150 readonly logValue = output < FlatNode > ( ) ;
5251 readonly showSignalGraph = output < DebugSignalGraphNode > ( ) ;
5352
54- protected readonly signalGraphEnabled = this . settings . signalGraphEnabled ;
53+ protected readonly signalGraphEnabled = ( ) => this . supportedApis ( ) . signals ;
5554
5655 hasChild = ( _ : number , node : FlatNode ) : boolean => node . expandable ;
5756
You can’t perform that action at this time.
0 commit comments