Skip to content

Commit de5c891

Browse files
dgp1130thePunderWoman
authored andcommitted
refactor(devtools): display Wiz non-prop data as "State" (angular#60475)
This is the more common term for Wiz developers to reduce confusion between Wiz "props" and standard JS "properties". PR Close angular#60475
1 parent 96f36d6 commit de5c891

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/property-view-body.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@if (panel.controls().dataSource.data.length > 0) {
2828
<mat-expansion-panel [expanded]="true">
2929
<mat-expansion-panel-header collapsedHeight="25px" expandedHeight="25px">
30-
<mat-panel-title>{{ panel.title }}</mat-panel-title>
30+
<mat-panel-title>{{ panel.title() }}</mat-panel-title>
3131
</mat-expansion-panel-header>
3232
<ng-property-view-tree
3333
[dataSource]="panel.controls().dataSource"

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
*/
88

99
import {CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag} from '@angular/cdk/drag-drop';
10-
import {Component, computed, forwardRef, input, output, signal} from '@angular/core';
10+
import {
11+
Component,
12+
ɵFramework as Framework,
13+
computed,
14+
forwardRef,
15+
input,
16+
output,
17+
signal,
18+
} from '@angular/core';
1119
import {DirectivePosition, SerializedInjectedService} from 'protocol';
1220

1321
import {
@@ -54,19 +62,20 @@ export class PropertyViewBodyComponent {
5462

5563
protected readonly panels = signal([
5664
{
57-
title: 'Inputs',
65+
title: () => 'Inputs',
5866
controls: () => this.directiveInputControls(),
5967
},
6068
{
61-
title: 'Props',
69+
title: () => 'Props',
6270
controls: () => this.directivePropControls(),
6371
},
6472
{
65-
title: 'Outputs',
73+
title: () => 'Outputs',
6674
controls: () => this.directiveOutputControls(),
6775
},
6876
{
69-
title: 'Properties',
77+
title: () =>
78+
this.controller().directiveMetadata?.framework === Framework.Wiz ? 'State' : 'Properties',
7079
controls: () => this.directiveStateControls(),
7180
},
7281
]);

0 commit comments

Comments
 (0)