diff --git a/tools/winscope-ng/src/app/app.module.ts b/tools/winscope-ng/src/app/app.module.ts index 2dcc73f8b..3793d2ce1 100644 --- a/tools/winscope-ng/src/app/app.module.ts +++ b/tools/winscope-ng/src/app/app.module.ts @@ -11,6 +11,7 @@ import { MatProgressSpinnerModule } from "@angular/material/progress-spinner"; import { MatProgressBarModule } from "@angular/material/progress-bar"; import { FormsModule } from "@angular/forms"; import { MatCheckboxModule } from "@angular/material/checkbox"; +import { MatDividerModule } from "@angular/material/divider"; import { MatFormFieldModule } from "@angular/material/form-field"; import { MatIconModule } from "@angular/material/icon"; import { MatInputModule } from "@angular/material/input"; @@ -91,6 +92,7 @@ import { ViewerWindowManagerComponent } from "viewers/viewer_window_manager/view FormsModule, MatListModule, MatCheckboxModule, + MatDividerModule, MatIconModule, MatProgressSpinnerModule, MatProgressBarModule, diff --git a/tools/winscope-ng/src/app/components/adb_proxy.component.spec.ts b/tools/winscope-ng/src/app/components/adb_proxy.component.spec.ts index e079a8897..3bae481d9 100644 --- a/tools/winscope-ng/src/app/components/adb_proxy.component.spec.ts +++ b/tools/winscope-ng/src/app/components/adb_proxy.component.spec.ts @@ -55,7 +55,7 @@ describe("AdbProxyComponent", () => { it("check correct icon and message displays if no proxy", () => { component.proxy.setState(ProxyState.NO_PROXY); fixture.detectChanges(); - expect(htmlElement.querySelector(".further-adb-info")?.innerHTML).toContain("Launch the Winscope ADB Connect proxy"); + expect(htmlElement.querySelector(".further-adb-info-text")?.innerHTML).toContain("Launch the Winscope ADB Connect proxy"); }); it("check correct icon and message displays if invalid proxy", () => { diff --git a/tools/winscope-ng/src/app/components/adb_proxy.component.ts b/tools/winscope-ng/src/app/components/adb_proxy.component.ts index 0cab76d1d..b8d2d8bfe 100644 --- a/tools/winscope-ng/src/app/components/adb_proxy.component.ts +++ b/tools/winscope-ng/src/app/components/adb_proxy.component.ts @@ -19,45 +19,58 @@ import { proxyClient, ProxyClient, ProxyState } from "trace_collection/proxy_cli @Component({ selector: "adb-proxy", template: ` -
-

Launch the Winscope ADB Connect proxy to capture traces directly from your browser.

-

Python 3.5+ and ADB are required.

-

Run: python3 $ANDROID_BUILD_TOP/development/tools/winscope-ng/src/adb/winscope_proxy.py

-

Or get it from the AOSP repository.

-
- - -
-
+ + +
+

Launch the Winscope ADB Connect proxy to capture traces directly from your browser.

+

Python 3.5+ and ADB are required.

+

Run: python3 $ANDROID_BUILD_TOP/development/tools/winscope-ng/src/adb/winscope_proxy.py

+

Or get it from the AOSP repository.

+
-
-

- update - Your local proxy version is incompatible with Winscope. -

-

Please update the proxy to version {{ proxyVersion }}.

-

Run: python3 $ANDROID_BUILD_TOP/development/tools/winscope-ng/src/adb/winscope_proxy.py

-

Or get it from the AOSP repository.

-
- - -
-
+
+ + +
+
-
-

- lock - Proxy authorisation required. -

-

Enter Winscope proxy token:

- - - -

The proxy token is printed to console on proxy launch, copy and paste it above.

-
- -
-
+ +
+

+ update + Your local proxy version is incompatible with Winscope. +

+

Please update the proxy to version {{ proxyVersion }}.

+

Run: python3 $ANDROID_BUILD_TOP/development/tools/winscope-ng/src/adb/winscope_proxy.py

+

Or get it from the AOSP repository.

+
+ +
+ + +
+
+ + +
+

+ lock + Proxy authorisation required. +

+

Enter Winscope proxy token:

+ + + +

The proxy token is printed to console on proxy launch, copy and paste it above.

+
+ +
+ +
+
+ + +
`, styles: [ ` @@ -66,14 +79,21 @@ import { proxyClient, ProxyClient, ProxyState } from "trace_collection/proxy_cli flex-direction: row; align-items: center; } - .further-adb-info { + .further-adb-info-text { + display: flex; + flex-direction: column; overflow-wrap: break-word; + gap: 10px; + margin-bottom: 10px; } - .further-adb-info p { - margin: 10px 0; + .further-adb-info-actions { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 10px; } - .proxy-key-field { - width: 30rem + .adb-info { + margin-left: 5px; } ` ] diff --git a/tools/winscope-ng/src/app/components/app.component.spec.ts b/tools/winscope-ng/src/app/components/app.component.spec.ts index 6667ff93b..5d4a819ec 100644 --- a/tools/winscope-ng/src/app/components/app.component.spec.ts +++ b/tools/winscope-ng/src/app/components/app.component.spec.ts @@ -18,8 +18,9 @@ import {ComponentFixture, TestBed, ComponentFixtureAutoDetect} from "@angular/co import { CommonModule } from "@angular/common"; import { MatCardModule } from "@angular/material/card"; import { MatButtonModule } from "@angular/material/button"; -import { MatGridListModule } from "@angular/material/grid-list"; +import { MatDividerModule } from "@angular/material/divider"; import { MatSliderModule } from "@angular/material/slider"; +import { MatSnackBarModule } from "@angular/material/snack-bar"; import { MatToolbarModule } from "@angular/material/toolbar"; import { AppComponent } from "./app.component"; @@ -45,8 +46,9 @@ describe("AppComponent", () => { CommonModule, MatCardModule, MatButtonModule, - MatGridListModule, + MatDividerModule, MatSliderModule, + MatSnackBarModule, MatToolbarModule ], declarations: [ @@ -76,21 +78,24 @@ describe("AppComponent", () => { }); it("renders the page title", () => { - expect(htmlElement.querySelector("#app-title")?.innerHTML).toContain("Winscope"); + expect(htmlElement.querySelector(".app-title")?.innerHTML).toContain("Winscope"); }); - it("displays correct elements when no data loaded", async () => { + it("displays correct elements when no data loaded", () => { component.dataLoaded = false; fixture.detectChanges(); expect(htmlElement.querySelector(".welcome-info")).toBeTruthy(); - expect(htmlElement.querySelector("#viewers")).toBeNull(); + expect(htmlElement.querySelector(".collect-traces-card")).toBeTruthy(); + expect(htmlElement.querySelector(".upload-traces-card")).toBeTruthy(); + expect(htmlElement.querySelector(".viewers")).toBeFalsy(); }); - it("displays correct elements when data loaded", async () => { + it("displays correct elements when data loaded", () => { component.dataLoaded = true; fixture.detectChanges(); - expect(htmlElement.querySelector("#collect-traces-card")).toBeFalsy(); - expect(htmlElement.querySelector("#upload-traces-card")).toBeFalsy(); - expect(htmlElement.querySelector("#viewers")).toBeTruthy(); + expect(htmlElement.querySelector(".welcome-info")).toBeFalsy(); + expect(htmlElement.querySelector(".collect-traces-card")).toBeFalsy(); + expect(htmlElement.querySelector(".upload-traces-card")).toBeFalsy(); + expect(htmlElement.querySelector(".viewers")).toBeTruthy(); }); }); diff --git a/tools/winscope-ng/src/app/components/app.component.ts b/tools/winscope-ng/src/app/components/app.component.ts index 80ce1827d..69cef752c 100644 --- a/tools/winscope-ng/src/app/components/app.component.ts +++ b/tools/winscope-ng/src/app/components/app.component.ts @@ -32,94 +32,96 @@ import { ViewerScreenRecordingComponent } from "viewers/viewer_screen_recording/ @Component({ selector: "app-root", template: ` - -

Winscope

- - - - + + Winscope + + + + +
+ + +
-

Welcome to Winscope. Please select source to view traces.

+ -
- - - - - - -
+ + - + -
-
-
+ + + +

+ Welcome to Winscope. Please select source to view traces. +

+ +
+ + + +
+
+ +
`, styles: [ ` - .app-toolbar { - background-color: white; - border-bottom: 1px solid var(--default-border); - } - #app-title { - margin: 12px 0; - } - .toolbar-wrapper { - width: 100%; - height: 100%; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; + .app-title { + margin-right: 10px; } .welcome-info { - margin: 16px 0; + margin: 16px 0 6px 0; text-align: center; } .homepage-card { + display: flex; + flex-direction: column; flex: 1; - margin: 10px; - overflow: auto; - border: 1px solid var(--default-border); - } - - .homepage-card mat-card-content { - display: flex; - flex-direction: column; overflow: auto; } - #viewers { + .spacer { + flex: 1; + } + .viewers { height: 100%; - width: 100%; display: flex; flex-direction: column; overflow: auto; } - #timescrub { - padding: 8px; - border-top: 1px solid var(--default-border); - } - .time-slider { - width: 100% + .timescrub { + margin: 8px; } ` ], diff --git a/tools/winscope-ng/src/app/components/collect_traces.component.spec.ts b/tools/winscope-ng/src/app/components/collect_traces.component.spec.ts index 1d2912477..a16ae9502 100644 --- a/tools/winscope-ng/src/app/components/collect_traces.component.spec.ts +++ b/tools/winscope-ng/src/app/components/collect_traces.component.spec.ts @@ -22,6 +22,7 @@ import { WebAdbComponent } from "./web_adb.component"; import { TraceConfigComponent } from "./trace_config.component"; import { MatListModule } from "@angular/material/list"; import { MatButtonModule } from "@angular/material/button"; +import { MatDividerModule } from "@angular/material/divider"; import { MatProgressBarModule } from "@angular/material/progress-bar"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { NO_ERRORS_SCHEMA } from "@angular/core"; @@ -39,6 +40,7 @@ describe("CollectTracesComponent", () => { MatCardModule, MatListModule, MatButtonModule, + MatDividerModule, MatProgressBarModule, BrowserAnimationsModule, MatSnackBarModule @@ -64,7 +66,7 @@ describe("CollectTracesComponent", () => { it("renders the expected card title", () => { fixture.detectChanges(); - expect(htmlElement.querySelector("#title")?.innerHTML).toContain("Collect Traces"); + expect(htmlElement.querySelector(".title")?.innerHTML).toContain("Collect Traces"); }); it("displays connecting message", () => { @@ -78,9 +80,9 @@ describe("CollectTracesComponent", () => { fixture.detectChanges(); fixture.whenStable().then( () => { expect(htmlElement.querySelector(".set-up-adb")).toBeTruthy(); - const proxyTab: HTMLButtonElement | null = htmlElement.querySelector("#proxy-tab"); + const proxyTab: HTMLButtonElement | null = htmlElement.querySelector(".proxy-tab"); expect(proxyTab).toBeInstanceOf(HTMLButtonElement); - const webTab: HTMLButtonElement | null = htmlElement.querySelector("#web-tab"); + const webTab: HTMLButtonElement | null = htmlElement.querySelector(".web-tab"); expect(webTab).toBeInstanceOf(HTMLButtonElement); }); }); @@ -110,7 +112,7 @@ describe("CollectTracesComponent", () => { component.isAdbProxy = true; fixture.detectChanges(); fixture.whenStable().then(() => { - const webTab: HTMLButtonElement | null = htmlElement.querySelector("#web-tab"); + const webTab: HTMLButtonElement | null = htmlElement.querySelector(".web-tab"); expect(webTab).toBeInstanceOf(HTMLButtonElement); webTab?.dispatchEvent(new Event("click")); fixture.whenStable().then(() => { @@ -124,7 +126,7 @@ describe("CollectTracesComponent", () => { component.connect.devices = jasmine.createSpy().and.returnValue({}); fixture.detectChanges(); fixture.whenStable().then( () => { - const el = htmlElement.querySelector("devices-connecting"); + const el = htmlElement.querySelector(".devices-connecting"); expect(el).toBeTruthy(); expect(el?.innerHTML).toContain("No devices detected"); }); @@ -135,7 +137,7 @@ describe("CollectTracesComponent", () => { component.connect.devices = jasmine.createSpy().and.returnValue({"35562": {model: "Pixel 6", authorised:true}}); fixture.detectChanges(); fixture.whenStable().then( () => { - const el = htmlElement.querySelector("devices-connecting"); + const el = htmlElement.querySelector(".devices-connecting"); expect(el).toBeTruthy(); expect(el?.innerHTML).toContain("Connected devices:"); expect(el?.innerHTML).toContain("Pixel 6"); @@ -148,7 +150,7 @@ describe("CollectTracesComponent", () => { component.connect.devices = jasmine.createSpy().and.returnValue({"35562": {model: "Pixel 6", authorised:false}}); fixture.detectChanges(); fixture.whenStable().then( () => { - const el = htmlElement.querySelector("devices-connecting"); + const el = htmlElement.querySelector(".devices-connecting"); expect(el).toBeTruthy(); expect(el?.innerHTML).toContain("Connected devices:"); expect(el?.innerHTML).toContain("unauthorised"); @@ -164,16 +166,16 @@ describe("CollectTracesComponent", () => { fixture.detectChanges(); fixture.whenStable().then( () => { - const el = htmlElement.querySelector("trace-collection-config"); + const el = htmlElement.querySelector(".trace-collection-config"); expect(el).toBeTruthy(); expect(el?.innerHTML).toContain("smartphone"); expect(el?.innerHTML).toContain("Pixel 6"); expect(el?.innerHTML).toContain("35562"); - const traceSection = htmlElement.querySelector("trace-section"); + const traceSection = htmlElement.querySelector(".trace-section"); expect(traceSection).toBeTruthy(); - const dumpSection = htmlElement.querySelector("dump-section"); + const dumpSection = htmlElement.querySelector(".dump-section"); expect(dumpSection).toBeTruthy(); }); }); diff --git a/tools/winscope-ng/src/app/components/collect_traces.component.ts b/tools/winscope-ng/src/app/components/collect_traces.component.ts index 76e890e0d..b5e52ba4c 100644 --- a/tools/winscope-ng/src/app/components/collect_traces.component.ts +++ b/tools/winscope-ng/src/app/components/collect_traces.component.ts @@ -28,89 +28,132 @@ import { ParserErrorSnackBarComponent } from "./parser_error_snack_bar_component @Component({ selector: "collect-traces", template: ` - Collect Traces - + + Collect Traces -

Connecting...

+ +

Connecting...

-
- - - - -
- -
-

{{ objectKeys(connect.devices()).length > 0 ? "Connected devices:" : "No devices detected" }}

- - - - {{ connect.devices()[deviceId].authorised ? "smartphone" : "screen_lock_portrait" }} - - {{ connect.devices()[deviceId].authorised ? connect.devices()[deviceId].model : "unauthorised" }} ({{ deviceId }}) - - -
- -
- - - smartphone - {{ connect.selectedDevice().model }} ({{ connect.selectedDeviceId() }}) - - - - -
- - +
+ + + +
-
-

Dump targets

-
- {{setTraces.DUMPS[dumpKey].name}} +
+

{{ objectKeys(connect.devices()).length > 0 ? "Connected devices:" : "No devices detected" }}

+ + + + {{ connect.devices()[deviceId].authorised ? "smartphone" : "screen_lock_portrait" }} + +

+ {{ connect.devices()[deviceId].authorised ? connect.devices()[deviceId].model : "unauthorised" }} ({{ deviceId }}) +

+
+
+
+ +
+ + + smartphone +

+ {{ connect.selectedDevice().model }} ({{ connect.selectedDeviceId() }}) + + +

+
+
+ +
+ + +
+ + + +
+

Dump targets

+
+ {{setTraces.DUMPS[dumpKey].name}} +
-
-
-

- error - Error: -

-
 {{ connect.proxy?.errorText }} 
- -
+
+

+ error + Error: +

+
 {{ connect.proxy?.errorText }} 
+ +
-
-

Tracing...

- - -
+
+

Tracing...

+ + +
-
-

Loading data...

- -
+
+

Loading data...

+ +
- + + `, styles: [ ` - .change-btn { + .change-btn, .retry-btn, .edn-btn { margin-left: 5px; } + .collect-card { + height: 100%; + display: flex; + flex-direction: column; + overflow: auto; + margin: 10px; + } + .collect-card-content { + overflow: auto; + } + .selection { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 10px; + } + .set-up-adb, + .trace-collection-config, + .trace-section, + .dump-section, + .end-tracing, + .load-data, + trace-config { + display: flex; + flex-direction: column; + gap: 10px; + } + .proxy-tab, .web-tab, .start-btn, .dump-btn, .end-btn { + align-self: flex-start; + } .error-wrapper { display: flex; flex-direction: row; align-items: center; } + .error-icon { + margin-right: 5px; + } ` ] }) diff --git a/tools/winscope-ng/src/app/components/parser_error_snack_bar_component.ts b/tools/winscope-ng/src/app/components/parser_error_snack_bar_component.ts index d521cec24..535f88945 100644 --- a/tools/winscope-ng/src/app/components/parser_error_snack_bar_component.ts +++ b/tools/winscope-ng/src/app/components/parser_error_snack_bar_component.ts @@ -22,7 +22,7 @@ import { ParserError, ParserErrorType } from "parsers/parser_factory"; selector: "upload-snack-bar", template: `
-

{{msg}}

+

{{msg}}

@@ -35,9 +35,6 @@ import { ParserError, ParserErrorType } from "parsers/parser_factory"; flex-direction: row; align-items: center; } - .snack-bar-content { - color: white; - } .snack-bar-action { margin-left: 12px; } @@ -61,7 +58,7 @@ export class ParserErrorSnackBarComponent { if (error.type === ParserErrorType.ALREADY_LOADED && error.traceType) { errorString = `Cannot load ${error.trace.name}; Already loaded a trace of type ${TRACE_INFO[error.traceType].name}`; } else if (error.type === ParserErrorType.UNSUPPORTED_FORMAT) { - errorString = `Cannot load ${error.trace.name}; File format is unsupported`; + errorString = `Cannot load ${error.trace.name}; File format is unsupported`; } return errorString; } diff --git a/tools/winscope-ng/src/app/components/trace_config.component.spec.ts b/tools/winscope-ng/src/app/components/trace_config.component.spec.ts index 8712e4581..b446cf442 100644 --- a/tools/winscope-ng/src/app/components/trace_config.component.spec.ts +++ b/tools/winscope-ng/src/app/components/trace_config.component.spec.ts @@ -17,6 +17,7 @@ import { CommonModule } from "@angular/common"; import {ComponentFixture, TestBed} from "@angular/core/testing"; import {TraceConfigComponent} from "./trace_config.component"; import { MatCheckboxModule } from "@angular/material/checkbox"; +import { MatDividerModule } from "@angular/material/divider"; import { MatFormFieldModule } from "@angular/material/form-field"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { MatInputModule } from "@angular/material/input"; @@ -33,6 +34,7 @@ describe("TraceConfigComponent", () => { imports: [ CommonModule, MatCheckboxModule, + MatDividerModule, MatFormFieldModule, MatInputModule, MatSelectModule, @@ -74,7 +76,7 @@ describe("TraceConfigComponent", () => { it("check that trace checkbox ticked on default run", () => { component.traces["layers_trace"].run = true; fixture.detectChanges(); - const box = htmlElement.querySelector(".trace-box"); + const box = htmlElement.querySelector(".trace-checkbox"); expect(box?.innerHTML).toContain("aria-checked=\"true\""); expect(box?.innerHTML).toContain("layers_trace"); }); @@ -82,26 +84,34 @@ describe("TraceConfigComponent", () => { it("check that trace checkbox not ticked on default run", () => { component.traces["layers_trace"].run = false; fixture.detectChanges(); - const box = htmlElement.querySelector(".trace-box"); + const box = htmlElement.querySelector(".trace-checkbox"); expect(box?.innerHTML).toContain("aria-checked=\"false\""); }); - it("check that correct advanced enable config only shows", () => { + it("check that correct advanced enable config shows", () => { component.traces["layers_trace"].config!.selectionConfigs = []; fixture.detectChanges(); - const adv = htmlElement.querySelector(".config-opt"); - expect(adv).toBeTruthy(); - expect(adv?.innerHTML).toContain("trace buffers"); - expect(adv?.innerHTML).not.toContain("tracing level"); + + const enable_config_opt = htmlElement.querySelector(".enable-config-opt"); + expect(enable_config_opt).toBeTruthy(); + expect(enable_config_opt?.innerHTML).toContain("trace buffers"); + expect(enable_config_opt?.innerHTML).not.toContain("tracing level"); + + const selection_config_opt = htmlElement.querySelector(".selection-config-opt"); + expect(selection_config_opt).toBeFalsy(); }); it("check that correct advanced selection config shows", () => { component.traces["layers_trace"].config!.enableConfigs = []; fixture.detectChanges(); - const adv = htmlElement.querySelector(".config-opt"); - expect(adv).toBeTruthy(); - expect(adv?.innerHTML).not.toContain("trace buffers"); - expect(adv?.innerHTML).toContain("tracing level"); + + const enable_config_opt = htmlElement.querySelector(".enable-config-opt"); + expect(enable_config_opt).toBeFalsy(); + + const selection_config_opt = htmlElement.querySelector(".selection-config-opt"); + expect(selection_config_opt).toBeTruthy(); + expect(selection_config_opt?.innerHTML).not.toContain("trace buffers"); + expect(selection_config_opt?.innerHTML).toContain("tracing level"); }); it("check that changing enable config causes box to change", async () => { @@ -116,8 +126,7 @@ describe("TraceConfigComponent", () => { expect(htmlElement.querySelector(".config-selection")?.innerHTML).toContain("value=\"debug\""); component.traces["layers_trace"].config!.selectionConfigs[0].value = "verbose"; fixture.detectChanges(); - fixture.whenStable().then(() => { - expect(htmlElement.querySelector(".config-selection")?.innerHTML).toContain("value=\"verbose\""); - }); + await fixture.whenStable(); + expect(htmlElement.querySelector(".config-selection")?.innerHTML).toContain("value=\"verbose\""); }); }); diff --git a/tools/winscope-ng/src/app/components/trace_config.component.ts b/tools/winscope-ng/src/app/components/trace_config.component.ts index 4db0b3efa..0437f927f 100644 --- a/tools/winscope-ng/src/app/components/trace_config.component.ts +++ b/tools/winscope-ng/src/app/components/trace_config.component.ts @@ -19,62 +19,65 @@ import { EnableConfiguration, SelectionConfiguration, TraceConfiguration, TraceC @Component({ selector: "trace-config", template: ` -
-

Trace targets

-
+

Trace targets

+ +
+ {{traces[traceKey].name}} +
+ + + + +

{{traces[traceKey].name}} configuration

+ +
{{traces[traceKey].name}} + class="enable-config" + [disabled]="!traces[traceKey].run && !traces[traceKey].isTraceCollection" + [(ngModel)]="enableConfig.enabled" + (ngModelChange)="changeTraceCollectionConfig(traces[traceKey])" + >{{enableConfig.name}}
- -

{{traces[traceKey].name}} configuration

+
+ -
- {{enableConfig.name}} + {{selectionConfig.name}} -
- - {{selectionConfig.name}} - - {{ option }} - - -
-
- -
+ + {{ option }} + + +
+ `, styles: [ ` - .card-block { - margin: 15px; - } .checkboxes { - padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); + column-gap: 10px; } - .config-selection { - margin: 0 5px; + .enable-config-opt, .selection-config-opt { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 10px; } ` ] diff --git a/tools/winscope-ng/src/app/components/trace_view.component.spec.ts b/tools/winscope-ng/src/app/components/trace_view.component.spec.ts index fe9eba651..3b8076b07 100644 --- a/tools/winscope-ng/src/app/components/trace_view.component.spec.ts +++ b/tools/winscope-ng/src/app/components/trace_view.component.spec.ts @@ -17,6 +17,7 @@ import {CommonModule} from "@angular/common"; import {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA} from "@angular/core"; import {ComponentFixture, TestBed} from "@angular/core/testing"; import {MatCardModule} from "@angular/material/card"; +import {MatDividerModule} from "@angular/material/divider"; import {TraceViewComponent} from "./trace_view.component"; import {ViewerStub} from "viewers/viewer_stub"; @@ -30,7 +31,8 @@ describe("TraceViewComponent", () => { declarations: [TraceViewComponent], imports: [ CommonModule, - MatCardModule + MatCardModule, + MatDividerModule ], schemas: [NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA] }).compileComponents(); diff --git a/tools/winscope-ng/src/app/components/trace_view.component.ts b/tools/winscope-ng/src/app/components/trace_view.component.ts index 88ffe6280..c3134b847 100644 --- a/tools/winscope-ng/src/app/components/trace_view.component.ts +++ b/tools/winscope-ng/src/app/components/trace_view.component.ts @@ -43,6 +43,7 @@ interface Tab extends View { (click)="downloadTracesButtonClick.emit()" >Download all traces
+
`, @@ -59,11 +60,9 @@ interface Tab extends View { } .header-items-wrapper { - width: 100%; display: flex; flex-direction: row; justify-content: space-between; - align-items: center; } .tabs-navigation-bar { @@ -71,12 +70,8 @@ interface Tab extends View { } .trace-view-content { - height: 0; - flex-grow: 1; - } - - .save-button { height: 100%; + overflow: auto; } ` ] diff --git a/tools/winscope-ng/src/app/components/upload_traces.component.spec.ts b/tools/winscope-ng/src/app/components/upload_traces.component.spec.ts index 822d5d788..2855a6790 100644 --- a/tools/winscope-ng/src/app/components/upload_traces.component.spec.ts +++ b/tools/winscope-ng/src/app/components/upload_traces.component.spec.ts @@ -26,7 +26,10 @@ describe("UploadTracesComponent", () => { beforeAll(async () => { await TestBed.configureTestingModule({ - imports: [MatCardModule, MatSnackBarModule], + imports: [ + MatCardModule, + MatSnackBarModule + ], providers: [MatSnackBar], declarations: [UploadTracesComponent], }).compileComponents(); diff --git a/tools/winscope-ng/src/app/components/upload_traces.component.ts b/tools/winscope-ng/src/app/components/upload_traces.component.ts index 6f54e1b2d..bc42a80aa 100644 --- a/tools/winscope-ng/src/app/components/upload_traces.component.ts +++ b/tools/winscope-ng/src/app/components/upload_traces.component.ts @@ -24,9 +24,10 @@ import { ParserError } from "parsers/parser_factory"; @Component({ selector: "upload-traces", template: ` - Upload Traces - -
+ Upload Traces + + + - {{TRACE_INFO[trace.type].icon}} - {{trace.name}} ({{TRACE_INFO[trace.type].name}}) - -

Drag your .winscope file(s) or click to upload

-
-
- - - +
+

+ Drag your .winscope file(s) or click to upload +

+
+ + +
+ + + + +
- + `, styles: [ ` - .drop-box { - height: 400px; - padding: 10px; + .upload-card { + height: 100%; display: flex; flex-direction: column; overflow: auto; - outline: 2px dashed var(--default-border); - outline-offset: -10px; + margin: 10px; + } + .drop-box { + display: flex; + flex-direction: column; + overflow: auto; + border: 2px dashed var(--default-border); cursor: pointer; } .uploaded-files { - height: 100%; - width: 100%; - overflow: auto; - } - .close-btn { - margin-left: auto; + flex: 400px; + padding: 0; } .drop-info { + flex: 400px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; pointer-events: none; - margin: auto; + } + .trace-actions-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 10px; } ` ] diff --git a/tools/winscope-ng/src/app/components/web_adb.component.spec.ts b/tools/winscope-ng/src/app/components/web_adb.component.spec.ts index f5874e224..f8dff11b6 100644 --- a/tools/winscope-ng/src/app/components/web_adb.component.spec.ts +++ b/tools/winscope-ng/src/app/components/web_adb.component.spec.ts @@ -16,7 +16,6 @@ import {ComponentFixture, TestBed} from "@angular/core/testing"; import {WebAdbComponent} from "./web_adb.component"; import { MatIconModule } from "@angular/material/icon"; -import { MatCardModule } from "@angular/material/card"; describe("WebAdbComponent", () => { let fixture: ComponentFixture; @@ -25,7 +24,9 @@ describe("WebAdbComponent", () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [MatIconModule, MatCardModule], + imports: [ + MatIconModule + ], declarations: [WebAdbComponent], }).compileComponents(); fixture = TestBed.createComponent(WebAdbComponent); diff --git a/tools/winscope-ng/src/app/components/web_adb.component.ts b/tools/winscope-ng/src/app/components/web_adb.component.ts index 3f1f59a14..ac576f99b 100644 --- a/tools/winscope-ng/src/app/components/web_adb.component.ts +++ b/tools/winscope-ng/src/app/components/web_adb.component.ts @@ -24,7 +24,7 @@ import {Component} from "@angular/core";

Click the button below to follow instructions in the Chrome pop-up.

Selecting a device will kill all existing ADB connections.

- + `, styles: [ ` @@ -33,6 +33,9 @@ import {Component} from "@angular/core"; flex-direction: row; align-items: center; } + .adb-info, .web-select-btn { + margin-left: 5px; + } ` ] }) diff --git a/tools/winscope-ng/src/index.html b/tools/winscope-ng/src/index.html index a8c141b18..3093e6084 100644 --- a/tools/winscope-ng/src/index.html +++ b/tools/winscope-ng/src/index.html @@ -22,7 +22,7 @@ - + diff --git a/tools/winscope-ng/src/material-theme.scss b/tools/winscope-ng/src/material-theme.scss index 041a4d84b..29c1b5419 100644 --- a/tools/winscope-ng/src/material-theme.scss +++ b/tools/winscope-ng/src/material-theme.scss @@ -31,14 +31,17 @@ $theme: mat.define-light-theme(( color: ( primary: $primary, accent: $accent, - ) + ), + density: 0, )); @include mat.core-theme($theme); @include mat.button-theme($theme); +@include mat.button-toggle-theme($theme); @include mat.card-theme($theme); @include mat.checkbox-theme($theme); +@include mat.divider-theme($theme); @include mat.form-field-theme($theme); @include mat.grid-list-theme($theme); @include mat.icon-theme($theme); @@ -51,5 +54,5 @@ $theme: mat.define-light-theme(( @include mat.slider-theme($theme); @include mat.snack-bar-theme($theme); @include mat.tabs-theme($theme); -@include mat.tooltip-theme($theme); @include mat.toolbar-theme($theme); +@include mat.tooltip-theme($theme); diff --git a/tools/winscope-ng/src/styles.css b/tools/winscope-ng/src/styles.css index 7f4ca53c6..e4773cbed 100644 --- a/tools/winscope-ng/src/styles.css +++ b/tools/winscope-ng/src/styles.css @@ -37,22 +37,6 @@ app-root { margin: 0; } -button.mat-raised-button { - margin: 10px; -} - -button.mat-stroked-button { - margin: 10px; -} - -mat-checkbox { - margin-left: 12px; -} - -mat-icon { - margin: 5px; -} - .card-grid { width: 100%; height: 100%; @@ -60,3 +44,7 @@ mat-icon { flex-direction: row; overflow: auto; } + +viewer-surface-flinger .properties-view .view-header { + flex: 3; +} diff --git a/tools/winscope-ng/src/test/e2e/winscope.spec.ts b/tools/winscope-ng/src/test/e2e/winscope.spec.ts index bc22e930c..e3f99806a 100644 --- a/tools/winscope-ng/src/test/e2e/winscope.spec.ts +++ b/tools/winscope-ng/src/test/e2e/winscope.spec.ts @@ -22,7 +22,7 @@ describe("winscope", () => { }), it("has title", () => { - const title = element(by.css("#app-title")); + const title = element(by.css(".app-title")); expect(title.getText()).toContain("Winscope"); }); }); \ No newline at end of file diff --git a/tools/winscope-ng/src/viewers/components/hierarchy.component.spec.ts b/tools/winscope-ng/src/viewers/components/hierarchy.component.spec.ts index d29273706..1a61c4be0 100644 --- a/tools/winscope-ng/src/viewers/components/hierarchy.component.spec.ts +++ b/tools/winscope-ng/src/viewers/components/hierarchy.component.spec.ts @@ -21,6 +21,7 @@ import { CommonModule } from "@angular/common"; import { MatInputModule } from "@angular/material/input"; import { MatFormFieldModule } from "@angular/material/form-field"; import { MatCheckboxModule } from "@angular/material/checkbox"; +import { MatDividerModule } from "@angular/material/divider"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { HierarchyTreeBuilder } from "test/unit/hierarchy_tree_builder"; import { TreeComponent } from "viewers/components/tree.component"; @@ -45,9 +46,10 @@ describe("HierarchyComponent", () => { ], imports: [ CommonModule, + MatCheckboxModule, + MatDividerModule, MatInputModule, MatFormFieldModule, - MatCheckboxModule, BrowserAnimationsModule ], schemas: [NO_ERRORS_SCHEMA] diff --git a/tools/winscope-ng/src/viewers/components/hierarchy.component.ts b/tools/winscope-ng/src/viewers/components/hierarchy.component.ts index d4b0f5b40..1bead63ae 100644 --- a/tools/winscope-ng/src/viewers/components/hierarchy.component.ts +++ b/tools/winscope-ng/src/viewers/components/hierarchy.component.ts @@ -40,9 +40,8 @@ import { TableProperties } from "viewers/common/table_properties";
{{userOptions[option].name}} @@ -67,24 +66,23 @@ import { TableProperties } from "viewers/common/table_properties"; >
+
-
- -
+
`, styles: [ @@ -92,8 +90,7 @@ import { TableProperties } from "viewers/common/table_properties"; .view-header { display: flex; flex-direction: column; - border-bottom: 1px solid var(--default-border); - padding-bottom: 12px; + margin-bottom: 12px; } .title-filter { @@ -107,6 +104,7 @@ import { TableProperties } from "viewers/common/table_properties"; display: flex; flex-direction: row; flex-wrap: wrap; + column-gap: 10px; } .properties-table { @@ -114,9 +112,8 @@ import { TableProperties } from "viewers/common/table_properties"; } .hierarchy-content { - height: 0; - flex-grow: 1; - overflow-y: auto; + height: 100%; + overflow: auto; } .pinned-items { @@ -125,8 +122,8 @@ import { TableProperties } from "viewers/common/table_properties"; border: 2px solid yellow; } - .tree-wrapper { - overflow-y: auto + tree-view { + overflow: auto; } `, nodeStyles diff --git a/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.spec.ts b/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.spec.ts index 8ce2e2a52..5cc2ec563 100644 --- a/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.spec.ts +++ b/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.spec.ts @@ -15,7 +15,7 @@ */ import {ComponentFixture, TestBed} from "@angular/core/testing"; import { ImeAdditionalPropertiesComponent } from "./ime_additional_properties.component"; -import { MatCardModule } from "@angular/material/card"; +import { MatDividerModule } from "@angular/material/divider"; describe("ImeAdditionalPropertiesComponent", () => { let fixture: ComponentFixture; @@ -25,7 +25,7 @@ describe("ImeAdditionalPropertiesComponent", () => { beforeAll(async () => { await TestBed.configureTestingModule({ imports: [ - MatCardModule, + MatDividerModule ], declarations: [ ImeAdditionalPropertiesComponent diff --git a/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.ts b/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.ts index b3fe7d05c..87e8d0b2b 100644 --- a/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.ts +++ b/tools/winscope-ng/src/viewers/components/ime_additional_properties.component.ts @@ -292,7 +292,7 @@ import { ViewerEvents } from "viewers/common/viewer_events"; } p.group-header { - color: grey; + color: gray; } .left-column { diff --git a/tools/winscope-ng/src/viewers/components/properties.component.spec.ts b/tools/winscope-ng/src/viewers/components/properties.component.spec.ts index 9ed4a89ff..197205562 100644 --- a/tools/winscope-ng/src/viewers/components/properties.component.spec.ts +++ b/tools/winscope-ng/src/viewers/components/properties.component.spec.ts @@ -20,6 +20,7 @@ import { NO_ERRORS_SCHEMA } from "@angular/core"; import { MatInputModule } from "@angular/material/input"; import { MatFormFieldModule } from "@angular/material/form-field"; import { MatCheckboxModule } from "@angular/material/checkbox"; +import { MatDividerModule } from "@angular/material/divider"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { PropertyGroupsComponent } from "./property_groups.component"; import { TreeComponent } from "./tree.component"; @@ -44,6 +45,7 @@ describe("PropertiesComponent", () => { MatInputModule, MatFormFieldModule, MatCheckboxModule, + MatDividerModule, BrowserAnimationsModule ], schemas: [NO_ERRORS_SCHEMA] diff --git a/tools/winscope-ng/src/viewers/components/properties.component.ts b/tools/winscope-ng/src/viewers/components/properties.component.ts index 1d562c286..1a7cfec87 100644 --- a/tools/winscope-ng/src/viewers/components/properties.component.ts +++ b/tools/winscope-ng/src/viewers/components/properties.component.ts @@ -25,8 +25,10 @@ import { PropertiesTreeNode, Terminal} from "viewers/common/ui_tree_utils";

Properties

+ Filter... +
+
{{userOptions[option].name}}
+
+ + +

Properties - Proto Dump

+
{ @@ -25,6 +26,9 @@ describe("PropertyGroupsComponent", () => { beforeAll(async () => { await TestBed.configureTestingModule({ + imports: [ + MatDividerModule + ], providers: [ { provide: ComponentFixtureAutoDetect, useValue: true } ], diff --git a/tools/winscope-ng/src/viewers/components/property_groups.component.ts b/tools/winscope-ng/src/viewers/components/property_groups.component.ts index 337c329ba..e1f9d04b4 100644 --- a/tools/winscope-ng/src/viewers/components/property_groups.component.ts +++ b/tools/winscope-ng/src/viewers/components/property_groups.component.ts @@ -34,6 +34,7 @@ import { Layer } from "common/trace/flickerlib/common";

+

Geometry

@@ -72,6 +73,7 @@ import { Layer } from "common/trace/flickerlib/common";

+

Buffer

@@ -112,6 +114,7 @@ import { Layer } from "common/trace/flickerlib/common";

+

Hierarchy

@@ -135,6 +138,7 @@ import { Layer } from "common/trace/flickerlib/common";

+

Effects

@@ -201,39 +205,42 @@ import { Layer } from "common/trace/flickerlib/common";

+

Input

-
-

To Display Transform:

- -

- Touchable Region: - &ngsp; - {{ item.inputRegion }} -

-
-
-

Config

-

- Focusable: - &ngsp; - {{ item.proto?.inputWindowInfo.focusable }} -

-

- Crop touch region with item: - &ngsp; - {{ - item.proto?.inputWindowInfo.cropLayerId <= 0 - ? "none" - : item.proto?.inputWindowInfo.cropLayerId - }} -

-

- Replace touch region with crop: - &ngsp; - {{ item.proto?.inputWindowInfo.replaceTouchableRegionWithCrop }} -

-
+ +
+

To Display Transform:

+ +

+ Touchable Region: + &ngsp; + {{ item.inputRegion }} +

+
+
+

Config

+

+ Focusable: + &ngsp; + {{ item.proto?.inputWindowInfo.focusable }} +

+

+ Crop touch region with item: + &ngsp; + {{ + item.proto?.inputWindowInfo.cropLayerId <= 0 + ? "none" + : item.proto?.inputWindowInfo.cropLayerId + }} +

+

+ Replace touch region with crop: + &ngsp; + {{ item.proto?.inputWindowInfo.replaceTouchableRegionWithCrop }} +

+
+

Input channel: @@ -249,12 +256,11 @@ import { Layer } from "common/trace/flickerlib/common"; display: flex; flex-direction: row; padding: 8px; - border-bottom: 1px solid var(--default-border); } .group-header { width: 80px; - color: grey; + color: gray; } .left-column { @@ -270,7 +276,7 @@ import { Layer } from "common/trace/flickerlib/common"; } .column-header { - color: grey; + color: gray; } ` ], diff --git a/tools/winscope-ng/src/viewers/components/rects/canvas_graphics.ts b/tools/winscope-ng/src/viewers/components/rects/canvas_graphics.ts index a51827552..f82dae648 100644 --- a/tools/winscope-ng/src/viewers/components/rects/canvas_graphics.ts +++ b/tools/winscope-ng/src/viewers/components/rects/canvas_graphics.ts @@ -304,7 +304,7 @@ export class CanvasGraphics { const circleMesh = this.makeLabelCircleMesh(rectMesh, rect); this.scene?.add(circleMesh); - const isGrey = !this.visibleView && !rect.isVisible; + const isGray = !this.visibleView && !rect.isVisible; let lineEndPos; const labelYSeparation = 0.5; @@ -320,14 +320,14 @@ export class CanvasGraphics { const linePoints = [circleMesh.position, lineEndPos]; const lineGeo = new THREE.BufferGeometry().setFromPoints(linePoints); - const lineMaterial = new THREE.LineBasicMaterial({ color: isGrey ? 0x808080 : 0x000000 }); + const lineMaterial = new THREE.LineBasicMaterial({ color: isGray ? 0x808080 : 0x000000 }); const line = new THREE.Line(lineGeo, lineMaterial); this.scene?.add(line); - this.drawLabelTextHtml(lineEndPos, rect, isGrey); + this.drawLabelTextHtml(lineEndPos, rect, isGray); } - private drawLabelTextHtml(position: THREE.Vector3, rect: Rectangle, isGrey: boolean) { + private drawLabelTextHtml(position: THREE.Vector3, rect: Rectangle, isGray: boolean) { // Add rectangle label const spanText: HTMLElement = document.createElement("span"); spanText.innerText = this.shortenText(rect.label); @@ -347,8 +347,8 @@ export class CanvasGraphics { div.appendChild(spanPlaceholder); div.style.marginTop = "5px"; - if (isGrey) { - div.style.color = "grey"; + if (isGray) { + div.style.color = "gray"; } div.style.pointerEvents = "auto"; div.style.cursor = "pointer"; @@ -386,7 +386,7 @@ export class CanvasGraphics { const blue = ((183 - 44) * darkFactor + 44) / 255; color = new THREE.Color(red, green, blue); } else { - // grey (darkness depends on z order) + // gray (darkness depends on z order) const lower = 120; const upper = 220; const darkness = ((upper - lower) * darkFactor + lower) / 255; diff --git a/tools/winscope-ng/src/viewers/components/rects/rects.component.spec.ts b/tools/winscope-ng/src/viewers/components/rects/rects.component.spec.ts index 295d94664..b97f92290 100644 --- a/tools/winscope-ng/src/viewers/components/rects/rects.component.spec.ts +++ b/tools/winscope-ng/src/viewers/components/rects/rects.component.spec.ts @@ -18,7 +18,7 @@ import { Component, ViewChild } from "@angular/core"; import { ComponentFixture, TestBed } from "@angular/core/testing"; import { RectsComponent } from "viewers/components/rects/rects.component"; import { MatCheckboxModule } from "@angular/material/checkbox"; -import { MatCardModule } from "@angular/material/card"; +import { MatDividerModule } from "@angular/material/divider"; import { MatRadioModule } from "@angular/material/radio"; import { MatSliderModule } from "@angular/material/slider"; import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; @@ -34,7 +34,7 @@ describe("RectsComponent", () => { imports: [ CommonModule, MatCheckboxModule, - MatCardModule, + MatDividerModule, MatSliderModule, MatRadioModule ], diff --git a/tools/winscope-ng/src/viewers/components/rects/rects.component.ts b/tools/winscope-ng/src/viewers/components/rects/rects.component.ts index 2c155b453..4eddf3e70 100644 --- a/tools/winscope-ng/src/viewers/components/rects/rects.component.ts +++ b/tools/winscope-ng/src/viewers/components/rects/rects.component.ts @@ -88,13 +88,19 @@ import { ViewerEvents } from "viewers/common/viewer_events";

+
-
- +
+
`, @@ -103,12 +109,12 @@ import { ViewerEvents } from "viewers/common/viewer_events"; .view-controls { display: flex; flex-direction: column; - border-bottom: 1px solid var(--default-border); } .top-view-controls, .slider-view-controls { display: flex; flex-direction: row; flex-wrap: wrap; + column-gap: 10px; align-items: center; margin-bottom: 12px; } @@ -126,8 +132,10 @@ import { ViewerEvents } from "viewers/common/viewer_events"; top: 0; } .rects-content { - height: 0; - flex-grow: 1; + height: 100%; + width: 100%; + display: flex; + flex-direction: column; } .canvas-container { height: 100%; @@ -141,6 +149,12 @@ import { ViewerEvents } from "viewers/common/viewer_events"; .rects-canvas { cursor: pointer; } + .display-button-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + column-gap: 10px; + } ` ] }) diff --git a/tools/winscope-ng/src/viewers/components/styles/node.styles.ts b/tools/winscope-ng/src/viewers/components/styles/node.styles.ts index 01b859cbd..c75236220 100644 --- a/tools/winscope-ng/src/viewers/components/styles/node.styles.ts +++ b/tools/winscope-ng/src/viewers/components/styles/node.styles.ts @@ -55,7 +55,6 @@ export const treeNodeDataViewStyles = ` export const nodeInnerItemStyles = ` .leaf-node-icon {content: ''; display: inline-block; margin-left: 40%; margin-top: 40%; height: 5px; width: 5px; border-radius: 50%;background-color: #9b9b9b;} .leaf-node-icon-wrapper, .description, .toggle-tree-btn, .expand-tree-btn, .pin-node-btn { position: relative; display: inline-block;} - mat-icon {margin: 0} .pin-node-btn {padding: 0; transform: scale(0.7)} .description {align-items: center; flex: 1 1 auto; vertical-align: middle; word-break: break-all;} .leaf-node-icon-wrapper{padding-left: 6px; padding-right: 6px; min-height: 24px; width: 24px; position:relative; align-content: center; vertical-align: middle;} diff --git a/tools/winscope-ng/src/viewers/components/viewer_input_method.component.spec.ts b/tools/winscope-ng/src/viewers/components/viewer_input_method.component.spec.ts index 186ecd758..af1791064 100644 --- a/tools/winscope-ng/src/viewers/components/viewer_input_method.component.spec.ts +++ b/tools/winscope-ng/src/viewers/components/viewer_input_method.component.spec.ts @@ -17,8 +17,8 @@ import {ComponentFixture, TestBed} from "@angular/core/testing"; import { ViewerInputMethodComponent } from "./viewer_input_method.component"; import { HierarchyComponent } from "viewers/components/hierarchy.component"; import { PropertiesComponent } from "viewers/components/properties.component"; +import { MatDividerModule } from "@angular/material/divider"; import { MatIconModule } from "@angular/material/icon"; -import { MatCardModule } from "@angular/material/card"; import { ComponentFixtureAutoDetect } from "@angular/core/testing"; import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/core"; @@ -34,7 +34,7 @@ describe("ViewerInputMethodComponent", () => { ], imports: [ MatIconModule, - MatCardModule + MatDividerModule ], declarations: [ ViewerInputMethodComponent, diff --git a/tools/winscope-ng/src/viewers/components/viewer_input_method.component.ts b/tools/winscope-ng/src/viewers/components/viewer_input_method.component.ts index f7d64a88a..f2ef48282 100644 --- a/tools/winscope-ng/src/viewers/components/viewer_input_method.component.ts +++ b/tools/winscope-ng/src/viewers/components/viewer_input_method.component.ts @@ -37,12 +37,19 @@ import { ImeUiData } from "viewers/common/ime_ui_data"; [store]="store" [userOptions]="inputData?.hierarchyUserOptions ?? {}" > - + + + + + +
+ + + { ], imports: [ MatIconModule, - MatCardModule + MatDividerModule ], declarations: [ ViewerSurfaceFlingerComponent, @@ -59,17 +58,17 @@ describe("ViewerSurfaceFlingerComponent", () => { }); it("creates rects view", () => { - const rectsView = htmlElement.querySelector("#sf-rects-view"); + const rectsView = htmlElement.querySelector(".rects-view"); expect(rectsView).toBeTruthy(); }); it("creates hierarchy view", () => { - const hierarchyView = htmlElement.querySelector("#sf-hierarchy-view"); + const hierarchyView = htmlElement.querySelector(".hierarchy-view"); expect(hierarchyView).toBeTruthy(); }); it("creates properties view", () => { - const propertiesView = htmlElement.querySelector("#sf-properties-view"); + const propertiesView = htmlElement.querySelector(".properties-view"); expect(propertiesView).toBeTruthy(); }); }); diff --git a/tools/winscope-ng/src/viewers/viewer_surface_flinger/viewer_surface_flinger.component.ts b/tools/winscope-ng/src/viewers/viewer_surface_flinger/viewer_surface_flinger.component.ts index d1e1d2c1b..d04056f9a 100644 --- a/tools/winscope-ng/src/viewers/viewer_surface_flinger/viewer_surface_flinger.component.ts +++ b/tools/winscope-ng/src/viewers/viewer_surface_flinger/viewer_surface_flinger.component.ts @@ -27,7 +27,6 @@ import { PersistentStore } from "common/persistent_store"; template: `
+ + { { provide: ComponentFixtureAutoDetect, useValue: true } ], imports: [ + MatDividerModule, ScrollingModule ], declarations: [ diff --git a/tools/winscope-ng/src/viewers/viewer_transactions/viewer_transactions.component.ts b/tools/winscope-ng/src/viewers/viewer_transactions/viewer_transactions.component.ts index 67c0cf4d9..2f5fe0d67 100644 --- a/tools/winscope-ng/src/viewers/viewer_transactions/viewer_transactions.component.ts +++ b/tools/winscope-ng/src/viewers/viewer_transactions/viewer_transactions.component.ts @@ -111,6 +111,8 @@ import {UiData} from "./ui_data";
+ +

Properties - Proto Dump

{ ], imports: [ MatIconModule, - MatCardModule + MatDividerModule ], declarations: [ ViewerWindowManagerComponent, @@ -59,17 +58,17 @@ describe("ViewerWindowManagerComponent", () => { }); it("creates rects view", () => { - const rectsView = htmlElement.querySelector("#wm-rects-view"); + const rectsView = htmlElement.querySelector(".rects-view"); expect(rectsView).toBeTruthy(); }); it("creates hierarchy view", () => { - const hierarchyView = htmlElement.querySelector("#wm-hierarchy-view"); + const hierarchyView = htmlElement.querySelector(".hierarchy-view"); expect(hierarchyView).toBeTruthy(); }); it("creates properties view", () => { - const propertiesView = htmlElement.querySelector("#wm-properties-view"); + const propertiesView = htmlElement.querySelector(".properties-view"); expect(propertiesView).toBeTruthy(); }); }); diff --git a/tools/winscope-ng/src/viewers/viewer_window_manager/viewer_window_manager.component.ts b/tools/winscope-ng/src/viewers/viewer_window_manager/viewer_window_manager.component.ts index d1be34da1..e03aa57b6 100644 --- a/tools/winscope-ng/src/viewers/viewer_window_manager/viewer_window_manager.component.ts +++ b/tools/winscope-ng/src/viewers/viewer_window_manager/viewer_window_manager.component.ts @@ -27,15 +27,14 @@ import { PersistentStore } from "common/persistent_store"; template: `
+ +