Skip to content

Commit a5a3466

Browse files
author
proberge
committed
Chrome Cleanup WebUI: polishing fixes from implementation review
Resize spinner, standardize color use, add learn more to error state, change reboot required icon Also makes chrome://settings/help use the right colors. Bug: 747124 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ifae6b61cc4ffa668dbe095333f3590a2d97277a4 Reviewed-on: https://chromium-review.googlesource.com/580360 Reviewed-by: Tommy Li <[email protected]> Commit-Queue: proberge <[email protected]> Cr-Commit-Position: refs/heads/master@{#488992} (cherry picked from commit 435ed18) Change-Id: I6f20ec0a45aec8f19e4df42921a994567576c7d9 Reviewed-on: https://chromium-review.googlesource.com/590349 Reviewed-by: proberge <[email protected]> Cr-Commit-Position: refs/branch-heads/3163@{#85} Cr-Branched-From: ff259ba-refs/heads/master@{#488528}
1 parent 97e7eb3 commit a5a3466

File tree

3 files changed

+40
-25
lines changed

3 files changed

+40
-25
lines changed

chrome/browser/resources/settings/about_page/about_page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
}
6565

6666
iron-icon[icon='settings:error'] {
67-
fill: var(--paper-red-600);
67+
fill: var(--google-red-700);
6868
}
6969

7070
.settings-box .start {

chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<dom-module id="settings-chrome-cleanup-page">
1919
<template>
2020
<style include="settings-shared">
21+
#cleaning-spinner {
22+
height: 20px;
23+
width: 20px;
24+
}
25+
2126
#files-to-remove-container {
2227
padding: 0 var(--settings-box-row-padding);
2328
/* Use the full available width for file paths to avoid inconsistent
@@ -31,6 +36,10 @@
3136
word-break: break-all;
3237
}
3338

39+
#learn-more {
40+
-webkit-margin-start: 0;
41+
}
42+
3443
#powered-by-settings-box {
3544
min-height: 1em;
3645
}
@@ -51,25 +60,25 @@
5160
}
5261

5362
#status-icon {
54-
height: 24px;
55-
width: 24px;
63+
height: 20px;
64+
vertical-align: top;
65+
width: 20px;
5666
}
5767

5868
.status-icon-container {
59-
-webkit-padding-end: 12px;
60-
min-width: 28px;
69+
-webkit-padding-end: var(--settings-box-row-padding);
6170
}
6271

6372
.status-icon-remove {
6473
--iron-icon-fill-color: var(--paper-grey-700);
6574
}
6675

6776
.status-icon-done {
68-
--iron-icon-fill-color: var(--paper-blue-500);
77+
--iron-icon-fill-color: var(--google-blue-500);
6978
}
7079

7180
.status-icon-warning {
72-
--iron-icon-fill-color: var(--paper-red-700);
81+
--iron-icon-fill-color: var(--google-red-700);
7382
}
7483

7584
.top-aligned-settings-box {
@@ -85,15 +94,16 @@
8594
hidden="[[!isRemoving_]]">
8695
</paper-spinner>
8796
<iron-icon icon="[[statusIcon_]]" hidden="[[isRemoving_]]"
88-
class$="[[statusIconClassName_]]"
89-
id="status-icon">
90-
</iron-icon>
97+
class$="[[statusIconClassName_]]" id="status-icon"></iron-icon>
9198
</div>
9299
<div class="start">
93100
<div>[[title_]]</div>
94-
<div class="secondary" hidden="[[!showDetails_]]">
95-
$i18n{chromeCleanupExplanation}
96-
<a href="$i18n{chromeCleanupLearnMoreUrl}" target="_blank">
101+
<div class="secondary">
102+
<span hidden="[[!showDetails_]]">
103+
$i18n{chromeCleanupExplanation}
104+
</span>
105+
<a id="learn-more" href="$i18n{chromeCleanupLearnMoreUrl}"
106+
target="_blank" hidden="[[!showLearnMore_]]">
97107
$i18n{learnMore}
98108
</a>
99109
</div>

chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ Polymer({
6565
value: false,
6666
},
6767

68+
/**
69+
* Learn more should only be visible for the infected, cleaning and error
70+
* states.
71+
* @private
72+
*/
73+
showLearnMore_: {
74+
type: Boolean,
75+
value: false,
76+
},
77+
6878
/** @private */
6979
showLogsPermission_: {
7080
type: Boolean,
@@ -119,12 +129,6 @@ Polymer({
119129
/** @private {?function()} */
120130
doAction_: null,
121131

122-
/**
123-
* If true, this settings page is waiting for cleanup results.
124-
* @private {boolean}
125-
*/
126-
waitingForCleanupResults_: false,
127-
128132
/** @override */
129133
attached: function() {
130134
this.browserProxy_ = settings.ChromeCleanupProxyImpl.getInstance();
@@ -196,6 +200,7 @@ Polymer({
196200
this.enableActionButton_(
197201
this.i18n('chromeCleanupDoneButtonLabel'), this.dismiss_.bind(this));
198202
this.setIconDone_();
203+
this.showLearnMore_ = false;
199204
} else if (idleReason == settings.ChromeCleanupIdleReason.INITIAL) {
200205
this.dismiss_();
201206
} else {
@@ -205,11 +210,11 @@ Polymer({
205210
this.enableActionButton_(
206211
this.i18n('chromeCleanupDoneButtonLabel'), this.dismiss_.bind(this));
207212
this.setIconWarning_();
213+
this.showLearnMore_ = true;
208214
}
209215

210216
this.isRemoving_ = false;
211217
this.disableDetails_();
212-
this.waitingForCleanupResults_ = false;
213218
},
214219

215220
/**
@@ -249,7 +254,6 @@ Polymer({
249254
* @private
250255
*/
251256
onCleaning_: function(files) {
252-
this.waitingForCleanupResults_ = true;
253257
this.title_ = this.i18n('chromeCleanupTitleRemoving');
254258
this.isRemoving_ = true;
255259
this.resetIcon_();
@@ -267,7 +271,8 @@ Polymer({
267271
onRebootRequired_: function() {
268272
this.title_ = this.i18n('chromeCleanupTitleRestart');
269273
this.isRemoving_ = false;
270-
this.setIconWarning_();
274+
this.showLearnMore_ = false;
275+
this.setIconDone_();
271276
this.enableActionButton_(
272277
this.i18n('chromeCleanupRestartButtonLabel'),
273278
this.restartComputer_.bind(this));
@@ -354,6 +359,7 @@ Polymer({
354359
enableDetails_: function(files) {
355360
this.showDetails_ = true;
356361
this.showLogsPermission_ = true;
362+
this.showLearnMore_ = true;
357363
// Note: doesn't change the state of this.showFilesToRemove_.
358364
this.filesToRemove_ = files;
359365
},
@@ -385,8 +391,7 @@ Polymer({
385391
},
386392

387393
/**
388-
* Sets the card's icon as a warning (in case of computer restart required
389-
* or failure).
394+
* Sets the card's icon as a warning (in case of failure).
390395
* @private
391396
*/
392397
setIconWarning_: function() {
@@ -395,7 +400,7 @@ Polymer({
395400
},
396401

397402
/**
398-
* Sets the card's icon as a completed indication.
403+
* Sets the card's icon as a completed or reboot required indication.
399404
* @private
400405
*/
401406
setIconDone_: function() {

0 commit comments

Comments
 (0)