Skip to content

Commit bdb4bce

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Set title on individual options in throttling SelectMenus
Fixed: 383465162 Change-Id: I378e69825fbbdafecd320acc8e035029f3860067 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6089366 Commit-Queue: Adam Raine <[email protected]> Auto-Submit: Connor Clark <[email protected]> Commit-Queue: Connor Clark <[email protected]> Reviewed-by: Adam Raine <[email protected]>
1 parent a7d0715 commit bdb4bce

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

front_end/panels/timeline/components/CPUThrottlingSelector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class CPUThrottlingSelector extends HTMLElement {
114114
.showConnector=${false}
115115
.jslogContext=${'cpu-throttling'}
116116
.buttonTitle=${i18nString(UIStrings.cpu, {PH1: selectionTitle})}
117-
title=${i18nString(UIStrings.cpuThrottling, {PH1: selectionTitle})}
117+
.title=${i18nString(UIStrings.cpuThrottling, {PH1: selectionTitle})}
118118
>
119119
${MobileThrottling.ThrottlingPresets.ThrottlingPresets.cpuThrottlingPresets.map(rate => {
120120
let title = rate === 1 ? i18nString(UIStrings.noThrottling) : i18nString(UIStrings.dSlowdown, {PH1: rate});
@@ -127,6 +127,7 @@ export class CPUThrottlingSelector extends HTMLElement {
127127
<devtools-menu-item
128128
.value=${rate}
129129
.selected=${this.#currentRate === rate}
130+
.title=${title}
130131
jslog=${VisualLogging.item(jslogContext).track({click: true})}
131132
>
132133
${title}

front_end/panels/timeline/components/NetworkThrottlingSelector.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ export class NetworkThrottlingSelector extends HTMLElement {
191191
.showConnector=${false}
192192
.jslogContext=${'network-conditions'}
193193
.buttonTitle=${i18nString(UIStrings.network, {PH1: selectionTitle})}
194-
title=${i18nString(UIStrings.networkThrottling, {PH1: selectionTitle})}
194+
.title=${i18nString(UIStrings.networkThrottling, {PH1: selectionTitle})}
195195
>
196196
${this.#groups.map(group => {
197197
return html`
198-
<devtools-menu-group .name=${group.name}>
198+
<devtools-menu-group .name=${group.name} .title=${group.name}>
199199
${group.items.map(conditions => {
200200
let title = this.#getConditionsTitle(conditions);
201201
if (conditions === this.#recommendedConditions) {
@@ -208,6 +208,7 @@ export class NetworkThrottlingSelector extends HTMLElement {
208208
<devtools-menu-item
209209
.value=${key}
210210
.selected=${selectedConditionsKey === key}
211+
.title=${title}
211212
jslog=${VisualLogging.item(jslogContext).track({click: true})}
212213
>
213214
${title}
@@ -217,6 +218,7 @@ export class NetworkThrottlingSelector extends HTMLElement {
217218
${group.showCustomAddOption ? html`
218219
<devtools-menu-item
219220
.value=${1 /* This won't be displayed unless it has some value. */}
221+
.title=${i18nString(UIStrings.add)}
220222
jslog=${VisualLogging.action('add').track({click: true})}
221223
@click=${this.#onAddClick}
222224
>

0 commit comments

Comments
 (0)