Skip to content

Commit 36943d1

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Hide layers information if nothing can be shown
This changes the layers panel to only show the empty state if nothing can be shown yet. Before: https://i.imgur.com/jC0gqBa.png After: https://i.imgur.com/VvoIxie.png Fixed: 400383914 Change-Id: I0ea7d8438d86dc8a000b09582739368a4ac9b171 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6415488 Reviewed-by: Kateryna Prokopenko <[email protected]> Commit-Queue: Kateryna Prokopenko <[email protected]> Auto-Submit: Kim-Anh Tran <[email protected]>
1 parent 3b54890 commit 36943d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

front_end/panels/layers/LayersPanel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ export class LayersPanel extends UI.Panel.PanelWithSidebar implements SDK.Target
7777

7878
this.rightSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'layer-details-split-view-state');
7979
this.splitWidget().setMainWidget(this.rightSplitWidget);
80+
this.splitWidget().hideSidebar();
8081

8182
this.layers3DView = new LayerViewer.Layers3DView.Layers3DView(this.layerViewHost);
8283
this.rightSplitWidget.setMainWidget(this.layers3DView);
84+
this.rightSplitWidget.hideSidebar();
8385
this.layers3DView.addEventListener(
8486
LayerViewer.Layers3DView.Events.PAINT_PROFILER_REQUESTED, this.onPaintProfileRequested, this);
8587
this.layers3DView.addEventListener(LayerViewer.Layers3DView.Events.SCALE_CHANGED, this.onScaleChanged, this);
@@ -155,6 +157,8 @@ export class LayersPanel extends UI.Panel.PanelWithSidebar implements SDK.Target
155157

156158
update(): void {
157159
if (this.model) {
160+
this.splitWidget().showBoth();
161+
this.rightSplitWidget.showBoth();
158162
this.layerViewHost.setLayerTree(this.model.layerTree());
159163
const resourceModel = this.model.target().model(SDK.ResourceTreeModel.ResourceTreeModel);
160164
if (resourceModel) {

test/e2e/helpers/layers-helpers.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export async function getCurrentUrl() {
1616

1717
export function veImpressionForLayersPanel() {
1818
return veImpression('Panel', 'layers', [
19-
veImpression('Pane', 'sidebar'),
2019
veImpression(
2120
'Pane', 'layers-3d-view',
2221
[
@@ -31,7 +30,5 @@ export function veImpressionForLayersPanel() {
3130
]),
3231
veImpression('Canvas', 'layers'),
3332
]),
34-
veImpression('Pane', 'layers-details', [veImpression('Section', 'empty-view')]),
35-
veImpression('PanelTabHeader', 'details'),
3633
]);
3734
}

0 commit comments

Comments
 (0)