chrome-devtools-frontend 1.0.1572937 → 1.0.1573331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/sdk/IsolateManager.ts +0 -7
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +7 -7
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +4 -4
- package/front_end/panels/ai_assistance/PatchWidget.ts +3 -4
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +5 -5
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +32 -3
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +31 -9
- package/front_end/panels/application/FrameDetailsView.ts +3 -4
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +2 -2
- package/front_end/panels/application/components/ReportsGrid.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/autofill/AutofillView.ts +3 -3
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +3 -2
- package/front_end/panels/common/GdpSignUpDialog.ts +3 -3
- package/front_end/panels/console/ConsoleInsightTeaser.ts +3 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +7 -7
- package/front_end/panels/issues/IssueView.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +4 -4
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.ts +2 -2
- package/front_end/panels/profiler/IsolateSelector.ts +1 -2
- package/front_end/panels/recorder/RecorderController.ts +2 -2
- package/front_end/panels/security/CookieReportView.ts +6 -6
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +1 -1
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
- package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
- package/front_end/ui/components/text_editor/AutocompleteHistory.ts +33 -1
- package/package.json +1 -1
|
@@ -49,13 +49,6 @@ export class IsolateManager extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
unobserveIsolates(observer: Observer): void {
|
|
53
|
-
this.#observers.delete(observer);
|
|
54
|
-
if (!this.#observers.size) {
|
|
55
|
-
this.#pollId++;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
52
|
modelAdded(model: RuntimeModel): void {
|
|
60
53
|
void this.#modelAdded(model);
|
|
61
54
|
}
|
|
@@ -106,7 +106,7 @@ Content:
|
|
|
106
106
|
"type": 1,
|
|
107
107
|
"description": "JavaScript code snippet to run on the inspected page. Make sure the code is formatted for readability.\n\n# Instructions\n\n* To return data, define a top-level `data` variable and populate it with data you want to get. Only JSON-serializable objects can be assigned to `data`.\n* If you modify styles on an element, ALWAYS call the pre-defined global `async setElementStyles(el: Element, styles: object)` function. This function is an internal mechanism for you and should never be presented as a command/advice to the user.\n* **CRITICAL** Only get styles that might be relevant to the user request.\n* **CRITICAL** Never assume a selector for the elements unless you verified your knowledge.\n* **CRITICAL** Consider that `data` variable from the previous function calls are not available in a new function call.\n\nFor example, the code to change element styles:\n\n```\nawait setElementStyles($0, {\n color: 'blue',\n});\n```\n\nFor example, the code to get overlapping elements:\n\n```\nconst data = {\n overlappingElements: Array.from(document.querySelectorAll('*'))\n .filter(el => {\n const rect = el.getBoundingClientRect();\n const popupRect = $0.getBoundingClientRect();\n return (\n el !== $0 &&\n rect.left < popupRect.right &&\n rect.right > popupRect.left &&\n rect.top < popupRect.bottom &&\n rect.bottom > popupRect.top\n );\n })\n .map(el => ({\n tagName: el.tagName,\n id: el.id,\n className: el.className,\n zIndex: window.getComputedStyle(el)['z-index']\n }))\n};\n```\n"
|
|
108
108
|
},
|
|
109
|
-
"
|
|
109
|
+
"explanation": {
|
|
110
110
|
"type": 1,
|
|
111
111
|
"description": "Explain why you want to run this code"
|
|
112
112
|
},
|
|
@@ -117,7 +117,7 @@ Content:
|
|
|
117
117
|
},
|
|
118
118
|
"required": [
|
|
119
119
|
"code",
|
|
120
|
-
"
|
|
120
|
+
"explanation",
|
|
121
121
|
"title"
|
|
122
122
|
]
|
|
123
123
|
}
|
|
@@ -155,7 +155,7 @@ Content:
|
|
|
155
155
|
"name": "executeJavaScript",
|
|
156
156
|
"args": {
|
|
157
157
|
"title": "title2",
|
|
158
|
-
"
|
|
158
|
+
"explanation": "thought2",
|
|
159
159
|
"code": "action2"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -259,7 +259,7 @@ Content:
|
|
|
259
259
|
"name": "executeJavaScript",
|
|
260
260
|
"args": {
|
|
261
261
|
"code": "const data = {\"test\": \"observation\"}",
|
|
262
|
-
"
|
|
262
|
+
"explanation": "I am thinking.",
|
|
263
263
|
"title": "thinking"
|
|
264
264
|
}
|
|
265
265
|
}
|
|
@@ -451,7 +451,7 @@ Content:
|
|
|
451
451
|
"functionCall": {
|
|
452
452
|
"name": "executeJavaScript",
|
|
453
453
|
"args": {
|
|
454
|
-
"
|
|
454
|
+
"explanation": "thought 1",
|
|
455
455
|
"title": "test",
|
|
456
456
|
"code": "console.log('test')"
|
|
457
457
|
}
|
|
@@ -479,7 +479,7 @@ Content:
|
|
|
479
479
|
"functionCall": {
|
|
480
480
|
"name": "executeJavaScript",
|
|
481
481
|
"args": {
|
|
482
|
-
"
|
|
482
|
+
"explanation": "thought 2",
|
|
483
483
|
"title": "test",
|
|
484
484
|
"code": "console.log('test')"
|
|
485
485
|
}
|
|
@@ -507,7 +507,7 @@ Content:
|
|
|
507
507
|
"functionCall": {
|
|
508
508
|
"name": "executeJavaScript",
|
|
509
509
|
"args": {
|
|
510
|
-
"
|
|
510
|
+
"explanation": "thought 3",
|
|
511
511
|
"title": "test",
|
|
512
512
|
"code": "console.log('test')"
|
|
513
513
|
}
|
|
@@ -330,7 +330,7 @@ export class StylingAgent extends AiAgent<SDK.DOMModel.DOMNode> {
|
|
|
330
330
|
|
|
331
331
|
this.declareFunction<{
|
|
332
332
|
title: string,
|
|
333
|
-
|
|
333
|
+
explanation: string,
|
|
334
334
|
code: string,
|
|
335
335
|
}>('executeJavaScript', {
|
|
336
336
|
description:
|
|
@@ -388,7 +388,7 @@ const data = {
|
|
|
388
388
|
\`\`\`
|
|
389
389
|
`,
|
|
390
390
|
},
|
|
391
|
-
|
|
391
|
+
explanation: {
|
|
392
392
|
type: Host.AidaClient.ParametersTypes.STRING,
|
|
393
393
|
description: 'Explain why you want to run this code',
|
|
394
394
|
},
|
|
@@ -397,12 +397,12 @@ const data = {
|
|
|
397
397
|
description: 'Provide a summary of what the code does. For example, "Checking related element styles".',
|
|
398
398
|
},
|
|
399
399
|
},
|
|
400
|
-
required: ['code', '
|
|
400
|
+
required: ['code', 'explanation', 'title']
|
|
401
401
|
},
|
|
402
402
|
displayInfoFromArgs: params => {
|
|
403
403
|
return {
|
|
404
404
|
title: params.title,
|
|
405
|
-
thought: params.
|
|
405
|
+
thought: params.explanation,
|
|
406
406
|
action: params.code,
|
|
407
407
|
};
|
|
408
408
|
},
|
|
@@ -205,7 +205,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
205
205
|
class="link"
|
|
206
206
|
title="${UIStringsNotTranslate.viewUploadedFiles} ${UIStringsNotTranslate.opensInNewTab}"
|
|
207
207
|
href="data:text/plain;charset=utf-8,${encodeURIComponent(input.sources)}"
|
|
208
|
-
|
|
208
|
+
jslogcontext="files-used-in-patching">
|
|
209
209
|
${UIStringsNotTranslate.viewUploadedFiles}
|
|
210
210
|
</devtools-link>`;
|
|
211
211
|
}
|
|
@@ -296,8 +296,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
296
296
|
return html`
|
|
297
297
|
<div class="footer">
|
|
298
298
|
<div class="left-side">
|
|
299
|
-
<devtools-link class="link disclaimer-link" href="https://support.google.com/legal/answer/13505487"
|
|
300
|
-
'code-disclaimer'}>
|
|
299
|
+
<devtools-link class="link disclaimer-link" href="https://support.google.com/legal/answer/13505487" jslogcontext="code-disclaimer">
|
|
301
300
|
${lockedString(UIStringsNotTranslate.codeDisclaimer)}
|
|
302
301
|
</devtools-link>
|
|
303
302
|
${renderSourcesLink()}
|
|
@@ -575,7 +574,7 @@ export class PatchWidget extends UI.Widget.Widget {
|
|
|
575
574
|
content: html`<devtools-link
|
|
576
575
|
href=${CODE_SNIPPET_WARNING_URL}
|
|
577
576
|
class="link devtools-link"
|
|
578
|
-
|
|
577
|
+
jslogcontext="code-snippets-explainer.patch-widget"
|
|
579
578
|
>${lockedString(UIStringsNotTranslate.freDisclaimerTextUseWithCaution)}</devtools-link>`,
|
|
580
579
|
// clang-format on
|
|
581
580
|
}
|
|
@@ -93,7 +93,7 @@ export const SELECT_WORKSPACE_DIALOG_DEFAULT_VIEW: View = (input, _output, targe
|
|
|
93
93
|
<devtools-link
|
|
94
94
|
class="devtools-link"
|
|
95
95
|
href="https://goo.gle/devtools-automatic-workspace-folders"
|
|
96
|
-
|
|
96
|
+
jslogcontext="automatic-workspaces-documentation"
|
|
97
97
|
>com.chrome.devtools.json</devtools-link>
|
|
98
98
|
file to automatically connect your project to DevTools.
|
|
99
99
|
</div>
|
|
@@ -644,7 +644,7 @@ function renderIdentity(identityData: IdentitySectionData, onCopy: () => void, o
|
|
|
644
644
|
jslog=${VisualLogging.action('help').track({hover: true})}>
|
|
645
645
|
</devtools-icon>
|
|
646
646
|
<devtools-link href="https://developer.chrome.com/blog/pwa-manifest-id/"
|
|
647
|
-
|
|
647
|
+
jslogcontext="learn-more"
|
|
648
648
|
${ref(setFocusOnSection(i18nString(UIStrings.identity), output))}>
|
|
649
649
|
${i18nString(UIStrings.learnMore)}
|
|
650
650
|
</devtools-link>
|
|
@@ -766,7 +766,7 @@ function renderIcons(
|
|
|
766
766
|
<div class="report-row">
|
|
767
767
|
${i18nTemplate(str_, UIStrings.needHelpReadOurS, {
|
|
768
768
|
PH1: html`
|
|
769
|
-
<devtools-link href="https://web.dev/maskable-icon/"
|
|
769
|
+
<devtools-link href="https://web.dev/maskable-icon/" jslogcontext="learn-more">
|
|
770
770
|
${i18nString(UIStrings.documentationOnMaskableIcons)}
|
|
771
771
|
</devtools-link>`,
|
|
772
772
|
})}
|
|
@@ -866,7 +866,7 @@ function renderWindowControlsSection(
|
|
|
866
866
|
PH2: html`<code>
|
|
867
867
|
<devtools-link
|
|
868
868
|
href="https://developer.mozilla.org/en-US/docs/Web/Manifest/display_override"
|
|
869
|
-
|
|
869
|
+
jslogcontext="display-override"
|
|
870
870
|
${ref(setFocusOnSection(i18nString(UIStrings.windowControlsOverlay), output))}>
|
|
871
871
|
display-override
|
|
872
872
|
</devtools-link>
|
|
@@ -882,7 +882,7 @@ function renderWindowControlsSection(
|
|
|
882
882
|
${i18nTemplate(str_, UIStrings.wcoNotFound, {PH1: html`<code>
|
|
883
883
|
<devtools-link
|
|
884
884
|
href="https://developer.mozilla.org/en-US/docs/Web/Manifest/display_override"
|
|
885
|
-
|
|
885
|
+
jslogcontext="display-override"
|
|
886
886
|
${ref(setFocusOnSection(i18nString(UIStrings.windowControlsOverlay), output))}>
|
|
887
887
|
display-override
|
|
888
888
|
</devtools-link>
|
|
@@ -891,7 +891,7 @@ function renderWindowControlsSection(
|
|
|
891
891
|
<div class="report-row">
|
|
892
892
|
${i18nTemplate(str_, UIStrings.wcoNeedHelpReadMore, {PH1: html`<devtools-link
|
|
893
893
|
href="https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/window-controls-overlay"
|
|
894
|
-
|
|
894
|
+
jslogcontext="customize-pwa-tittle-bar">
|
|
895
895
|
${i18nString(UIStrings.customizePwaTitleBar)}
|
|
896
896
|
</devtools-link>`})}
|
|
897
897
|
</div>
|
|
@@ -13,6 +13,7 @@ interface EventWithTimestamp {
|
|
|
13
13
|
export interface SessionAndEvents {
|
|
14
14
|
session?: Protocol.Network.DeviceBoundSession;
|
|
15
15
|
isSessionTerminated: boolean;
|
|
16
|
+
hasErrors: boolean;
|
|
16
17
|
eventsById: Map<string, EventWithTimestamp>;
|
|
17
18
|
}
|
|
18
19
|
type SessionIdToSessionMap = Map<string|undefined, SessionAndEvents>;
|
|
@@ -61,11 +62,21 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
64
|
const emptySessions = new Map<string, Array<string|undefined>>();
|
|
65
|
+
const noLongerFailedSessions = new Map<string, Array<string|undefined>>();
|
|
64
66
|
const emptySites = new Set<string>();
|
|
65
67
|
for (const [site, sessionIdToSessionMap] of [...this.#siteSessions]) {
|
|
66
68
|
let emptySessionsSiteEntry = emptySessions.get(site);
|
|
69
|
+
let noLongerFailedSessionsSiteEntry = noLongerFailedSessions.get(site);
|
|
67
70
|
for (const [sessionId, sessionAndEvents] of sessionIdToSessionMap) {
|
|
68
71
|
sessionAndEvents.eventsById.clear();
|
|
72
|
+
if (sessionAndEvents.hasErrors) {
|
|
73
|
+
sessionAndEvents.hasErrors = false;
|
|
74
|
+
if (!noLongerFailedSessionsSiteEntry) {
|
|
75
|
+
noLongerFailedSessionsSiteEntry = [];
|
|
76
|
+
noLongerFailedSessions.set(site, noLongerFailedSessionsSiteEntry);
|
|
77
|
+
}
|
|
78
|
+
noLongerFailedSessionsSiteEntry.push(sessionId);
|
|
79
|
+
}
|
|
69
80
|
if (sessionAndEvents.session) {
|
|
70
81
|
continue;
|
|
71
82
|
}
|
|
@@ -85,7 +96,8 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
85
96
|
}
|
|
86
97
|
}
|
|
87
98
|
|
|
88
|
-
this.dispatchEventToListeners(
|
|
99
|
+
this.dispatchEventToListeners(
|
|
100
|
+
DeviceBoundSessionModelEvents.CLEAR_EVENTS, {emptySessions, emptySites, noLongerFailedSessions});
|
|
89
101
|
}
|
|
90
102
|
|
|
91
103
|
isSiteVisible(site: string): boolean {
|
|
@@ -100,6 +112,14 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
100
112
|
return session.isSessionTerminated;
|
|
101
113
|
}
|
|
102
114
|
|
|
115
|
+
sessionHasErrors(site: string, sessionId?: string): boolean {
|
|
116
|
+
const session = this.getSession(site, sessionId);
|
|
117
|
+
if (session === undefined) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
return session.hasErrors;
|
|
121
|
+
}
|
|
122
|
+
|
|
103
123
|
getSession(site: string, sessionId?: string): SessionAndEvents|undefined {
|
|
104
124
|
return this.#siteSessions.get(site)?.get(sessionId);
|
|
105
125
|
}
|
|
@@ -128,6 +148,7 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
128
148
|
sessionAndEvent = {
|
|
129
149
|
session: undefined,
|
|
130
150
|
isSessionTerminated: false,
|
|
151
|
+
hasErrors: false,
|
|
131
152
|
eventsById: new Map<string, EventWithTimestamp>()
|
|
132
153
|
};
|
|
133
154
|
sessionIdToSessionMap.set(sessionId, sessionAndEvent);
|
|
@@ -167,6 +188,11 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
167
188
|
}
|
|
168
189
|
}
|
|
169
190
|
|
|
191
|
+
// Set that the session has errors if the latest event failed.
|
|
192
|
+
if (!event.succeeded) {
|
|
193
|
+
sessionAndEvent.hasErrors = true;
|
|
194
|
+
}
|
|
195
|
+
|
|
170
196
|
this.dispatchEventToListeners(
|
|
171
197
|
DeviceBoundSessionModelEvents.EVENT_OCCURRED,
|
|
172
198
|
{site: eventWithTimestamp.event.site, sessionId: eventWithTimestamp.event.sessionId});
|
|
@@ -186,6 +212,9 @@ export interface DeviceBoundSessionModelEventTypes {
|
|
|
186
212
|
[DeviceBoundSessionModelEvents.ADD_VISIBLE_SITE]: {site: string};
|
|
187
213
|
[DeviceBoundSessionModelEvents.CLEAR_VISIBLE_SITES]: void;
|
|
188
214
|
[DeviceBoundSessionModelEvents.EVENT_OCCURRED]: {site: string, sessionId?: string};
|
|
189
|
-
[DeviceBoundSessionModelEvents.CLEAR_EVENTS]:
|
|
190
|
-
|
|
215
|
+
[DeviceBoundSessionModelEvents.CLEAR_EVENTS]: {
|
|
216
|
+
emptySessions: Map<string, Array<string|undefined>>,
|
|
217
|
+
emptySites: Set<string>,
|
|
218
|
+
noLongerFailedSessions: Map<string, Array<string|undefined>>,
|
|
219
|
+
};
|
|
191
220
|
}
|
|
@@ -120,8 +120,20 @@ export class RootTreeElement extends ApplicationPanelTreeElement {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
#
|
|
123
|
+
#updateElementIconAndStyling(
|
|
124
|
+
sessionElement: ApplicationPanelTreeElement, isSessionTerminated: boolean, sessionHasErrors: boolean): void {
|
|
125
|
+
if (isSessionTerminated) {
|
|
126
|
+
sessionElement.listItemElement.classList.add('device-bound-session-terminated');
|
|
127
|
+
sessionElement.setLeadingIcons([createIcon('database-off')]);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
sessionElement.listItemElement.classList.remove('device-bound-session-terminated');
|
|
131
|
+
sessionElement.setLeadingIcons([createIcon(sessionHasErrors ? 'warning' : 'database')]);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
#updateIconAndStyling(site: string, sessionId: string|undefined): void {
|
|
124
135
|
const isSessionTerminated = this.#model.isSessionTerminated(site, sessionId);
|
|
136
|
+
const sessionHasErrors = this.#model.sessionHasErrors(site, sessionId);
|
|
125
137
|
const siteMapEntry = this.#sites.get(site);
|
|
126
138
|
if (!siteMapEntry) {
|
|
127
139
|
return;
|
|
@@ -130,12 +142,21 @@ export class RootTreeElement extends ApplicationPanelTreeElement {
|
|
|
130
142
|
if (!sessionElement) {
|
|
131
143
|
return;
|
|
132
144
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
this.#updateElementIconAndStyling(sessionElement, isSessionTerminated, sessionHasErrors);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#removeWarningIcons(noLongerFailedSessions: Map<string, Array<string|undefined>>): void {
|
|
149
|
+
for (const [site, noLongerFailedSessionIds] of noLongerFailedSessions) {
|
|
150
|
+
const siteData = this.#sites.get(site);
|
|
151
|
+
if (siteData) {
|
|
152
|
+
for (const noLongerFailedSessionId of noLongerFailedSessionIds) {
|
|
153
|
+
const sessionElement = siteData.sessions.get(noLongerFailedSessionId);
|
|
154
|
+
if (sessionElement) {
|
|
155
|
+
const isSessionTerminated = this.#model.isSessionTerminated(site, noLongerFailedSessionId);
|
|
156
|
+
this.#updateElementIconAndStyling(sessionElement, isSessionTerminated, /* sessionHasErrors=*/ false);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
139
160
|
}
|
|
140
161
|
}
|
|
141
162
|
|
|
@@ -231,12 +252,13 @@ export class RootTreeElement extends ApplicationPanelTreeElement {
|
|
|
231
252
|
{data: {site, sessionId}}: Common.EventTarget
|
|
232
253
|
.EventTargetEvent<DeviceBoundSessionModelEventTypes[DeviceBoundSessionModelEvents.EVENT_OCCURRED]>): void {
|
|
233
254
|
this.#addSiteSessionIfMissing(site, sessionId);
|
|
234
|
-
this.#
|
|
255
|
+
this.#updateIconAndStyling(site, sessionId);
|
|
235
256
|
}
|
|
236
257
|
|
|
237
|
-
#onClearEvents({data: {emptySessions, emptySites}}: Common.EventTarget
|
|
258
|
+
#onClearEvents({data: {emptySessions, emptySites, noLongerFailedSessions}}: Common.EventTarget
|
|
238
259
|
.EventTargetEvent<DeviceBoundSessionModelEventTypes[DeviceBoundSessionModelEvents.CLEAR_EVENTS]>):
|
|
239
260
|
void {
|
|
240
261
|
this.#removeEmptyElements(emptySessions, emptySites);
|
|
262
|
+
this.#removeWarningIcons(noLongerFailedSessions);
|
|
241
263
|
}
|
|
242
264
|
}
|
|
@@ -324,7 +324,7 @@ function renderOriginTrial(trials: Protocol.Page.OriginTrial[]|null): LitTemplat
|
|
|
324
324
|
<span class="report-section">
|
|
325
325
|
${i18nString(UIStrings.originTrialsExplanation)}
|
|
326
326
|
<devtools-link href="https://developer.chrome.com/docs/web-platform/origin-trials/" class="link"
|
|
327
|
-
|
|
327
|
+
jslogcontext="learn-more.origin-trials">
|
|
328
328
|
${i18nString(UIStrings.learnMore)}
|
|
329
329
|
</devtools-link>
|
|
330
330
|
</span>
|
|
@@ -738,7 +738,7 @@ function renderApiAvailabilitySection(frame: SDK.ResourceTreeModel.ResourceTreeF
|
|
|
738
738
|
${i18nString(UIStrings.availabilityOfCertainApisDepends)}
|
|
739
739
|
<devtools-link
|
|
740
740
|
href="https://web.dev/why-coop-coep/" class="link"
|
|
741
|
-
|
|
741
|
+
jslogcontext="learn-more.coop-coep">
|
|
742
742
|
${i18nString(UIStrings.learnMore)}
|
|
743
743
|
</devtools-link>
|
|
744
744
|
</span>
|
|
@@ -815,8 +815,7 @@ function renderMeasureMemoryAvailability(frame: SDK.ResourceTreeModel.ResourceTr
|
|
|
815
815
|
<devtools-report-key>${i18nString(UIStrings.measureMemory)}</devtools-report-key>
|
|
816
816
|
<devtools-report-value>
|
|
817
817
|
<span title=${tooltipText}>${
|
|
818
|
-
availabilityText}</span>\xA0<devtools-link class="link" href="https://web.dev/monitor-total-page-memory-usage/" .
|
|
819
|
-
'learn-more.monitor-memory-usage'}>${
|
|
818
|
+
availabilityText}</span>\xA0<devtools-link class="link" href="https://web.dev/monitor-total-page-memory-usage/" jslogcontext="learn-more.monitor-memory-usage">${
|
|
820
819
|
i18nString(UIStrings.learnMore)}</devtools-link>
|
|
821
820
|
</devtools-report-value>
|
|
822
821
|
`;
|
|
@@ -159,7 +159,7 @@ const renderMainFrameInformation = (input: ViewInput): Lit.LitTemplate => {
|
|
|
159
159
|
</devtools-report-divider>
|
|
160
160
|
<devtools-report-section>
|
|
161
161
|
<devtools-link href="https://privacycg.github.io/nav-tracking-mitigations/#bounce-tracking-mitigations" class="link"
|
|
162
|
-
|
|
162
|
+
jslogcontext="learn-more">
|
|
163
163
|
${i18nString(UIStrings.learnMore)}
|
|
164
164
|
</devtools-link>
|
|
165
165
|
</devtools-report-section>
|
|
@@ -82,7 +82,7 @@ function renderStatusMessage(
|
|
|
82
82
|
name=${protocolHandlers.length > 0 ? 'check-circle' : 'info'}>
|
|
83
83
|
</devtools-icon>
|
|
84
84
|
${uiI18n.getFormatLocalizedStringTemplate(str_, statusString, {PH1: html`
|
|
85
|
-
<devtools-link href=${manifestLink}
|
|
85
|
+
<devtools-link href=${manifestLink} jslogcontext="manifest">${i18nString(UIStrings.manifest)}</devtools-link>
|
|
86
86
|
` })}
|
|
87
87
|
</div>`;
|
|
88
88
|
// clang-format on
|
|
@@ -144,7 +144,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
144
144
|
${renderStatusMessage(input.protocolHandler, input.manifestLink)}
|
|
145
145
|
<div class="protocol-handlers-row">
|
|
146
146
|
${i18nTemplate(UIStrings.needHelpReadOur, {PH1: html`
|
|
147
|
-
<devtools-link href=${PROTOCOL_DOCUMENT_URL} class="devtools-link" autofocus
|
|
147
|
+
<devtools-link href=${PROTOCOL_DOCUMENT_URL} class="devtools-link" autofocus jslogcontext="learn-more">
|
|
148
148
|
${i18nString(UIStrings.protocolHandlerRegistrations)}
|
|
149
149
|
</devtools-link>`})}
|
|
150
150
|
</div>
|
|
@@ -82,7 +82,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
82
82
|
<style>${reportsGridStyles}</style>
|
|
83
83
|
<span class="status-header">${i18nString(UIStrings.status)}</span>
|
|
84
84
|
<devtools-link href="https://web.dev/reporting-api/#report-status"
|
|
85
|
-
|
|
85
|
+
jslogcontext="report-status">
|
|
86
86
|
<devtools-icon class="inline-icon medium" name="help" style="color: var(--icon-link);"
|
|
87
87
|
></devtools-icon>
|
|
88
88
|
</devtools-link>
|
|
@@ -112,7 +112,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
112
112
|
<devtools-link
|
|
113
113
|
class="devtools-link"
|
|
114
114
|
href=${REPORTING_API_EXPLANATION_URL}
|
|
115
|
-
|
|
115
|
+
jslogcontext="learn-more"
|
|
116
116
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
@@ -257,7 +257,7 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
257
257
|
<devtools-link
|
|
258
258
|
class="devtools-link"
|
|
259
259
|
href=${SPECULATION_EXPLANATION_URL}
|
|
260
|
-
|
|
260
|
+
jslogcontext="learn-more"
|
|
261
261
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
@@ -434,7 +434,7 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
434
434
|
<devtools-link
|
|
435
435
|
class="devtools-link"
|
|
436
436
|
href=${SPECULATION_EXPLANATION_URL}
|
|
437
|
-
|
|
437
|
+
jslogcontext="learn-more"
|
|
438
438
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
439
439
|
</div>
|
|
440
440
|
</div>
|
|
@@ -262,7 +262,7 @@ function renderMismatchedSections(data: MismatchedData): LitTemplate {
|
|
|
262
262
|
<devtools-link
|
|
263
263
|
class="link devtools-link"
|
|
264
264
|
href=${data.pageURL}
|
|
265
|
-
|
|
265
|
+
jslogcontext="current-url"
|
|
266
266
|
>${data.pageURL}</devtools-link>
|
|
267
267
|
</devtools-report-section>
|
|
268
268
|
|
|
@@ -412,7 +412,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
412
412
|
<devtools-link
|
|
413
413
|
class="link devtools-link"
|
|
414
414
|
href=${'https://developer.chrome.com/blog/prerender-pages/'}
|
|
415
|
-
|
|
415
|
+
jslogcontext="learn-more"
|
|
416
416
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
417
417
|
</devtools-report-section>
|
|
418
418
|
</devtools-report>`, target);
|
|
@@ -238,14 +238,14 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: ViewOutput, target: HTMLE
|
|
|
238
238
|
jslog=${VisualLogging.toggle(input.autoOpenViewSetting.name).track({ change: true })}>
|
|
239
239
|
${i18nString(UIStrings.autoShow)}
|
|
240
240
|
</devtools-checkbox>
|
|
241
|
-
<devtools-link href=${AUTOFILL_FEEDBACK_URL} class="feedback link"
|
|
241
|
+
<devtools-link href=${AUTOFILL_FEEDBACK_URL} class="feedback link" jslogcontext="feedback">${i18nString(UIStrings.sendFeedback)}</devtools-link>
|
|
242
242
|
</div>
|
|
243
243
|
<div class="placeholder-container" jslog=${VisualLogging.pane('autofill-empty')}>
|
|
244
244
|
<div class="empty-state">
|
|
245
245
|
<span class="empty-state-header">${i18nString(UIStrings.noAutofill)}</span>
|
|
246
246
|
<div class="empty-state-description">
|
|
247
247
|
<span>${i18nString(UIStrings.toStartDebugging)}</span>
|
|
248
|
-
<devtools-link href=${AUTOFILL_INFO_URL} class="link"
|
|
248
|
+
<devtools-link href=${AUTOFILL_INFO_URL} class="link" jslogcontext="learn-more">${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
249
249
|
</div>
|
|
250
250
|
</div>
|
|
251
251
|
</div>
|
|
@@ -280,7 +280,7 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: ViewOutput, target: HTMLE
|
|
|
280
280
|
${i18nString(UIStrings.autoShow)}
|
|
281
281
|
</devtools-checkbox>
|
|
282
282
|
</div>
|
|
283
|
-
<devtools-link href=${AUTOFILL_FEEDBACK_URL} class="feedback link"
|
|
283
|
+
<devtools-link href=${AUTOFILL_FEEDBACK_URL} class="feedback link" jslogcontext="feedback">${i18nString(UIStrings.sendFeedback)}</devtools-link>
|
|
284
284
|
</div>
|
|
285
285
|
${renderAddress()}
|
|
286
286
|
</div>
|
|
@@ -89,7 +89,7 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View = (input, _output, target) => {
|
|
|
89
89
|
${Directives.repeat(input.citations, citation => html`<devtools-link
|
|
90
90
|
tabIndex="0"
|
|
91
91
|
href=${citation}
|
|
92
|
-
|
|
92
|
+
jslogcontext="ai-code-completion-citations.citation-link">${citation}</devtools-link>`)}</div></devtools-tooltip>
|
|
93
93
|
</div>` : nothing;
|
|
94
94
|
|
|
95
95
|
render(
|
|
@@ -249,7 +249,7 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
|
|
|
249
249
|
content: html`<devtools-link
|
|
250
250
|
href=${CODE_SNIPPET_WARNING_URL}
|
|
251
251
|
class="link devtools-link"
|
|
252
|
-
|
|
252
|
+
jslogcontext="code-snippets-explainer.ai-code-completion-teaser"
|
|
253
253
|
>${lockedString(UIStringsNotTranslate.freDisclaimerTextUseWithCaution)}</devtools-link>`,
|
|
254
254
|
// clang-format on
|
|
255
255
|
});
|
|
@@ -82,7 +82,7 @@ export class AiCodeGenerationUpgradeDialog {
|
|
|
82
82
|
@click=${() => {
|
|
83
83
|
void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
|
|
84
84
|
}}
|
|
85
|
-
|
|
85
|
+
jslogcontext="ai-code-generation-upgrade-dialog.manage-in-settings"
|
|
86
86
|
.variant=${Buttons.Button.Variant.OUTLINED}
|
|
87
87
|
aria-label=${lockedString(UIStringsNotTranslate.manageInSettings)}>
|
|
88
88
|
${lockedString(UIStringsNotTranslate.manageInSettings)}
|
|
@@ -91,7 +91,7 @@ export class AiCodeGenerationUpgradeDialog {
|
|
|
91
91
|
@click=${() => {
|
|
92
92
|
dialog.hide();
|
|
93
93
|
}}
|
|
94
|
-
|
|
94
|
+
jslogcontext="ai-code-generation-upgrade-dialog.continue"
|
|
95
95
|
.variant=${Buttons.Button.Variant.PRIMARY}>
|
|
96
96
|
${lockedString(UIStringsNotTranslate.gotIt)}
|
|
97
97
|
</devtools-button>
|
|
@@ -204,8 +204,9 @@ export class BadgeNotification extends UI.Widget.Widget {
|
|
|
204
204
|
this.#show({
|
|
205
205
|
message: i18nFormatStringTemplate(UIStrings.starterBadgeAwardMessageSettingDisabled, {
|
|
206
206
|
PH1: badge.title,
|
|
207
|
-
PH2:
|
|
208
|
-
|
|
207
|
+
PH2:
|
|
208
|
+
html`<devtools-link class="badge-link" href="https://developers.google.com/program" jslogcontext="program-link">${
|
|
209
|
+
lockedString('Google Developer Program')}</devtools-link>`
|
|
209
210
|
}),
|
|
210
211
|
jslogContext: badge.jslogContext,
|
|
211
212
|
actions: [
|
|
@@ -154,9 +154,9 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
|
154
154
|
<div class="section-text">
|
|
155
155
|
<div>${i18nString(UIStrings.tailorProfileBody)}</div><br/>
|
|
156
156
|
<div>${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.tailorProfileBodyDisclaimer, {
|
|
157
|
-
PH1: html`<devtools-link href=${CONTENT_POLICY_URL} class="link"
|
|
158
|
-
PH2: html`<devtools-link href=${TERMS_OF_SERVICE_URL} class="link"
|
|
159
|
-
PH3: html`<devtools-link href=${PRIVACY_POLICY_URL} class="link"
|
|
157
|
+
PH1: html`<devtools-link href=${CONTENT_POLICY_URL} class="link" jslogcontext="content-policy">${i18nString(UIStrings.contentPolicy)}</devtools-link>`,
|
|
158
|
+
PH2: html`<devtools-link href=${TERMS_OF_SERVICE_URL} class="link" jslogcontext="terms-of-service">${i18nString(UIStrings.termsOfService)}</devtools-link>`,
|
|
159
|
+
PH3: html`<devtools-link href=${PRIVACY_POLICY_URL} class="link" jslogcontext="privacy-policy">${i18nString(UIStrings.privacyPolicy)}</devtools-link>`,
|
|
160
160
|
})}</div>
|
|
161
161
|
</div>
|
|
162
162
|
</div>
|
|
@@ -169,7 +169,7 @@ function renderNoModel(input: ViewInput): Lit.TemplateResult {
|
|
|
169
169
|
lockedString(UIStringsNotTranslate.getHelpForError)}
|
|
170
170
|
</h2>
|
|
171
171
|
<div>You can get quick answers from <devtools-link
|
|
172
|
-
|
|
172
|
+
jslogcontext="insights-teaser-built-in-ai-documentation"
|
|
173
173
|
class="link"
|
|
174
174
|
href=${BUILT_IN_AI_DOCUMENTATION}
|
|
175
175
|
>
|
|
@@ -329,7 +329,7 @@ function renderFooter(input: ViewInput): Lit.TemplateResult {
|
|
|
329
329
|
class="devtools-link"
|
|
330
330
|
title=${lockedString(UIStringsNotTranslate.learnMoreAboutAiSummaries)}
|
|
331
331
|
href=${DATA_USAGE_URL}
|
|
332
|
-
|
|
332
|
+
jslogcontext="explain.teaser.learn-more"
|
|
333
333
|
>${lockedString(UIStringsNotTranslate.learnMoreAboutAiSummaries)}</devtools-link>
|
|
334
334
|
</div>
|
|
335
335
|
</devtools-tooltip>
|
|
@@ -513,7 +513,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
513
513
|
content: html`<devtools-link
|
|
514
514
|
href=${CODE_SNIPPET_WARNING_URL}
|
|
515
515
|
class="link devtools-link"
|
|
516
|
-
|
|
516
|
+
jslogcontext="explain.teaser.code-snippets-explainer"
|
|
517
517
|
>${lockedString(UIStringsNotTranslate.freDisclaimerTextUseWithCaution)}</devtools-link>`,
|
|
518
518
|
// clang-format on
|
|
519
519
|
}
|
|
@@ -300,7 +300,7 @@ function renderSearchButton(onSearch: ViewInput['callbacks']['onSearch']): Lit.T
|
|
|
300
300
|
|
|
301
301
|
function renderLearnMoreAboutInsights(): Lit.TemplateResult {
|
|
302
302
|
// clang-format off
|
|
303
|
-
return html`<devtools-link href=${LEARN_MORE_URL} class="link"
|
|
303
|
+
return html`<devtools-link href=${LEARN_MORE_URL} class="link" jslogcontext="learn-more">
|
|
304
304
|
${i18nString(UIStrings.learnMore)}
|
|
305
305
|
</devtools-link>`;
|
|
306
306
|
// clang-format on
|
|
@@ -321,7 +321,7 @@ function maybeRenderSources(
|
|
|
321
321
|
<devtools-link
|
|
322
322
|
href=${url}
|
|
323
323
|
class=${Directives.classMap({link: true, highlighted: index === highlightedCitationIndex})}
|
|
324
|
-
|
|
324
|
+
jslogcontext="references.console-insights"
|
|
325
325
|
${Directives.ref(e => { output.citationLinks[index] = e as HTMLElement; })}
|
|
326
326
|
@animationend=${onCitationAnimationEnd}
|
|
327
327
|
>
|
|
@@ -347,7 +347,7 @@ function maybeRenderRelatedContent(relatedUrls: string[], directCitationUrls: st
|
|
|
347
347
|
<devtools-link
|
|
348
348
|
href=${relatedUrl}
|
|
349
349
|
class="link"
|
|
350
|
-
|
|
350
|
+
jslogcontext="references.console-insights"
|
|
351
351
|
>
|
|
352
352
|
${relatedUrl}
|
|
353
353
|
</devtools-link>
|
|
@@ -454,12 +454,12 @@ function renderConsentReminder(noLogging: boolean): Lit.TemplateResult {
|
|
|
454
454
|
<div>Use of this feature is subject to the <devtools-link
|
|
455
455
|
href=${TERMS_OF_SERVICE_URL}
|
|
456
456
|
class="link"
|
|
457
|
-
|
|
457
|
+
jslogcontext="terms-of-service.console-insights">
|
|
458
458
|
Google Terms of Service
|
|
459
459
|
</devtools-link> and <devtools-link
|
|
460
460
|
href=${PRIVACY_POLICY_URL}
|
|
461
461
|
class="link"
|
|
462
|
-
|
|
462
|
+
jslogcontext="privacy-policy.console-insights">
|
|
463
463
|
Google Privacy Policy
|
|
464
464
|
</devtools-link>
|
|
465
465
|
</div>
|
|
@@ -471,7 +471,7 @@ function renderConsentReminder(noLogging: boolean): Lit.TemplateResult {
|
|
|
471
471
|
<devtools-link
|
|
472
472
|
href=${CODE_SNIPPET_WARNING_URL}
|
|
473
473
|
class="link"
|
|
474
|
-
|
|
474
|
+
jslogcontext="code-snippets-explainer.console-insights"
|
|
475
475
|
>Use generated code snippets with caution</devtools-link>
|
|
476
476
|
</div>
|
|
477
477
|
</div>`;
|
|
@@ -515,7 +515,7 @@ function renderDisclaimer(noLogging: boolean, onDisclaimerSettingsLink: () => vo
|
|
|
515
515
|
jslog=${VisualLogging.action('open-ai-settings').track({click: true})}>
|
|
516
516
|
Open settings
|
|
517
517
|
</button> or <devtools-link href=${LEARN_MORE_URL}
|
|
518
|
-
class="link"
|
|
518
|
+
class="link" jslogcontext="learn-more">
|
|
519
519
|
learn more
|
|
520
520
|
</devtools-link>
|
|
521
521
|
</span>`;
|
|
@@ -455,7 +455,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
|
455
455
|
const linkListItem = linkList.createChild('li');
|
|
456
456
|
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
457
457
|
render(
|
|
458
|
-
html`<devtools-link class="link devtools-link" href=${description.link}
|
|
458
|
+
html`<devtools-link class="link devtools-link" href=${description.link} jslogcontext="learn-more">${
|
|
459
459
|
i18nString(UIStrings.learnMoreS, {PH1: description.linkTitle})}</devtools-link>`,
|
|
460
460
|
linkListItem);
|
|
461
461
|
}
|
|
@@ -24,7 +24,7 @@ import * as PanelUtils from '../utils/utils.js';
|
|
|
24
24
|
|
|
25
25
|
import requestConditionsDrawerStyles from './requestConditionsDrawer.css.js';
|
|
26
26
|
|
|
27
|
-
const {ref} = Directives;
|
|
27
|
+
const {ref, live} = Directives;
|
|
28
28
|
const {widgetConfig} = UI.Widget;
|
|
29
29
|
|
|
30
30
|
const UIStrings = {
|
|
@@ -439,10 +439,10 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
|
|
|
439
439
|
// clang-format off
|
|
440
440
|
html`
|
|
441
441
|
<input class=blocked-url-checkbox
|
|
442
|
-
@
|
|
442
|
+
@change=${toggle}
|
|
443
443
|
type=checkbox
|
|
444
444
|
title=${i18nString(UIStrings.enableThrottlingToggleLabel, {PH1: constructorStringOrWildcardURL})}
|
|
445
|
-
.checked=${enabled}
|
|
445
|
+
.checked=${live(enabled)}
|
|
446
446
|
.disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
447
447
|
jslog=${VisualLogging.toggle().track({ change: true })}>
|
|
448
448
|
<devtools-button
|
|
@@ -519,7 +519,7 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
|
|
|
519
519
|
// clang-format off
|
|
520
520
|
html`
|
|
521
521
|
<input class=blocked-url-checkbox
|
|
522
|
-
@
|
|
522
|
+
@change=${toggle}
|
|
523
523
|
type=checkbox
|
|
524
524
|
.checked=${condition.enabled}
|
|
525
525
|
.disabled=${!editable}
|
|
@@ -504,7 +504,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
504
504
|
<devtools-link
|
|
505
505
|
href="https://developer.chrome.com/docs/devtools/network/reference/#timing-explanation"
|
|
506
506
|
class=devtools-link
|
|
507
|
-
|
|
507
|
+
jslogcontext="explanation">
|
|
508
508
|
${i18nString(UIStrings.explanation)}
|
|
509
509
|
</devtools-link>
|
|
510
510
|
<td></td>
|
|
@@ -310,7 +310,7 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
310
310
|
<devtools-link
|
|
311
311
|
href="https://goo.gle/devtools-override"
|
|
312
312
|
class="link devtools-link"
|
|
313
|
-
|
|
313
|
+
jslogcontext="devtools-override"
|
|
314
314
|
>
|
|
315
315
|
<devtools-icon name="help" class="inline-icon medium">
|
|
316
316
|
</devtools-icon>
|
|
@@ -319,7 +319,7 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
319
319
|
@click=${revealHeadersFile}
|
|
320
320
|
class="link devtools-link"
|
|
321
321
|
title=${UIStrings.revealHeaderOverrides}
|
|
322
|
-
|
|
322
|
+
jslogcontext="reveal-header-overrides"
|
|
323
323
|
>
|
|
324
324
|
${fileIcon}${Persistence.NetworkPersistenceManager.HEADERS_FILENAME}
|
|
325
325
|
</devtools-link>
|
|
@@ -88,6 +88,7 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
|
|
|
88
88
|
this.totalTrendDiv, i18nString(UIStrings.totalPageJsHeapSizeChangeTrend, {PH1: trendIntervalMinutes}));
|
|
89
89
|
UI.Tooltip.Tooltip.install(this.totalValueDiv, i18nString(UIStrings.totalPageJsHeapSizeAcrossAllVm));
|
|
90
90
|
|
|
91
|
+
SDK.IsolateManager.IsolateManager.instance().observeIsolates(this);
|
|
91
92
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
92
93
|
SDK.TargetManager.Events.NAME_CHANGED, this.targetChanged, this);
|
|
93
94
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
@@ -96,7 +97,6 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
|
|
|
96
97
|
|
|
97
98
|
override wasShown(): void {
|
|
98
99
|
super.wasShown();
|
|
99
|
-
SDK.IsolateManager.IsolateManager.instance().observeIsolates(this);
|
|
100
100
|
SDK.IsolateManager.IsolateManager.instance().addEventListener(
|
|
101
101
|
SDK.IsolateManager.Events.MEMORY_CHANGED, this.heapStatsChanged, this);
|
|
102
102
|
}
|
|
@@ -105,7 +105,6 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
|
|
|
105
105
|
super.willHide();
|
|
106
106
|
SDK.IsolateManager.IsolateManager.instance().removeEventListener(
|
|
107
107
|
SDK.IsolateManager.Events.MEMORY_CHANGED, this.heapStatsChanged, this);
|
|
108
|
-
SDK.IsolateManager.IsolateManager.instance().unobserveIsolates(this);
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
isolateAdded(isolate: SDK.IsolateManager.Isolate): void {
|
|
@@ -1192,7 +1192,7 @@ export class RecorderController extends LitElement {
|
|
|
1192
1192
|
<devtools-link
|
|
1193
1193
|
class="devtools-link"
|
|
1194
1194
|
href=${RECORDER_EXPLANATION_URL}
|
|
1195
|
-
|
|
1195
|
+
jslogcontext="learn-more"
|
|
1196
1196
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
1197
1197
|
</div>
|
|
1198
1198
|
<devtools-button .variant=${Buttons.Button.Variant.TONAL} jslogContext=${Actions.RecorderActions.CREATE_RECORDING} @click=${this.#onCreateNewRecording}>${i18nString(UIStrings.createRecording)}</devtools-button>
|
|
@@ -1470,7 +1470,7 @@ export class RecorderController extends LitElement {
|
|
|
1470
1470
|
<div class="feedback">
|
|
1471
1471
|
<devtools-link class="devtools-link" title=${i18nString(UIStrings.sendFeedback)} href=${
|
|
1472
1472
|
FEEDBACK_URL
|
|
1473
|
-
}
|
|
1473
|
+
} jslogcontext="feedback">${i18nString(UIStrings.sendFeedback)}</devtools-link>
|
|
1474
1474
|
</div>
|
|
1475
1475
|
<div class="separator"></div>
|
|
1476
1476
|
<devtools-shortcut-dialog
|
|
@@ -224,8 +224,8 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
224
224
|
</devtools-icon>
|
|
225
225
|
${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
|
|
226
226
|
PH1:
|
|
227
|
-
html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/"
|
|
228
|
-
|
|
227
|
+
html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslogcontext="privacy-sandbox-update">${
|
|
228
|
+
i18nString(UIStrings.blogPostLink)}</devtools-link>`,
|
|
229
229
|
})}
|
|
230
230
|
</div>
|
|
231
231
|
<div class="body">
|
|
@@ -239,7 +239,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
239
239
|
<div class="report overflow-auto">
|
|
240
240
|
<div class="header">
|
|
241
241
|
<h1>${i18nString(UIStrings.title)}</h1>
|
|
242
|
-
<div class="body">${i18nString(UIStrings.body)} <devtools-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies"
|
|
242
|
+
<div class="body">${i18nString(UIStrings.body)} <devtools-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies" jslogcontext="learn-more">${i18nString(UIStrings.learnMoreLink)}</devtools-link></div>
|
|
243
243
|
</div>
|
|
244
244
|
${input.cookieRows.length > 0 ?
|
|
245
245
|
html`
|
|
@@ -484,8 +484,8 @@ export class CookieReportView extends UI.Widget.VBox {
|
|
|
484
484
|
case Protocol.Audits.InsightType.GitHubResource: {
|
|
485
485
|
const githubLink = html`<devtools-link href=${
|
|
486
486
|
insight.tableEntryUrl ??
|
|
487
|
-
'https://github.com/privacysandbox/privacy-sandbox-dev-support/blob/main/3pc-migration-readiness.md'}
|
|
488
|
-
|
|
487
|
+
'https://github.com/privacysandbox/privacy-sandbox-dev-support/blob/main/3pc-migration-readiness.md'} jslogcontext="readiness-list-link">${
|
|
488
|
+
i18nString(UIStrings.guidance)}</devtools-link>`;
|
|
489
489
|
|
|
490
490
|
return html`${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.gitHubResource, {
|
|
491
491
|
PH1: githubLink,
|
|
@@ -499,7 +499,7 @@ export class CookieReportView extends UI.Widget.VBox {
|
|
|
499
499
|
// The order of the URLs matters - needs to be 1P + 3P.
|
|
500
500
|
(url ? Common.ParsedURL.ParsedURL.fromString(url)?.host + '+' : '') +
|
|
501
501
|
(domain.charAt(0) === '.' ? domain.substring(1) : domain)}
|
|
502
|
-
|
|
502
|
+
jslogcontext="compatibility-lookup-link">${i18nString(UIStrings.reportedIssues)}</devtools-link>`;
|
|
503
503
|
|
|
504
504
|
return html`${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.gracePeriod, {
|
|
505
505
|
PH1: gracePeriodLink,
|
|
@@ -181,7 +181,7 @@ const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement)
|
|
|
181
181
|
${getGdpSubscriptionText(input.gdpProfile)}
|
|
182
182
|
·
|
|
183
183
|
<devtools-link
|
|
184
|
-
|
|
184
|
+
jslogcontext="view-profile"
|
|
185
185
|
class="link"
|
|
186
186
|
href=${Host.GdpClient.GOOGLE_DEVELOPER_PROGRAM_PROFILE_LINK}>
|
|
187
187
|
${i18nString(UIStrings.viewProfile)}
|
|
@@ -868,7 +868,7 @@ export class UserAgentClientHintsForm extends HTMLElement {
|
|
|
868
868
|
href="https://web.dev/user-agent-client-hints/"
|
|
869
869
|
class="link"
|
|
870
870
|
aria-label=${i18nString(UIStrings.learnMore)}
|
|
871
|
-
|
|
871
|
+
jslogcontext="learn-more"
|
|
872
872
|
>
|
|
873
873
|
${i18nString(UIStrings.learnMore)}
|
|
874
874
|
</devtools-link>
|
|
@@ -143,7 +143,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
143
143
|
<div class=link-wrapper>
|
|
144
144
|
<devtools-icon name=open-externally class=link-icon></devtools-icon>
|
|
145
145
|
<devtools-link class="devtools-link" href="https://goo.gle/devtools-loc"
|
|
146
|
-
|
|
146
|
+
jslogcontext="learn-more">${
|
|
147
147
|
i18nString(UIStrings.learnMoreOnBreakpointTypes)}</devtools-link>
|
|
148
148
|
</div>
|
|
149
149
|
`,
|
|
@@ -90,7 +90,7 @@ export class ReleaseNoteView extends UI.Panel.Panel {
|
|
|
90
90
|
return html`
|
|
91
91
|
<devtools-link
|
|
92
92
|
href=${value.link}
|
|
93
|
-
|
|
93
|
+
jslogcontext="learn-more">
|
|
94
94
|
<div class="video">
|
|
95
95
|
<img class="thumbnail" src=${input.getThumbnailPath(value.type ?? VideoType.WHATS_NEW)}>
|
|
96
96
|
<div class="thumbnail-description"><span>${value.description}</span></div>
|
|
@@ -204,7 +204,7 @@ export class CodeBlock extends HTMLElement {
|
|
|
204
204
|
#renderNotice(): Lit.TemplateResult {
|
|
205
205
|
// clang-format off
|
|
206
206
|
return html`<p class="notice">
|
|
207
|
-
<devtools-link class="link" href="https://support.google.com/legal/answer/13505487"
|
|
207
|
+
<devtools-link class="link" href="https://support.google.com/legal/answer/13505487" jslogcontext="code-disclaimer">
|
|
208
208
|
${i18nString(UIStrings.disclaimer)}
|
|
209
209
|
</devtools-link>
|
|
210
210
|
</p>`;
|
|
@@ -74,7 +74,7 @@ export class PanelFeedback extends HTMLElement {
|
|
|
74
74
|
</div>
|
|
75
75
|
<div class="video-description">
|
|
76
76
|
<h3>${i18nString(UIStrings.videoAndDocumentation)}</h3>
|
|
77
|
-
<devtools-link class="quick-start-link" href=${this.#props.quickStartUrl}
|
|
77
|
+
<devtools-link class="quick-start-link" href=${this.#props.quickStartUrl} jslogcontext="css-overview.quick-start">${this.#props.quickStartLinkText}</devtools-link>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
80
|
</div>
|
|
@@ -20,6 +20,12 @@ export class AutocompleteHistory {
|
|
|
20
20
|
#historyOffset = 1;
|
|
21
21
|
#uncommittedIsTop = false;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Tracks session-local edits made to history entries during navigation.
|
|
25
|
+
* Maps history index to edited text. Cleared when a new command is committed.
|
|
26
|
+
*/
|
|
27
|
+
#editedEntries = new Map<number, string>();
|
|
28
|
+
|
|
23
29
|
/**
|
|
24
30
|
* Creates a new settings-backed history. The class assumes it has sole
|
|
25
31
|
* ownership of the setting.
|
|
@@ -33,6 +39,7 @@ export class AutocompleteHistory {
|
|
|
33
39
|
this.#data = [];
|
|
34
40
|
this.#setting.set([]);
|
|
35
41
|
this.#historyOffset = 1;
|
|
42
|
+
this.#editedEntries.clear();
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
length(): number {
|
|
@@ -49,6 +56,7 @@ export class AutocompleteHistory {
|
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
this.#historyOffset = 1;
|
|
59
|
+
this.#editedEntries.clear();
|
|
52
60
|
if (text !== this.#currentHistoryItem()) {
|
|
53
61
|
this.#data.push(text);
|
|
54
62
|
}
|
|
@@ -72,11 +80,33 @@ export class AutocompleteHistory {
|
|
|
72
80
|
}
|
|
73
81
|
if (this.#historyOffset === 1) {
|
|
74
82
|
this.#pushCurrentText(currentText);
|
|
83
|
+
} else {
|
|
84
|
+
this.#saveCurrentEdit(currentText);
|
|
75
85
|
}
|
|
76
86
|
++this.#historyOffset;
|
|
77
87
|
return this.#currentHistoryItem();
|
|
78
88
|
}
|
|
79
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Saves the current text as an edit if it differs from the current history item
|
|
92
|
+
* (which may already have edits from a previous navigation).
|
|
93
|
+
* Only saves non-empty edits to avoid issues with navigation-only calls.
|
|
94
|
+
*/
|
|
95
|
+
#saveCurrentEdit(text: string): void {
|
|
96
|
+
const index = this.#data.length - this.#historyOffset;
|
|
97
|
+
const currentValue = this.#currentHistoryItem();
|
|
98
|
+
if (text === currentValue) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const original = this.#data[index];
|
|
102
|
+
if (text !== original && text.length > 0) {
|
|
103
|
+
this.#editedEntries.set(index, text);
|
|
104
|
+
} else {
|
|
105
|
+
// Remove edit if text was restored to original (or emptied)
|
|
106
|
+
this.#editedEntries.delete(index);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
80
110
|
next(): string|undefined {
|
|
81
111
|
if (this.#historyOffset === 1) {
|
|
82
112
|
return undefined;
|
|
@@ -98,7 +128,9 @@ export class AutocompleteHistory {
|
|
|
98
128
|
}
|
|
99
129
|
|
|
100
130
|
#currentHistoryItem(): string|undefined {
|
|
101
|
-
|
|
131
|
+
const index = this.#data.length - this.#historyOffset;
|
|
132
|
+
// Return edited version if available, otherwise return original
|
|
133
|
+
return this.#editedEntries.get(index) ?? this.#data[index];
|
|
102
134
|
}
|
|
103
135
|
|
|
104
136
|
#store(): void {
|
package/package.json
CHANGED