chrome-devtools-frontend 1.0.1515446 → 1.0.1515796
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/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +64 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +78 -58
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/Processor.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -7
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +24 -11
- package/front_end/panels/common/gdpSignUpDialog.css +4 -0
- package/front_end/panels/search/SearchView.ts +195 -135
- package/front_end/panels/settings/components/SyncSection.ts +58 -9
- package/front_end/panels/settings/components/syncSection.css +6 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -4
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/legacy/ProgressIndicator.ts +4 -5
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +3 -3
@@ -6088,7 +6088,7 @@ export const NativeFunctions = [
|
|
6088
6088
|
},
|
6089
6089
|
{
|
6090
6090
|
name: "addAnimation",
|
6091
|
-
signatures: [["animation"]]
|
6091
|
+
signatures: [["animation","action","behavior"]]
|
6092
6092
|
},
|
6093
6093
|
{
|
6094
6094
|
name: "removeAnimation",
|
@@ -6765,6 +6765,10 @@ export const NativeFunctions = [
|
|
6765
6765
|
name: "DragEvent",
|
6766
6766
|
signatures: [["type","?eventInitDict"]]
|
6767
6767
|
},
|
6768
|
+
{
|
6769
|
+
name: "EmailVerifiedEvent",
|
6770
|
+
signatures: [["type","?eventInitDict"]]
|
6771
|
+
},
|
6768
6772
|
{
|
6769
6773
|
name: "ErrorEvent",
|
6770
6774
|
signatures: [["type","?eventInitDict"]]
|
@@ -7605,7 +7609,7 @@ export const NativeFunctions = [
|
|
7605
7609
|
signatures: [["element","x","y","?dwidth","?dheight"]]
|
7606
7610
|
},
|
7607
7611
|
{
|
7608
|
-
name: "
|
7612
|
+
name: "drawElementImage",
|
7609
7613
|
signatures: [["element","x","y","?dwidth","?dheight"]]
|
7610
7614
|
},
|
7611
7615
|
{
|
@@ -8420,10 +8424,6 @@ export const NativeFunctions = [
|
|
8420
8424
|
name: "RTCRtpScriptTransform",
|
8421
8425
|
signatures: [["worker","?options","?transfer"]]
|
8422
8426
|
},
|
8423
|
-
{
|
8424
|
-
name: "sendRtp",
|
8425
|
-
signatures: [["packet","options"]]
|
8426
|
-
},
|
8427
8427
|
{
|
8428
8428
|
name: "setHeaderExtensionsToNegotiate",
|
8429
8429
|
signatures: [["extensions"]]
|
@@ -8891,7 +8891,7 @@ export const NativeFunctions = [
|
|
8891
8891
|
signatures: [["provokeMode"]]
|
8892
8892
|
},
|
8893
8893
|
{
|
8894
|
-
name: "
|
8894
|
+
name: "texElementImage2D",
|
8895
8895
|
signatures: [["target","level","internalformat","format","type","element"]]
|
8896
8896
|
},
|
8897
8897
|
{
|
@@ -367,6 +367,32 @@ export const performSearchInSearchMatches = function(
|
|
367
367
|
return result;
|
368
368
|
};
|
369
369
|
|
370
|
+
/**
|
371
|
+
* Finds the longest overlapping string segment between the end of the first
|
372
|
+
* string and the beginning of the second string.
|
373
|
+
*
|
374
|
+
* @param s1 The first string (whose suffix will be checked).
|
375
|
+
* @param s2 The second string (whose prefix will be checked).
|
376
|
+
* @returns The overlapping string segment, or an empty string ("")
|
377
|
+
* if no overlap is found.
|
378
|
+
*/
|
379
|
+
export const getOverlap = function(s1: string, s2: string): string|null {
|
380
|
+
const minLen = Math.min(s1.length, s2.length);
|
381
|
+
// Check from longest possible overlap down to 1
|
382
|
+
for (let n = minLen; n > 0; n--) {
|
383
|
+
// slice(-n) gets the last 'n' chars
|
384
|
+
const suffix = s1.slice(-n);
|
385
|
+
// substring(0, n) gets the first 'n' chars
|
386
|
+
const prefix = s2.substring(0, n);
|
387
|
+
|
388
|
+
if (suffix === prefix) {
|
389
|
+
return suffix;
|
390
|
+
}
|
391
|
+
}
|
392
|
+
|
393
|
+
return null;
|
394
|
+
};
|
395
|
+
|
370
396
|
export interface ParsedFilter {
|
371
397
|
key?: string;
|
372
398
|
text?: string|null;
|
@@ -443,7 +443,7 @@ export class TraceProcessor extends EventTarget {
|
|
443
443
|
let model: Insights.Types.InsightModel|Error;
|
444
444
|
try {
|
445
445
|
options.logger?.start(`insights:${name}`);
|
446
|
-
model = insight.generateInsight(data, context);
|
446
|
+
model = insight.generateInsight(data, context, options.insightTimeFormatters);
|
447
447
|
model.frameId = context.frameId;
|
448
448
|
const navId = context.navigation?.args.data?.navigationId;
|
449
449
|
if (navId) {
|
@@ -190,11 +190,14 @@ function finalize(partialModel: PartialInsightModel<DocumentLatencyInsightModel>
|
|
190
190
|
}
|
191
191
|
|
192
192
|
export function generateInsight(
|
193
|
-
data: Handlers.Types.HandlerData, context: InsightSetContext
|
193
|
+
data: Handlers.Types.HandlerData, context: InsightSetContext,
|
194
|
+
timeFormatters?: Types.Configuration.InsightTimeFormatters): DocumentLatencyInsightModel {
|
194
195
|
if (!context.navigation) {
|
195
196
|
return finalize({});
|
196
197
|
}
|
197
198
|
|
199
|
+
const millisToString = timeFormatters?.milli ?? i18n.TimeUtilities.millisToString;
|
200
|
+
|
198
201
|
const documentRequest = data.NetworkRequests.byId.get(context.navigationId);
|
199
202
|
if (!documentRequest) {
|
200
203
|
return finalize({warnings: [InsightWarning.NO_DOCUMENT_REQUEST]});
|
@@ -212,7 +215,8 @@ export function generateInsight(
|
|
212
215
|
overallSavingsMs = Math.max(serverResponseTime - TARGET_MS, 0);
|
213
216
|
}
|
214
217
|
|
215
|
-
const redirectDuration =
|
218
|
+
const redirectDuration =
|
219
|
+
Math.round(documentRequest.args.data.syntheticData.redirectionDuration / 1000) as Types.Timing.Milli;
|
216
220
|
overallSavingsMs += redirectDuration;
|
217
221
|
|
218
222
|
const metricSavings = {
|
@@ -237,16 +241,14 @@ export function generateInsight(
|
|
237
241
|
noRedirects: {
|
238
242
|
label: noRedirects ? i18nString(UIStrings.passingRedirects) : i18nString(UIStrings.failedRedirects, {
|
239
243
|
PH1: documentRequest.args.data.redirects.length,
|
240
|
-
PH2:
|
244
|
+
PH2: millisToString(redirectDuration),
|
241
245
|
}),
|
242
246
|
value: noRedirects
|
243
247
|
},
|
244
248
|
serverResponseIsFast: {
|
245
249
|
label: serverResponseIsFast ?
|
246
|
-
i18nString(
|
247
|
-
|
248
|
-
i18nString(
|
249
|
-
UIStrings.failedServerResponseTime, {PH1: i18n.TimeUtilities.millisToString(serverResponseTime)}),
|
250
|
+
i18nString(UIStrings.passingServerResponseTime, {PH1: millisToString(serverResponseTime)}) :
|
251
|
+
i18nString(UIStrings.failedServerResponseTime, {PH1: millisToString(serverResponseTime)}),
|
250
252
|
value: serverResponseIsFast
|
251
253
|
},
|
252
254
|
usesCompression: {
|
@@ -8,6 +8,7 @@ import type * as Protocol from '../../../generated/protocol.js';
|
|
8
8
|
import type * as Lantern from '../lantern/lantern.js';
|
9
9
|
|
10
10
|
import type * as File from './File.js';
|
11
|
+
import type {Milli} from './Timing.js';
|
11
12
|
|
12
13
|
export interface Configuration {
|
13
14
|
/**
|
@@ -83,6 +84,17 @@ export interface ParseOptions {
|
|
83
84
|
end: (id: string) => void,
|
84
85
|
};
|
85
86
|
lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;
|
87
|
+
/**
|
88
|
+
* Used when an Insight needs to format a time to string as part of its
|
89
|
+
* output. By default we use the i18n.TimeUtilities in DevTools but this
|
90
|
+
* enables it to be overridden, which is useful if you are consuming the trace
|
91
|
+
* engine outside of DevTools.
|
92
|
+
*/
|
93
|
+
insightTimeFormatters?: InsightTimeFormatters;
|
94
|
+
}
|
95
|
+
|
96
|
+
export interface InsightTimeFormatters {
|
97
|
+
milli: (x: Milli) => string;
|
86
98
|
}
|
87
99
|
|
88
100
|
export interface ResolveSourceMapParams {
|
@@ -3,6 +3,8 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
6
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
7
|
+
import type * as Protocol from '../../../generated/protocol.js';
|
6
8
|
|
7
9
|
const UIStrings = {
|
8
10
|
/**
|
@@ -552,7 +554,10 @@ const UIStrings = {
|
|
552
554
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheStrings.ts', UIStrings);
|
553
555
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
554
556
|
|
555
|
-
|
557
|
+
type NotRestoredReason =
|
558
|
+
Record<Protocol.Page.BackForwardCacheNotRestoredReason, {name: () => Platform.UIString.LocalizedString}>;
|
559
|
+
|
560
|
+
export const NotRestoredReasonDescription: NotRestoredReason = {
|
556
561
|
NotPrimaryMainFrame: {name: i18nLazyString(UIStrings.notMainFrame)},
|
557
562
|
BackForwardCacheDisabled: {name: i18nLazyString(UIStrings.backForwardCacheDisabled)},
|
558
563
|
RelatedActiveContentsExist: {name: i18nLazyString(UIStrings.relatedActiveContentsExist)},
|
@@ -567,6 +572,7 @@ export const NotRestoredReasonDescription = {
|
|
567
572
|
JavaScriptExecution: {name: i18nLazyString(UIStrings.JavaScriptExecution)},
|
568
573
|
RendererProcessKilled: {name: i18nLazyString(UIStrings.rendererProcessKilled)},
|
569
574
|
RendererProcessCrashed: {name: i18nLazyString(UIStrings.rendererProcessCrashed)},
|
575
|
+
// @ts-expect-error kept for backwards compatibly
|
570
576
|
GrantedMediaStreamAccess: {name: i18nLazyString(UIStrings.grantedMediaStreamAccess)},
|
571
577
|
CacheFlushed: {name: i18nLazyString(UIStrings.cacheFlushed)},
|
572
578
|
ServiceWorkerVersionActivation: {name: i18nLazyString(UIStrings.serviceWorkerVersionActivation)},
|
@@ -713,4 +719,4 @@ export const NotRestoredReasonDescription = {
|
|
713
719
|
{name: i18n.i18n.lockedLazyString('CacheLimitPrunedOnModerateMemoryPressure')},
|
714
720
|
CacheLimitPrunedOnCriticalMemoryPressure:
|
715
721
|
{name: i18n.i18n.lockedLazyString('CacheLimitPrunedOnCriticalMemoryPressure')},
|
716
|
-
};
|
722
|
+
} as const;
|
@@ -21,16 +21,16 @@ const UIStrings = {
|
|
21
21
|
/**
|
22
22
|
* @description Title for close button
|
23
23
|
*/
|
24
|
-
|
24
|
+
close: 'Close',
|
25
25
|
/**
|
26
26
|
* @description Activity based badge award notification text
|
27
27
|
* @example {Badge Title} PH1
|
28
28
|
*/
|
29
|
-
activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It
|
29
|
+
activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It’s been added to your Developer Profile.',
|
30
30
|
/**
|
31
31
|
* @description Action title for navigating to the badge settings in Google Developer Profile section
|
32
32
|
*/
|
33
|
-
|
33
|
+
manageSettings: 'Manage settings',
|
34
34
|
/**
|
35
35
|
* @description Action title for opening the Google Developer Program profile page of the user in a new tab
|
36
36
|
*/
|
@@ -55,7 +55,7 @@ const UIStrings = {
|
|
55
55
|
/**
|
56
56
|
* @description Action title for enabling the "Receive badges" setting
|
57
57
|
*/
|
58
|
-
receiveBadges: '
|
58
|
+
receiveBadges: 'Turn on badges',
|
59
59
|
/**
|
60
60
|
* @description Action title for creating a Google Developer Program profle
|
61
61
|
*/
|
@@ -103,10 +103,10 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
103
103
|
class="dismiss notification-button"
|
104
104
|
@click=${input.onCloseClick}
|
105
105
|
jslog=${VisualLogging.action('badge-notification.dismiss').track({click: true})}
|
106
|
-
aria-label=${i18nString(UIStrings.
|
106
|
+
aria-label=${i18nString(UIStrings.close)}
|
107
107
|
.iconName=${'cross'}
|
108
108
|
.variant=${Buttons.Button.Variant.ICON}
|
109
|
-
.title=${i18nString(UIStrings.
|
109
|
+
.title=${i18nString(UIStrings.close)}
|
110
110
|
.inverseColorTheme=${true}
|
111
111
|
></devtools-button>`;
|
112
112
|
|
@@ -114,7 +114,7 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
114
114
|
<style>${badgeNotificationStyles}</style>
|
115
115
|
<div class="container">
|
116
116
|
<div class="badge-container">
|
117
|
-
<img class="badge-image" src=${input.imageUri}>
|
117
|
+
<img class="badge-image" role="presentation" src=${input.imageUri}>
|
118
118
|
</div>
|
119
119
|
<div class="action-and-text-container">
|
120
120
|
<div class="label-container">
|
@@ -145,6 +145,8 @@ export class BadgeNotification extends UI.Widget.Widget {
|
|
145
145
|
super(element);
|
146
146
|
this.#view = view;
|
147
147
|
|
148
|
+
// eslint-disable-next-line
|
149
|
+
this.contentElement.role = 'alert';
|
148
150
|
this.markAsRoot();
|
149
151
|
}
|
150
152
|
|
@@ -240,7 +242,7 @@ export class BadgeNotification extends UI.Widget.Widget {
|
|
240
242
|
message: i18nString(UIStrings.activityBasedBadgeAwardMessage, {PH1: badge.title}),
|
241
243
|
actions: [
|
242
244
|
{
|
243
|
-
label: i18nString(UIStrings.
|
245
|
+
label: i18nString(UIStrings.manageSettings),
|
244
246
|
onClick: () => {
|
245
247
|
this.#close();
|
246
248
|
revealBadgeSettings();
|
@@ -39,8 +39,7 @@ const UIStrings = {
|
|
39
39
|
/**
|
40
40
|
* @description Body for the first section of the GDP sign up dialog.
|
41
41
|
*/
|
42
|
-
designedForSuccessBody:
|
43
|
-
'Grow your skills, build with AI, and receive badges you can showcase in your developer profile',
|
42
|
+
designedForSuccessBody: 'Grow your skills, build with AI, and earn badges you can showcase in your developer profile',
|
44
43
|
/**
|
45
44
|
* @description Title for the second section of the GDP sign up dialog.
|
46
45
|
*/
|
@@ -48,23 +47,32 @@ const UIStrings = {
|
|
48
47
|
/**
|
49
48
|
* @description Body for the second section of the GDP sign up dialog.
|
50
49
|
*/
|
51
|
-
keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights directly in your inbox',
|
50
|
+
keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights land directly in your inbox',
|
52
51
|
/**
|
53
52
|
* @description Title for the third section of the GDP sign up dialog.
|
54
53
|
*/
|
55
|
-
|
54
|
+
tailorProfile: 'Tailor your profile',
|
55
|
+
/**
|
56
|
+
* @description Body for the third section of the GDP sign up dialog.
|
57
|
+
*/
|
58
|
+
tailorProfileBody:
|
59
|
+
'The name on your Google Account and your interests will be used in your Google Developer Profile. Your name may appear where you contribute and can be changed at any time.',
|
56
60
|
/**
|
57
61
|
* @description Body for the third section of the GDP sign up dialog.
|
58
62
|
* @example {Content Policy} PH1
|
59
63
|
* @example {Terms of Service} PH2
|
60
64
|
* @example {Privacy Policy} PH3
|
61
65
|
*/
|
62
|
-
|
63
|
-
'By creating a Developer Profile, you agree to the {PH1}. Google’s {PH2} and {PH3} apply to your use of this service.
|
66
|
+
tailorProfileBodyDisclaimer:
|
67
|
+
'By creating a Developer Profile, you agree to the {PH1}. Google’s {PH2} and {PH3} apply to your use of this service.',
|
64
68
|
/**
|
65
69
|
* @description Button text for learning more about the Google Developer Program.
|
66
70
|
*/
|
67
71
|
learnMore: 'Learn more',
|
72
|
+
/**
|
73
|
+
* @description Accessible text for learning more about the Google Developer Program.
|
74
|
+
*/
|
75
|
+
learnMoreAccessibleText: 'Learn more about the Google Developer Program',
|
68
76
|
/**
|
69
77
|
* @description Link text for Content Policy.
|
70
78
|
*/
|
@@ -106,14 +114,14 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
106
114
|
render(
|
107
115
|
html`
|
108
116
|
<style>${styles}</style>
|
109
|
-
<div class="gdp-sign-up-dialog-header"></div>
|
117
|
+
<div class="gdp-sign-up-dialog-header" role="img" tabindex="0" aria-label="Google Developer Program"></div>
|
110
118
|
<div class="main-content">
|
111
119
|
<div class="section">
|
112
120
|
<div class="icon-container">
|
113
121
|
<devtools-icon name="trophy"></devtools-icon>
|
114
122
|
</div>
|
115
123
|
<div class="text-container">
|
116
|
-
<
|
124
|
+
<h2 class="section-title">${i18nString(UIStrings.designedForSuccess)}</h2>
|
117
125
|
<div class="section-text">${i18nString(UIStrings.designedForSuccessBody)}</div>
|
118
126
|
</div>
|
119
127
|
</div>
|
@@ -122,7 +130,7 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
122
130
|
<devtools-icon name="mark-email-unread"></devtools-icon>
|
123
131
|
</div>
|
124
132
|
<div class="text-container">
|
125
|
-
<
|
133
|
+
<h2 class="section-title">${i18nString(UIStrings.keepUpdated)}</h2>
|
126
134
|
<div class="section-text">${i18nString(UIStrings.keepUpdatedBody)}</div>
|
127
135
|
</div>
|
128
136
|
<div class="switch-container">
|
@@ -140,19 +148,24 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
140
148
|
<devtools-icon name="google"></devtools-icon>
|
141
149
|
</div>
|
142
150
|
<div class="text-container">
|
143
|
-
<
|
144
|
-
<div class="section-text"
|
151
|
+
<h2 class="section-title">${i18nString(UIStrings.tailorProfile)}</h2>
|
152
|
+
<div class="section-text">
|
153
|
+
<div>${i18nString(UIStrings.tailorProfileBody)}</div><br/>
|
154
|
+
<div>${i18n.i18n.getFormatLocalizedString(str_, UIStrings.tailorProfileBodyDisclaimer, {
|
145
155
|
PH1: UI.XLink.XLink.create(CONTENT_POLICY_URL, i18nString(UIStrings.contentPolicy), 'link', undefined, 'gdp.content-policy'),
|
146
156
|
PH2: UI.XLink.XLink.create(TERMS_OF_SERVICE_URL, i18nString(UIStrings.termsOfService), 'link',
|
147
157
|
undefined, 'gdp.terms-of-service'),
|
148
158
|
PH3: UI.XLink.XLink.create(PRIVACY_POLICY_URL, i18nString(UIStrings.privacyPolicy), 'link',
|
149
159
|
undefined, 'gdp.privacy-policy'),
|
150
160
|
})}</div>
|
161
|
+
</div>
|
151
162
|
</div>
|
152
163
|
</div>
|
153
164
|
</div>
|
154
165
|
<div class="buttons">
|
155
166
|
<devtools-button
|
167
|
+
aria-label=${i18nString(UIStrings.learnMoreAccessibleText)}
|
168
|
+
.title=${i18nString(UIStrings.learnMoreAccessibleText)}
|
156
169
|
.variant=${Buttons.Button.Variant.OUTLINED}
|
157
170
|
.jslogContext=${'learn-more'}
|
158
171
|
@click=${() => UI.UIUtils.openInNewTab(GDP_PROGRAM_URL as Platform.DevToolsPath.UrlString)}>${i18nString(UIStrings.learnMore)}</devtools-button>
|