Skip to content

Commit ac4ee80

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Add icon to warnings in Experiments section
Drive-by: Remove accidentally added warning prefix. Before: https://i.imgur.com/3aNWZux.png After: https://i.imgur.com/X6CwB4u.png Bug: 368238837 Change-Id: Ib85a4fcabe8415e4e452e4de78766f0a1f77574f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999481 Reviewed-by: Kateryna Prokopenko <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]> Auto-Submit: Kim-Anh Tran <[email protected]>
1 parent fd8d0a7 commit ac4ee80

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

front_end/panels/settings/SettingsScreen.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import type * as Platform from '../../core/platform/platform.js';
3535
import * as Root from '../../core/root/root.js';
3636
import * as Buttons from '../../ui/components/buttons/buttons.js';
3737
import * as Cards from '../../ui/components/cards/cards.js';
38+
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
3839
import * as Components from '../../ui/legacy/components/utils/utils.js';
3940
import * as UI from '../../ui/legacy/legacy.js';
4041
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
@@ -86,7 +87,7 @@ const UIStrings = {
8687
* @description Warning text shown when the user has entered text to filter the
8788
* list of experiments, but no experiments match the filter.
8889
*/
89-
noResults: 'Warning: No experiments match the filter',
90+
noResults: 'No experiments match the filter',
9091
/**
9192
*@description Text that is usually a hyperlink to more documentation
9293
*/
@@ -467,6 +468,9 @@ export class ExperimentsSettingsTab extends SettingsTab {
467468

468469
private createExperimentsWarningSubsection(warningMessage: string): HTMLElement {
469470
const subsection = document.createElement('div');
471+
subsection.classList.add('experiments-warning-subsection');
472+
const warningIcon = IconButton.Icon.create('warning');
473+
subsection.appendChild(warningIcon);
470474
const warning = subsection.createChild('span');
471475
warning.textContent = warningMessage;
472476
return subsection;

front_end/panels/settings/settingsScreen.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ devtools-button.link-icon {
146146
overflow: visible !important; /* stylelint-disable-line declaration-no-important */
147147
}
148148

149+
.experiments-warning-subsection {
150+
display: flex;
151+
align-items: center;
152+
153+
> devtools-icon {
154+
color: var(--sys-color-orange-bright);
155+
margin-right: var(--sys-size-4);
156+
}
157+
}
158+
149159
@media (forced-colors: active) {
150160
.settings-window-title {
151161
color: canvastext;

0 commit comments

Comments
 (0)