mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
refactor(devtools): substitute remaining Angie images with ng-angie
Substitute the remaining `<img>`s with the Angie component.
This commit is contained in:
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
@@ -28,6 +28,7 @@ ng_project(
|
||||
"//devtools:node_modules/@types/d3",
|
||||
"//devtools:node_modules/d3",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/injector-tree/injector-providers",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/angie",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/docs-ref-button",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/split",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/split:responsive-split",
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ ng_project(
|
||||
"//:node_modules/@angular/common",
|
||||
"//:node_modules/@angular/core",
|
||||
"//:node_modules/@angular/material",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/angie",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/button",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
</table>
|
||||
} @else {
|
||||
<div class="no-providers-label">
|
||||
<img src="/assets/angie-orthos-back.svg" alt="Angie illustration" />
|
||||
<ng-angie type="orthos-back" size="md" />
|
||||
<p>No such providers</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
+2
-3
@@ -52,6 +52,7 @@
|
||||
padding-left: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
color: var(--quaternary-contrast);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.token-filter {
|
||||
@@ -89,9 +90,7 @@
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
height: 150px;
|
||||
width: auto;
|
||||
ng-angie {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -17,12 +17,13 @@ import {
|
||||
SerializedProviderRecord,
|
||||
} from '../../../../../../protocol';
|
||||
import {ButtonComponent} from '../../../shared/button/button.component';
|
||||
import {AngieComponent} from '../../../shared/angie/angie.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ng-injector-providers',
|
||||
templateUrl: './injector-providers.component.html',
|
||||
styleUrl: './injector-providers.component.scss',
|
||||
imports: [MatTableModule, MatIcon, MatTooltip, ButtonComponent],
|
||||
imports: [MatTableModule, MatIcon, MatTooltip, ButtonComponent, AngieComponent],
|
||||
})
|
||||
export class InjectorProvidersComponent {
|
||||
readonly injector = input.required<SerializedInjector>();
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
@if (!diDebugAPIsAvailable()) {
|
||||
<div class="not-supported">
|
||||
<img src="/assets/angie-sad.svg" alt="Angie illustration" />
|
||||
<ng-angie type="sad" size="lg" />
|
||||
<p>This feature is only available on version 17.0.0 or higher of Angular.</p>
|
||||
</div>
|
||||
} @else {
|
||||
|
||||
+1
-3
@@ -15,9 +15,7 @@
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
height: 160px;
|
||||
width: auto;
|
||||
ng-angie {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -54,6 +54,7 @@ import {SplitAreaDirective} from '../../shared/split/splitArea.directive';
|
||||
import {SplitComponent} from '../../shared/split/split.component';
|
||||
import {Direction} from '../../shared/split/interface';
|
||||
import {DocsRefButtonComponent} from '../../shared/docs-ref-button/docs-ref-button.component';
|
||||
import {AngieComponent} from '../../shared/angie/angie.component';
|
||||
|
||||
const ENV_HIERARCHY_VER_SIZE = 35;
|
||||
const EL_HIERARCHY_VER_SIZE = 65;
|
||||
@@ -74,6 +75,7 @@ const SELECTED_NODE_CLASS = 'it-selected';
|
||||
TreeVisualizerComponent,
|
||||
ResponsiveSplitDirective,
|
||||
DocsRefButtonComponent,
|
||||
AngieComponent,
|
||||
],
|
||||
templateUrl: `./injector-tree.component.html`,
|
||||
styleUrls: ['./injector-tree.component.scss'],
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ ng_project(
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/shared:estimate-frame-rate",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/shared:visualization-mode",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/visualizer-controls",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/angie",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
@if (!hasFrames() && visualizing()) {
|
||||
<div class="info">
|
||||
<img src="/assets/angie-question.svg" alt="Angie illustration" />
|
||||
<ng-angie type="question" size="md" />
|
||||
<p>There's no information to show.</p>
|
||||
</div>
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
@if (hasFrames() && !frame) {
|
||||
<div class="info">
|
||||
<img src="/assets/angie-magnifying-glass.svg" alt="Angie illustration" />
|
||||
<ng-angie type="magnifying-glass" size="md" />
|
||||
<p>Select a bar to preview a particular change detection cycle.</p>
|
||||
</div>
|
||||
} @else if (hasFrames() && frame) {
|
||||
|
||||
+1
-3
@@ -13,9 +13,7 @@
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
height: 160px;
|
||||
width: auto;
|
||||
ng-angie {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ import {FrameSelectorComponent} from './frame-selector/frame-selector.component'
|
||||
import {RecordingTimelineControlsComponent} from './recording-timeline-controls/recording-timeline-controls.component';
|
||||
import {VisualizerControlsComponent} from './visualizer-controls/visualizer-controls.component';
|
||||
import {estimateFrameRate} from './shared/estimate-frame-rate';
|
||||
import {AngieComponent} from '../../../shared/angie/angie.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ng-recording-timeline',
|
||||
@@ -29,6 +30,7 @@ import {estimateFrameRate} from './shared/estimate-frame-rate';
|
||||
FrameSelectorComponent,
|
||||
RecordingVisualizerComponent,
|
||||
VisualizerControlsComponent,
|
||||
AngieComponent,
|
||||
],
|
||||
})
|
||||
export class RecordingTimelineComponent {
|
||||
|
||||
@@ -35,6 +35,7 @@ ng_project(
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/router-details-row",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/angie",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/button",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/filter",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/split",
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@
|
||||
</as-split>
|
||||
} @else {
|
||||
<div class="unsupported-version">
|
||||
<img src="/assets/angie-sad.svg" alt="Angie illustration" />
|
||||
<ng-angie type="sad" size="lg" />
|
||||
<p>
|
||||
Router tree visualization is available for Angular applications using the latest Angular
|
||||
20.3.5 release and above. Please upgrade your application to Angular 20.3.5 or newer to use
|
||||
|
||||
+1
-4
@@ -119,10 +119,7 @@
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
height: 160px;
|
||||
width: auto;
|
||||
ng-angie {
|
||||
margin: 0 auto 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -25,6 +25,7 @@ import {ButtonComponent} from '../../shared/button/button.component';
|
||||
import {SplitComponent} from '../../shared/split/split.component';
|
||||
import {SplitAreaDirective} from '../../shared/split/splitArea.directive';
|
||||
import {FilterComponent, FilterFn} from '../../shared/filter/filter.component';
|
||||
import {AngieComponent} from '../../shared/angie/angie.component';
|
||||
|
||||
const NODE_SNAP_SCALE = 0.6;
|
||||
const RUN_GUARDS_AND_RESOLVERS_OPTIONS: RunGuardsAndResolvers[] = [
|
||||
@@ -48,6 +49,7 @@ const RUN_GUARDS_AND_RESOLVERS_OPTIONS: RunGuardsAndResolvers[] = [
|
||||
RouteDetailsRowComponent,
|
||||
ButtonComponent,
|
||||
FilterComponent,
|
||||
AngieComponent,
|
||||
],
|
||||
})
|
||||
export class RouterTreeComponent {
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
import {Component, computed, input} from '@angular/core';
|
||||
|
||||
type AngieType = 'coding-01' | 'error' | 'orthos-back' | 'sad' | 'teaching';
|
||||
type AngieType =
|
||||
'coding-01' | 'error' | 'magnifying-glass' | 'orthos-back' | 'question' | 'sad' | 'teaching';
|
||||
|
||||
type AngieSize = 'sm' | 'md' | 'lg';
|
||||
|
||||
const PX_SIZE: {[key in AngieSize]: number} = {
|
||||
|
||||
Reference in New Issue
Block a user