Skip to content

Commit 6f40ae5

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Reland "Add horizontal scrollbar to view table details in a smaller screen"
This is a reland of commit 02f8f31 The original issue was fixed by crrev.com/c/6680411 Original change's description: > Add horizontal scrollbar to view table details in a smaller screen > > Increasing padding for column, so that the info in Constructor is more > visible > > Before: https://screenshot.googleplex.com/89wKSdRFeXpka3r > After: https://screenshot.googleplex.com/BkYGs4unaghWfhr > > Fixed: 333614642 > Change-Id: I1406c3d400410d1e27c1c267d447ba9ede70d6dc > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6651373 > Auto-Submit: Samiya Caur <samiyac@chromium.org> > Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> > Commit-Queue: Samiya Caur <samiyac@chromium.org> Fixed: 333614642 Change-Id: I0abdedf84deb49c742d5b5bc35524f3ee5089061 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6680412 Reviewed-by: Samiya Caur <samiyac@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
1 parent 40c1bc7 commit 6f40ae5

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

front_end/panels/profiler/heapProfiler.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
.heap-snapshot-view .data-grid {
3737
border: none;
3838
flex: auto;
39+
40+
.data-container {
41+
overflow-x: scroll;
42+
}
43+
44+
.corner {
45+
width: 100%;
46+
}
3947
}
4048

4149
.heap-snapshot-view .data-grid tr:empty {

front_end/ui/legacy/components/data_grid/DataGrid.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
10291029
}
10301030

10311031
private applyColumnWeights(): void {
1032-
let tableWidth = this.element.offsetWidth - this.cornerWidth;
1032+
// Subtract 1 to prevent unnecessary overflow in x-axis
1033+
let tableWidth = this.element.offsetWidth - this.cornerWidth - 1;
10331034
if (tableWidth <= 0) {
10341035
return;
10351036
}
@@ -1048,7 +1049,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
10481049
}
10491050
let sum = 0;
10501051
let lastOffset = 0;
1051-
const minColumnWidth = 14; // px
1052+
const minColumnWidth = ColumnResizePadding; // px
10521053

10531054
for (let i = 0; i < this.visibleColumnsArray.length; ++i) {
10541055
const column = this.visibleColumnsArray[i];
@@ -1705,7 +1706,7 @@ export const enum DataType {
17051706
BOOLEAN = 'Boolean',
17061707
}
17071708

1708-
export const ColumnResizePadding = 34;
1709+
export const ColumnResizePadding = 30;
17091710
export const CenterResizerOverBorderAdjustment = 3;
17101711

17111712
export const enum ResizeMethod {
-490 Bytes
Loading
-1.82 KB
Loading
-2.29 KB
Loading

0 commit comments

Comments
 (0)