Skip to content

Commit ad42fef

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
Duplicate settings screen css styles
Previously we relied on the settings screen styles in order to style the settings pages outside of the settings panel. Remove the cross-panel css dependency and duplicate the css settings. Bug: 368238837 Change-Id: Ie06f08d68e93868fcb1b185ad80095750656ac5a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999250 Reviewed-by: Simon Zünd <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]>
1 parent 8b8dc6c commit ad42fef

File tree

6 files changed

+52
-6
lines changed

6 files changed

+52
-6
lines changed

front_end/panels/mobile_throttling/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ devtools_module("mobile_throttling") {
3131
"../../ui/components/icon_button:bundle",
3232
"../../ui/legacy:bundle",
3333
"../../ui/visual_logging:bundle",
34-
"../settings:bundle",
3534
]
3635
}
3736

front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as Buttons from '../../ui/components/buttons/buttons.js';
99
import * as Cards from '../../ui/components/cards/cards.js';
1010
import * as UI from '../../ui/legacy/legacy.js';
1111
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
12-
import settingsScreenStyles from '../settings/settingsScreen.css.js';
1312

1413
import throttlingSettingsTabStyles from './throttlingSettingsTab.css.js';
1514

@@ -166,7 +165,7 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox implements
166165
override wasShown(): void {
167166
super.wasShown();
168167
this.list.registerCSSFiles([throttlingSettingsTabStyles]);
169-
this.registerCSSFiles([throttlingSettingsTabStyles, settingsScreenStyles]);
168+
this.registerCSSFiles([throttlingSettingsTabStyles]);
170169
this.conditionsUpdated();
171170
}
172171

front_end/panels/mobile_throttling/throttlingSettingsTab.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,28 @@
9595
.editor-buttons {
9696
margin-top: 10px;
9797
}
98+
99+
.settings-card-container-wrapper {
100+
padding-top: var(--sys-size-8);
101+
padding-bottom: var(--sys-size-8);
102+
overflow: auto;
103+
scrollbar-width: thin;
104+
}
105+
106+
@media (max-width: 1000px) {
107+
.settings-card-container-wrapper {
108+
position: absolute;
109+
top: var(--sys-size-8);
110+
left: 0;
111+
right: 0;
112+
bottom: 0;
113+
overflow: auto;
114+
}
115+
}
116+
117+
.settings-card-container {
118+
display: flex;
119+
flex-direction: column;
120+
align-items: center;
121+
gap: var(--sys-size-9);
122+
}

front_end/panels/sensors/LocationsSettingsTab.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import * as Buttons from '../../ui/components/buttons/buttons.js';
88
import * as Cards from '../../ui/components/cards/cards.js';
99
import * as UI from '../../ui/legacy/legacy.js';
1010
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
11-
import settingsScreenStyles from '../settings/settingsScreen.css.js';
1211

1312
import locationsSettingsTabStyles from './locationsSettingsTab.css.js';
1413

@@ -168,7 +167,7 @@ export class LocationsSettingsTab extends UI.Widget.VBox implements UI.ListWidge
168167

169168
override wasShown(): void {
170169
super.wasShown();
171-
this.registerCSSFiles([locationsSettingsTabStyles, settingsScreenStyles]);
170+
this.registerCSSFiles([locationsSettingsTabStyles]);
172171
this.list.registerCSSFiles([locationsSettingsTabStyles]);
173172
this.locationsUpdated();
174173
}

front_end/panels/sensors/locationsSettingsTab.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,28 @@
7070
.locations-input-container {
7171
padding: 1px;
7272
}
73+
74+
.settings-card-container-wrapper {
75+
padding-top: var(--sys-size-8);
76+
padding-bottom: var(--sys-size-8);
77+
overflow: auto;
78+
scrollbar-width: thin;
79+
}
80+
81+
@media (max-width: 1000px) {
82+
.settings-card-container-wrapper {
83+
position: absolute;
84+
top: var(--sys-size-8);
85+
left: 0;
86+
right: 0;
87+
bottom: 0;
88+
overflow: auto;
89+
}
90+
}
91+
92+
.settings-card-container {
93+
display: flex;
94+
flex-direction: column;
95+
align-items: center;
96+
gap: var(--sys-size-9);
97+
}

front_end/panels/settings/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ devtools_entrypoint("bundle") {
5252
visibility = [
5353
":*",
5454
"../../entrypoints/*",
55-
"../../panels/mobile_throttling/*",
5655
"../../panels/profiler/*",
5756
]
5857

0 commit comments

Comments
 (0)