Skip to content

Commit f6fb40c

Browse files
masnobleDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
Cookie controls tool fixes
Issues fixed by this CL: 1. Reload infobar adjustments. This includes changing the background color, changing the info icon color to match the button, and adding animation to the infobar to draw user attention to it when it appears. 2. Change the card to fill the width (with margins) rather than having a max width. Before: http://screencast/cast/NTQ1MDAxODQxNTcwNjExMnwxNTVkMDI2OS0xMw After: http://screencast/cast/Njc0NDg2NTgyNzE5MjgzMnwxYzA5ZGYyZC1iNg Bug: 375352611,b/382259993,b/382259852 Change-Id: I25b9fe94a3068263dcf41743dc381b5a63344a08 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6164389 Reviewed-by: Shuran Huang <[email protected]> Reviewed-by: Nancy Li <[email protected]> Commit-Queue: Joshua Thomas <[email protected]> Reviewed-by: Danil Somsikov <[email protected]>
1 parent 8510cd9 commit f6fb40c

File tree

7 files changed

+32
-4
lines changed

7 files changed

+32
-4
lines changed

front_end/design_tokens.css

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
--sys-typescale-body5-line-height: 16px;
108108
--sys-typescale-monospace-line-height: 1.2;
109109
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-light);
110+
--sys-motion-duration-long2: 500ms;
111+
--sys-motion-curve-spatial: cubic-bezier(0.27, 1.06, 0.18, 1.00);
110112
}
111113

112114
.theme-with-dark-background,

front_end/panels/security/CookieControlsView.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export class CookieControlsView extends UI.Widget.VBox {
274274
<div class="title">${i18nString(UIStrings.viewTitle)}</div>
275275
<div class="body">${i18nString(UIStrings.viewExplanation)}</div>
276276
</div>
277-
<devtools-card>
277+
<devtools-card class="card-container">
278278
<div slot="content" class=${Boolean(enterpriseEnabledSetting.get()) ? 'card enterprise-disabled' : 'card'}>
279279
${cardHeader}
280280
<div>

front_end/panels/security/cookieControlsView.css

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
font: var(--sys-typescale-headline4);
2424
}
2525

26+
.card-container {
27+
max-width: 100%;
28+
}
29+
2630
.card {
2731
display: flex;
2832
flex-direction: column;

front_end/ui/components/cards/card.css

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
.card {
1313
break-inside: avoid;
1414
min-width: var(--sys-size-31);
15-
max-width: var(--sys-size-35);
1615
margin: var(--sys-size-3) var(--sys-size-6) var(--sys-size-5) var(--sys-size-5);
1716
flex: 1;
1817
}

front_end/ui/legacy/infobar.css

+14-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@
33
* Use of this source code is governed by a BSD-style license that can be
44
* found in the LICENSE file.
55
*/
6+
:host {
7+
transition: all var(--sys-motion-duration-long2);
8+
transition-timing-function: var(--sys-motion-curve-spatial);
9+
}
10+
11+
@starting-style {
12+
:host {
13+
height: 0;
14+
opacity: 0%;
15+
}
16+
}
617

718
.infobar {
819
color: var(--sys-color-on-surface);
20+
background-color: var(--sys-color-surface1);
921
display: flex;
1022
flex: auto;
1123
flex-direction: column;
@@ -89,7 +101,7 @@
89101

90102
.info-icon {
91103
mask-image: var(--image-file-info);
92-
background-color: var(--icon-info);
104+
background-color: var(--sys-color-primary);
93105
}
94106

95107
.warning-icon {
@@ -104,7 +116,7 @@
104116

105117
.issue-icon {
106118
mask-image: var(--image-file-issue-text-filled);
107-
background-color: var(--icon-info);
119+
background-color: var(--sys-color-primary);
108120
}
109121

110122
.icon {

test/e2e/network/network-request-view_test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const SIMPLE_PAGE_URL = `requests.html?num=${SIMPLE_PAGE_REQUEST_NUMBER}`;
3838

3939
const configureAndCheckHeaderOverrides = async () => {
4040
const infoBar = await waitForAria('Select a folder to store override files in.');
41+
// Allow time for infobar to animate in before clicking the button
42+
await new Promise<void>(resolve => setTimeout(resolve, 550));
4143
await click('.infobar-main-row .infobar-button', {
4244
root: infoBar,
4345
});

test/e2e/sources/overrides_test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ describe('Overrides panel', function() {
152152

153153
// File permission pop up
154154
const infoBar = await waitForAria('Select a folder to store override files in.');
155+
// Allow time for infobar to animate in before clicking the button
156+
await new Promise<void>(resolve => setTimeout(resolve, 550));
155157
await click('.infobar-main-row .infobar-button', {root: infoBar});
156158

157159
// Open & close the file in the Sources panel
@@ -216,6 +218,8 @@ describe('Overrides panel', function() {
216218

217219
// File permission pop up
218220
const infoBar = await waitForAria('Select a folder to store override files in.');
221+
// Allow time for infobar to animate in before clicking the button
222+
await new Promise<void>(resolve => setTimeout(resolve, 550));
219223
await click('.infobar-main-row .infobar-button', {root: infoBar});
220224
await waitFor('[aria-label="coffees.json, file"]');
221225

@@ -299,6 +303,7 @@ describe('Overrides panel', function() {
299303

300304
// File permission pop up
301305
const infoBar = await waitForAria('Select a folder to store override files in.');
306+
await new Promise<void>(resolve => setTimeout(resolve, 550));
302307
await click('.infobar-main-row .infobar-button', {root: infoBar});
303308

304309
// Open the file in the Sources panel
@@ -324,6 +329,8 @@ describe('Overrides panel', function() {
324329

325330
// File permission pop up
326331
const infoBar = await waitForAria('Select a folder to store override files in.');
332+
// Allow time for infobar to animate in before clicking the button
333+
await new Promise<void>(resolve => setTimeout(resolve, 550));
327334
await click('.infobar-main-row .infobar-button', {root: infoBar});
328335

329336
// Open the main folder in the Sources panel
@@ -348,6 +355,8 @@ describe('Overrides panel', function() {
348355

349356
// File permission pop up
350357
const infoBar = await waitForAria('Select a folder to store override files in.');
358+
// Allow time for infobar to animate in before clicking the button
359+
await new Promise<void>(resolve => setTimeout(resolve, 550));
351360
await click('.infobar-main-row .infobar-button', {root: infoBar});
352361

353362
// Open the sub folder in the Sources panel

0 commit comments

Comments
 (0)