Skip to content

Commit 1096554

Browse files
paulirishDevtools-frontend LUCI CQ
authored andcommitted
RPP: Polish UI
- Reduce insight sidebar whitespace - Drop transition on insight hover button. - Make Magic pen animation smoother Change-Id: I6a1cc2d83e73db66472d945bd51960c5417da547 Bug: 395797366 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6395296 Auto-Submit: Paul Irish <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Commit-Queue: Paul Irish <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
1 parent bcd8cd9 commit 1096554

File tree

9 files changed

+9
-14
lines changed

9 files changed

+9
-14
lines changed

front_end/panels/timeline/components/insights/baseInsightComponent.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
position: relative;
1010
width: auto;
1111
height: auto;
12-
margin: var(--sys-size-6) 0;
12+
margin: var(--sys-size-5) 0;
1313
border-radius: var(--sys-shape-corner-extra-small);
1414
overflow: hidden;
1515
border: var(--sys-size-1) solid var(--sys-color-divider);
@@ -26,7 +26,7 @@
2626
}
2727

2828
header {
29-
padding: var(--sys-size-5) var(--sys-size-6);
29+
padding: var(--sys-size-5) var(--sys-size-4);
3030

3131
h3 {
3232
font: var(--sys-typescale-body4-medium);
@@ -52,18 +52,13 @@
5252
border-radius: var(--sys-shape-corner-full);
5353
background: var(--sys-color-cdt-base-container);
5454
opacity: 0%;
55-
transition: opacity 0.2s ease;
5655

5756
/* Ensure that the icon appears when the user hovers, or focuses the header */
5857
.insight:hover &,
5958
header:focus-within & {
6059
opacity: 100%;
6160
}
6261

63-
devtools-button {
64-
transition: transform 0.2s ease;
65-
}
66-
6762
&.active devtools-button {
6863
transform: rotate(180deg);
6964
}
@@ -76,7 +71,7 @@
7671
}
7772

7873
.insight-body {
79-
padding: 0 var(--sys-size-6) var(--sys-size-5) var(--sys-size-6);
74+
padding: 0 var(--sys-size-4) var(--sys-size-5);
8075

8176
.list-title {
8277
margin-top: var(--sys-size-4);

front_end/panels/timeline/components/sidebarSingleInsightSet.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
:host {
88
display: block;
9-
padding: 5px 10px;
9+
padding: 5px 8px;
1010
}
1111

1212
.metrics {

front_end/panels/timeline/overlays/components/entryLabelOverlay.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
gap: var(--sys-size-4);
3636
pointer-events: auto;
3737
transition:
38-
width var(--sys-motion-duration-long2) var(--sys-motion-easing-emphasized);
38+
all var(--sys-motion-duration-medium2) var(--sys-motion-easing-emphasized);
3939

4040
&.only-pen-wrapper {
4141
/* when the button wrapper is not hovered, set the max width to only fit the pen icon */
@@ -45,7 +45,7 @@
4545
}
4646

4747
* {
48-
/* Make up for the padding in a hovered button to only see the pen icon when it is not hovered */
48+
/* When unhovered, shift the contents left you don't see the border of the .ai-label-button */
4949
transform: translateX(-2px);
5050
}
5151
}
@@ -59,11 +59,10 @@
5959
.ai-label-button-wrapper:focus,
6060
.ai-label-button-wrapper:focus-within,
6161
.ai-label-button-wrapper:hover {
62-
width: fit-content;
62+
width: auto;
6363
height: var(--sys-size-13);
6464
padding: var(--sys-size-3) var(--sys-size-5);
65-
overflow: hidden;
66-
top: -4px;
65+
transform: translateY(-9px); /* -9px is the original -3px minus 6px (coming from the padding adjustment) */
6766

6867
* {
6968
transform: translateX(0);

front_end/ui/visual_logging/KnownContextValues.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,7 @@ export const knownContextValues = new Set([
36553655
'timeline.toggle-insight.cls-culprits',
36563656
'timeline.toggle-insight.document-latency',
36573657
'timeline.toggle-insight.dom-size',
3658+
'timeline.toggle-insight.duplicated-javascript',
36583659
'timeline.toggle-insight.font-display',
36593660
'timeline.toggle-insight.forced-reflow',
36603661
'timeline.toggle-insight.image-delivery',
-802 Bytes
Loading
249 Bytes
Loading
249 Bytes
Loading
-309 Bytes
Loading
-136 Bytes
Loading

0 commit comments

Comments
 (0)