chrome-devtools-frontend 1.0.939473 → 1.0.940255
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/docs/triage_guidelines.md +3 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -0
- package/front_end/core/host/UserMetrics.ts +71 -0
- package/front_end/core/i18n/locales/en-US.json +7 -7
- package/front_end/core/i18n/locales/en-XL.json +7 -7
- package/front_end/devtools_compatibility.js +5 -0
- package/front_end/entrypoints/main/MainImpl.ts +6 -3
- package/front_end/entrypoints/main/main-meta.ts +1 -0
- package/front_end/models/logs/LogManager.ts +1 -0
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheView.ts +24 -24
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +6 -8
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +7 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +10 -33
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -1
- package/front_end/panels/settings/components/SyncSection.ts +25 -4
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +1 -1
- package/front_end/ui/components/buttons/Button.ts +11 -0
- package/front_end/ui/components/buttons/button.css +4 -0
- package/front_end/ui/components/docs/button/basic.ts +10 -0
- package/package.json +2 -2
|
@@ -47,15 +47,15 @@ Issues in the untriaged queue should receive a meaningful response within a busi
|
|
|
47
47
|
- Close issues as `Archived` that are valid, but it seems unlikely that we will get there anytime soon.
|
|
48
48
|
- Move issues out of `Platform>DevTools` if they are not DevTools issues (but just reported via the menu item in DevTools), put on the `Hotlist-DevTools-Triaged` and leave the `Untriaged` status as is.
|
|
49
49
|
- Assign regression bugs with bisects to individuals directly and set the status to `Assigned`.
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
- Put proper `Platform>DevTools>XXX` component(s) on the issue and do an initial check-in regarding the priority.
|
|
51
|
+
- Put one of the following labels on it and set the status to `Available`:
|
|
52
52
|
- `Hotlist-DevTools-ProductReview` if it's controversial or clear that consensus needs to be built first.
|
|
53
53
|
- `Hotlist-DevTools-BrowserAutomation-Backlog` if it's an issue related to ChromeDriver or puppeteer.
|
|
54
54
|
- `Hotlist-DevTools-Debugging-Backlog` if it's a debugging issue.
|
|
55
55
|
- `Hotlist-DevTools-DesignAccessibility-Backlog` if it's a design or accessibility issue.
|
|
56
56
|
- `Hotlist-DevTools-Performance-Backlog` if the issue is related to our performance tooling (i.e. Performance panel, Lighthouse).
|
|
57
57
|
- `Hotlist-DevTools-Backlog` if it's a general DevTools issue that is not specific to one of the core areas.
|
|
58
|
-
- Also remember to put the Needs-UX label on it, if help from a designer is likely to be required.
|
|
58
|
+
- Also remember to put the `Needs-UX` label on it, if help from a designer is likely to be required.
|
|
59
59
|
|
|
60
60
|
### Setting Assigned or Available
|
|
61
61
|
|
|
@@ -369,4 +369,9 @@ export enum EnumeratedHistogram {
|
|
|
369
369
|
Language = 'DevTools.Language',
|
|
370
370
|
ConsoleShowsCorsErrors = 'DevTools.ConsoleShowsCorsErrors',
|
|
371
371
|
SyncSetting = 'DevTools.SyncSetting',
|
|
372
|
+
RecordingEdited = 'DevTools.RecordingEdited',
|
|
373
|
+
RecordingExported = 'DevTools.RecordingExported',
|
|
374
|
+
RecordingReplayFinished = 'DevTools.RecordingReplayFinished',
|
|
375
|
+
RecordingReplayStarted = 'DevTools.RecordingReplayStarted',
|
|
376
|
+
RecordingToggled = 'DevTools.RecordingToggled',
|
|
372
377
|
}
|
|
@@ -261,6 +261,31 @@ export class UserMetrics {
|
|
|
261
261
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.SyncSetting, settingValue, size);
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
|
+
|
|
265
|
+
recordingToggled(value: RecordingToggled): void {
|
|
266
|
+
const size = Object.keys(RecordingToggled).length + 1;
|
|
267
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingToggled, value, size);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
recordingReplayFinished(value: RecordingReplayFinished): void {
|
|
271
|
+
const size = Object.keys(RecordingReplayFinished).length + 1;
|
|
272
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingReplayFinished, value, size);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
recordingReplayStarted(value: RecordingReplayStarted): void {
|
|
276
|
+
const size = Object.keys(RecordingReplayStarted).length + 1;
|
|
277
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingReplayStarted, value, size);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
recordingEdited(value: RecordingEdited): void {
|
|
281
|
+
const size = Object.keys(RecordingEdited).length + 1;
|
|
282
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingEdited, value, size);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
recordingExported(value: RecordingExported): void {
|
|
286
|
+
const size = Object.keys(RecordingExported).length + 1;
|
|
287
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingExported, value, size);
|
|
288
|
+
}
|
|
264
289
|
}
|
|
265
290
|
|
|
266
291
|
// Codes below are used to collect UMA histograms in the Chromium port.
|
|
@@ -687,6 +712,7 @@ export const IssueCreated: {
|
|
|
687
712
|
'CorsIssue::NoCorsRedirectModeNotFollow': 57,
|
|
688
713
|
'QuirksModeIssue::QuirksMode': 58,
|
|
689
714
|
'QuirksModeIssue::LimitedQuirksMode': 59,
|
|
715
|
+
DeprecationIssue: 60,
|
|
690
716
|
};
|
|
691
717
|
|
|
692
718
|
// TODO(crbug.com/1167717): Make this a const enum again
|
|
@@ -826,3 +852,48 @@ export enum SyncSetting {
|
|
|
826
852
|
DevToolsSyncSettingDisabled = 3,
|
|
827
853
|
DevToolsSyncSettingEnabled = 4,
|
|
828
854
|
}
|
|
855
|
+
|
|
856
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
|
857
|
+
// eslint-disable-next-line rulesdir/const_enum
|
|
858
|
+
export enum RecordingToggled {
|
|
859
|
+
RecordingStarted = 1,
|
|
860
|
+
RecordingFinished = 2,
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
|
864
|
+
// eslint-disable-next-line rulesdir/const_enum
|
|
865
|
+
export enum RecordingReplayFinished {
|
|
866
|
+
Success = 1,
|
|
867
|
+
TimeoutErrorSelectors = 2,
|
|
868
|
+
TimeoutErrorTarget = 3,
|
|
869
|
+
OtherError = 4,
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
|
873
|
+
// eslint-disable-next-line rulesdir/const_enum
|
|
874
|
+
export enum RecordingReplayStarted {
|
|
875
|
+
ReplayOnly = 1,
|
|
876
|
+
ReplayWithPerformanceTracing = 2,
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
|
880
|
+
// eslint-disable-next-line rulesdir/const_enum
|
|
881
|
+
export enum RecordingEdited {
|
|
882
|
+
SelectorPickerUsed = 1,
|
|
883
|
+
StepAdded = 2,
|
|
884
|
+
StepRemoved = 3,
|
|
885
|
+
SelectorAdded = 4,
|
|
886
|
+
SelectorRemoved = 5,
|
|
887
|
+
SelectorPartAdded = 6,
|
|
888
|
+
SelectorPartEdited = 7,
|
|
889
|
+
SelectorPartRemoved = 8,
|
|
890
|
+
TypeChanged = 9,
|
|
891
|
+
OtherEditing = 10,
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
|
895
|
+
// eslint-disable-next-line rulesdir/const_enum
|
|
896
|
+
export enum RecordingExported {
|
|
897
|
+
ToPuppeteer = 1,
|
|
898
|
+
ToJSON = 2,
|
|
899
|
+
}
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
"message": "Stop recording events"
|
|
2053
2053
|
},
|
|
2054
2054
|
"panels/application/ApplicationPanelCacheSection.ts | backForwardCache": {
|
|
2055
|
-
"message": "Back-
|
|
2055
|
+
"message": "Back-Forward Cache"
|
|
2056
2056
|
},
|
|
2057
2057
|
"panels/application/ApplicationPanelCacheSection.ts | cacheStorage": {
|
|
2058
2058
|
"message": "Cache Storage"
|
|
@@ -2688,10 +2688,10 @@
|
|
|
2688
2688
|
"message": "Pages that use WebXR are not currently eligible for back/forward cache."
|
|
2689
2689
|
},
|
|
2690
2690
|
"panels/application/BackForwardCacheView.ts | backForwardCacheTitle": {
|
|
2691
|
-
"message": "Back-
|
|
2691
|
+
"message": "Back-Forward Cache"
|
|
2692
2692
|
},
|
|
2693
2693
|
"panels/application/BackForwardCacheView.ts | bfcacheStatus": {
|
|
2694
|
-
"message": "Back-
|
|
2694
|
+
"message": "Back-Forward Cache Status"
|
|
2695
2695
|
},
|
|
2696
2696
|
"panels/application/BackForwardCacheView.ts | circumstantial": {
|
|
2697
2697
|
"message": "Not Actionable"
|
|
@@ -2703,16 +2703,16 @@
|
|
|
2703
2703
|
"message": "Main Frame"
|
|
2704
2704
|
},
|
|
2705
2705
|
"panels/application/BackForwardCacheView.ts | normalNavigation": {
|
|
2706
|
-
"message": "Normal navigation (Not restored from
|
|
2706
|
+
"message": "Normal navigation (Not restored from Back-Forward Cache)"
|
|
2707
2707
|
},
|
|
2708
2708
|
"panels/application/BackForwardCacheView.ts | pageSupportNeeded": {
|
|
2709
2709
|
"message": "Actionable"
|
|
2710
2710
|
},
|
|
2711
2711
|
"panels/application/BackForwardCacheView.ts | pageSupportNeededExplanation": {
|
|
2712
|
-
"message": "These reasons are actionable i.e. they can be cleaned up to make the page eligible for
|
|
2712
|
+
"message": "These reasons are actionable i.e. they can be cleaned up to make the page eligible for Back-Forward Cache."
|
|
2713
2713
|
},
|
|
2714
2714
|
"panels/application/BackForwardCacheView.ts | restoredFromBFCache": {
|
|
2715
|
-
"message": "Restored from
|
|
2715
|
+
"message": "Restored from Back-Forward Cache"
|
|
2716
2716
|
},
|
|
2717
2717
|
"panels/application/BackForwardCacheView.ts | runTest": {
|
|
2718
2718
|
"message": "Run Test"
|
|
@@ -2721,7 +2721,7 @@
|
|
|
2721
2721
|
"message": "Pending Support"
|
|
2722
2722
|
},
|
|
2723
2723
|
"panels/application/BackForwardCacheView.ts | supportPendingExplanation": {
|
|
2724
|
-
"message": "Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for
|
|
2724
|
+
"message": "Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for Back-Forward Cache in a future version of Chrome."
|
|
2725
2725
|
},
|
|
2726
2726
|
"panels/application/BackForwardCacheView.ts | unavailable": {
|
|
2727
2727
|
"message": "unavailable"
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
"message": "Ŝt́ôṕ r̂éĉór̂d́îńĝ év̂én̂t́ŝ"
|
|
2053
2053
|
},
|
|
2054
2054
|
"panels/application/ApplicationPanelCacheSection.ts | backForwardCache": {
|
|
2055
|
-
"message": "B̂áĉḱ-
|
|
2055
|
+
"message": "B̂áĉḱ-F̂ór̂ẃâŕd̂ Ćâćĥé"
|
|
2056
2056
|
},
|
|
2057
2057
|
"panels/application/ApplicationPanelCacheSection.ts | cacheStorage": {
|
|
2058
2058
|
"message": "Ĉáĉh́ê Śt̂ór̂áĝé"
|
|
@@ -2688,10 +2688,10 @@
|
|
|
2688
2688
|
"message": "P̂áĝéŝ t́ĥát̂ úŝé Ŵéb̂X́R̂ ár̂é n̂ót̂ ćûŕr̂én̂t́l̂ý êĺîǵîb́l̂é f̂ór̂ b́âćk̂/f́ôŕŵár̂d́ ĉáĉh́ê."
|
|
2689
2689
|
},
|
|
2690
2690
|
"panels/application/BackForwardCacheView.ts | backForwardCacheTitle": {
|
|
2691
|
-
"message": "B̂áĉḱ-
|
|
2691
|
+
"message": "B̂áĉḱ-F̂ór̂ẃâŕd̂ Ćâćĥé"
|
|
2692
2692
|
},
|
|
2693
2693
|
"panels/application/BackForwardCacheView.ts | bfcacheStatus": {
|
|
2694
|
-
"message": "B̂áĉḱ-
|
|
2694
|
+
"message": "B̂áĉḱ-F̂ór̂ẃâŕd̂ Ćâćĥé Ŝt́ât́ûś"
|
|
2695
2695
|
},
|
|
2696
2696
|
"panels/application/BackForwardCacheView.ts | circumstantial": {
|
|
2697
2697
|
"message": "N̂ót̂ Áĉt́îón̂áb̂ĺê"
|
|
@@ -2703,16 +2703,16 @@
|
|
|
2703
2703
|
"message": "M̂áîń F̂ŕâḿê"
|
|
2704
2704
|
},
|
|
2705
2705
|
"panels/application/BackForwardCacheView.ts | normalNavigation": {
|
|
2706
|
-
"message": "N̂ór̂ḿâĺ n̂áv̂íĝát̂íôń (N̂ót̂ ŕêśt̂ór̂éd̂ f́r̂óm̂
|
|
2706
|
+
"message": "N̂ór̂ḿâĺ n̂áv̂íĝát̂íôń (N̂ót̂ ŕêśt̂ór̂éd̂ f́r̂óm̂ B́âćk̂-F́ôŕŵár̂d́ Ĉáĉh́ê)"
|
|
2707
2707
|
},
|
|
2708
2708
|
"panels/application/BackForwardCacheView.ts | pageSupportNeeded": {
|
|
2709
2709
|
"message": "Âćt̂íôńâb́l̂é"
|
|
2710
2710
|
},
|
|
2711
2711
|
"panels/application/BackForwardCacheView.ts | pageSupportNeededExplanation": {
|
|
2712
|
-
"message": "T̂h́êśê ŕêáŝón̂ś âŕê áĉt́îón̂áb̂ĺê í.ê. t́ĥéŷ ćâń b̂é ĉĺêán̂éd̂ úp̂ t́ô ḿâḱê t́ĥé p̂áĝé êĺîǵîb́l̂é f̂ór̂
|
|
2712
|
+
"message": "T̂h́êśê ŕêáŝón̂ś âŕê áĉt́îón̂áb̂ĺê í.ê. t́ĥéŷ ćâń b̂é ĉĺêán̂éd̂ úp̂ t́ô ḿâḱê t́ĥé p̂áĝé êĺîǵîb́l̂é f̂ór̂ B́âćk̂-F́ôŕŵár̂d́ Ĉáĉh́ê."
|
|
2713
2713
|
},
|
|
2714
2714
|
"panels/application/BackForwardCacheView.ts | restoredFromBFCache": {
|
|
2715
|
-
"message": "R̂éŝt́ôŕêd́ f̂ŕôḿ
|
|
2715
|
+
"message": "R̂éŝt́ôŕêd́ f̂ŕôḿ B̂áĉḱ-F̂ór̂ẃâŕd̂ Ćâćĥé"
|
|
2716
2716
|
},
|
|
2717
2717
|
"panels/application/BackForwardCacheView.ts | runTest": {
|
|
2718
2718
|
"message": "R̂ún̂ T́êśt̂"
|
|
@@ -2721,7 +2721,7 @@
|
|
|
2721
2721
|
"message": "P̂én̂d́îńĝ Śûṕp̂ór̂t́"
|
|
2722
2722
|
},
|
|
2723
2723
|
"panels/application/BackForwardCacheView.ts | supportPendingExplanation": {
|
|
2724
|
-
"message": "Ĉh́r̂óm̂é ŝúp̂ṕôŕt̂ f́ôŕ t̂h́êśê ŕêáŝón̂ś îś p̂én̂d́îńĝ í.ê. t́ĥéŷ ẃîĺl̂ ńôt́ p̂ŕêv́êńt̂ t́ĥé p̂áĝé f̂ŕôḿ b̂éîńĝ él̂íĝíb̂ĺê f́ôŕ
|
|
2724
|
+
"message": "Ĉh́r̂óm̂é ŝúp̂ṕôŕt̂ f́ôŕ t̂h́êśê ŕêáŝón̂ś îś p̂én̂d́îńĝ í.ê. t́ĥéŷ ẃîĺl̂ ńôt́ p̂ŕêv́êńt̂ t́ĥé p̂áĝé f̂ŕôḿ b̂éîńĝ él̂íĝíb̂ĺê f́ôŕ B̂áĉḱ-F̂ór̂ẃâŕd̂ Ćâćĥé îń â f́ût́ûŕê v́êŕŝíôń ôf́ Ĉh́r̂óm̂é."
|
|
2725
2725
|
},
|
|
2726
2726
|
"panels/application/BackForwardCacheView.ts | unavailable": {
|
|
2727
2727
|
"message": "ûńâv́âíl̂áb̂ĺê"
|
|
@@ -396,6 +396,11 @@
|
|
|
396
396
|
LinearMemoryInspectorTarget: 'DevTools.LinearMemoryInspector.Target',
|
|
397
397
|
Language: 'DevTools.Language',
|
|
398
398
|
ConsoleShowsCorsErrors: 'DevTools.ConsoleShowsCorsErrors',
|
|
399
|
+
RecordingEdited: 'DevTools.RecordingEdited',
|
|
400
|
+
RecordingExported: 'DevTools.RecordingExported',
|
|
401
|
+
RecordingReplayFinished: 'DevTools.RecordingReplayFinished',
|
|
402
|
+
RecordingReplayStarted: 'DevTools.RecordingReplayStarted',
|
|
403
|
+
RecordingToggled: 'DevTools.RecordingToggled',
|
|
399
404
|
};
|
|
400
405
|
|
|
401
406
|
/**
|
|
@@ -149,7 +149,10 @@ export class MainImpl {
|
|
|
149
149
|
this.createSettings(prefs);
|
|
150
150
|
await this.requestAndRegisterLocaleData();
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SYNC_SETTINGS)) {
|
|
153
|
+
Host.userMetrics.syncSetting(
|
|
154
|
+
Common.Settings.Settings.instance().moduleSetting<boolean>('sync_preferences').get());
|
|
155
|
+
}
|
|
153
156
|
|
|
154
157
|
this.createAppUI();
|
|
155
158
|
}
|
|
@@ -270,8 +273,8 @@ export class MainImpl {
|
|
|
270
273
|
'keyboardShortcutEditor', 'Enable keyboard shortcut editor', true,
|
|
271
274
|
'https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts');
|
|
272
275
|
|
|
273
|
-
// Back-
|
|
274
|
-
Root.Runtime.experiments.register('bfcacheDebugging', 'Enable
|
|
276
|
+
// Back-Forward Cache
|
|
277
|
+
Root.Runtime.experiments.register('bfcacheDebugging', 'Enable Back-Forward Cache debugging support');
|
|
275
278
|
|
|
276
279
|
// Timeline
|
|
277
280
|
Root.Runtime.experiments.register('timelineEventInitiators', 'Timeline: event initiators');
|
|
@@ -752,6 +752,7 @@ function filterLocalesForSettings(): string[] {
|
|
|
752
752
|
|
|
753
753
|
Common.Settings.registerSettingExtension({
|
|
754
754
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
755
|
+
storageType: Common.Settings.SettingStorageType.Synced,
|
|
755
756
|
settingName: 'language',
|
|
756
757
|
settingType: Common.Settings.SettingType.ENUM,
|
|
757
758
|
title: i18nLazyString(UIStrings.language),
|
|
@@ -49,6 +49,7 @@ export class LogManager implements SDK.TargetManager.SDKModelObserver<SDK.LogMod
|
|
|
49
49
|
timestamp: entry.timestamp,
|
|
50
50
|
workerId: entry.workerId,
|
|
51
51
|
category: entry.category,
|
|
52
|
+
affectedResources: entry.networkRequestId ? {requestId: entry.networkRequestId} : undefined,
|
|
52
53
|
};
|
|
53
54
|
const consoleMessage = new SDK.ConsoleModel.ConsoleMessage(
|
|
54
55
|
target.model(SDK.RuntimeModel.RuntimeModel), entry.source, entry.level, entry.text, details);
|
|
@@ -446,7 +446,7 @@ export class AXBreadcrumb {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
if (this.axNodeInternal.hasOnlyUnloadedChildren()) {
|
|
449
|
+
if (!this.axNodeInternal.ignored() && this.axNodeInternal.hasOnlyUnloadedChildren()) {
|
|
450
450
|
this.nodeElementInternal.classList.add('children-unloaded');
|
|
451
451
|
UI.ARIAUtils.setExpanded(this.nodeElementInternal, false);
|
|
452
452
|
}
|
|
@@ -673,7 +673,7 @@ export class AXNodeIgnoredReasonTreeElement extends AXNodePropertyTreeElement {
|
|
|
673
673
|
reasonElement = i18n.i18n.getFormatLocalizedString(str_, UIStrings.elementIsNotVisible, {});
|
|
674
674
|
break;
|
|
675
675
|
case 'presentationalRole': {
|
|
676
|
-
const role = axNode && axNode.role() || '';
|
|
676
|
+
const role = axNode && axNode.role()?.value || '';
|
|
677
677
|
const rolePresentationSpan = document.createElement('span', {is: 'source-code'}).textContent = 'role=' + role;
|
|
678
678
|
reasonElement =
|
|
679
679
|
i18n.i18n.getFormatLocalizedString(str_, UIStrings.elementHasPlaceholder, {PH1: rolePresentationSpan});
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
/**
|
|
21
21
|
*@description Text in Application Panel Sidebar of the Application panel
|
|
22
22
|
*/
|
|
23
|
-
backForwardCache: 'Back-
|
|
23
|
+
backForwardCache: 'Back-Forward Cache',
|
|
24
24
|
/**
|
|
25
25
|
*@description A context menu item in the Application Panel Sidebar of the Application panel
|
|
26
26
|
*/
|
|
@@ -17,67 +17,67 @@ import backForwardCacheViewStyles from './backForwardCacheView.css.js';
|
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
20
|
-
* @description Title text in Back-
|
|
20
|
+
* @description Title text in Back-Forward Cache view of the Application panel
|
|
21
21
|
*/
|
|
22
22
|
mainFrame: 'Main Frame',
|
|
23
23
|
/**
|
|
24
|
-
* @description Title text in Back-
|
|
24
|
+
* @description Title text in Back-Forward Cache view of the Application panel
|
|
25
25
|
*/
|
|
26
|
-
backForwardCacheTitle: 'Back-
|
|
26
|
+
backForwardCacheTitle: 'Back-Forward Cache',
|
|
27
27
|
/**
|
|
28
28
|
* @description Status text for the status of the main frame
|
|
29
29
|
*/
|
|
30
30
|
unavailable: 'unavailable',
|
|
31
31
|
/**
|
|
32
|
-
* @description Entry name text in the Back-
|
|
32
|
+
* @description Entry name text in the Back-Forward Cache view of the Application panel
|
|
33
33
|
*/
|
|
34
34
|
url: 'URL',
|
|
35
35
|
/**
|
|
36
|
-
* @description Entry name text in the Back-
|
|
36
|
+
* @description Entry name text in the Back-Forward Cache view of the Application panel
|
|
37
37
|
*/
|
|
38
|
-
bfcacheStatus: 'Back-
|
|
38
|
+
bfcacheStatus: 'Back-Forward Cache Status',
|
|
39
39
|
/**
|
|
40
|
-
* @description Status text for the status of the
|
|
40
|
+
* @description Status text for the status of the Back-Forward Cache status
|
|
41
41
|
*/
|
|
42
42
|
unknown: 'unknown',
|
|
43
43
|
/**
|
|
44
|
-
* @description Status text for the status of the
|
|
45
|
-
* the
|
|
44
|
+
* @description Status text for the status of the Back-Forward Cache status indicating that
|
|
45
|
+
* the Back-Forward Cache was not used and a normal navigation occured instead.
|
|
46
46
|
*/
|
|
47
|
-
normalNavigation: 'Normal navigation (Not restored from
|
|
47
|
+
normalNavigation: 'Normal navigation (Not restored from Back-Forward Cache)',
|
|
48
48
|
/**
|
|
49
|
-
* @description Status text for the status of the
|
|
50
|
-
* the
|
|
49
|
+
* @description Status text for the status of the Back-Forward Cache status indicating that
|
|
50
|
+
* the Back-Forward Cache was used to restore the page instead of reloading it.
|
|
51
51
|
*/
|
|
52
|
-
restoredFromBFCache: 'Restored from
|
|
52
|
+
restoredFromBFCache: 'Restored from Back-Forward Cache',
|
|
53
53
|
/**
|
|
54
54
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
55
|
-
*
|
|
56
|
-
* page eligible for
|
|
55
|
+
* Back-Forward Cache. These reasons are actionable i.e. they can be cleaned up to make the
|
|
56
|
+
* page eligible for Back-Forward Cache.
|
|
57
57
|
*/
|
|
58
58
|
pageSupportNeeded: 'Actionable',
|
|
59
59
|
/**
|
|
60
60
|
* @description Explanation for actionable items which prevent the page from being eligible
|
|
61
|
-
* for
|
|
61
|
+
* for Back-Forward Cache.
|
|
62
62
|
*/
|
|
63
63
|
pageSupportNeededExplanation:
|
|
64
|
-
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for
|
|
64
|
+
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for Back-Forward Cache.',
|
|
65
65
|
/**
|
|
66
66
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
67
|
-
*
|
|
68
|
-
* cleaned up by developers to make the page eligible for
|
|
67
|
+
* Back-Forward Cache. These reasons are circumstantial / not actionable i.e. they cannot be
|
|
68
|
+
* cleaned up by developers to make the page eligible for Back-Forward Cache.
|
|
69
69
|
*/
|
|
70
70
|
circumstantial: 'Not Actionable',
|
|
71
71
|
/**
|
|
72
72
|
* @description Explanation for circumstantial/non-actionable items which prevent the page from being eligible
|
|
73
|
-
* for
|
|
73
|
+
* for Back-Forward Cache.
|
|
74
74
|
*/
|
|
75
75
|
circumstantialExplanation:
|
|
76
76
|
'These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page.',
|
|
77
77
|
/**
|
|
78
78
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
79
|
-
*
|
|
80
|
-
* of chrome they will not prevent
|
|
79
|
+
* Back-Forward Cache. These reasons are pending support by chrome i.e. in a future version
|
|
80
|
+
* of chrome they will not prevent Back-Forward Cache usage anymore.
|
|
81
81
|
*/
|
|
82
82
|
supportPending: 'Pending Support',
|
|
83
83
|
/**
|
|
@@ -86,10 +86,10 @@ const UIStrings = {
|
|
|
86
86
|
runTest: 'Run Test',
|
|
87
87
|
/**
|
|
88
88
|
* @description Explanation for 'pending support' items which prevent the page from being eligible
|
|
89
|
-
* for
|
|
89
|
+
* for Back-Forward Cache.
|
|
90
90
|
*/
|
|
91
91
|
supportPendingExplanation:
|
|
92
|
-
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for
|
|
92
|
+
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for Back-Forward Cache in a future version of Chrome.',
|
|
93
93
|
};
|
|
94
94
|
const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheView.ts', UIStrings);
|
|
95
95
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -6,6 +6,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
|
6
6
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
7
7
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
8
8
|
import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
|
|
9
|
+
import * as Legacy from '../../../ui/legacy/legacy.js';
|
|
9
10
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
10
11
|
|
|
11
12
|
import cssOverviewStartViewStyles from './cssOverviewStartView.css.js';
|
|
@@ -76,14 +77,12 @@ export class OverviewStartRequestedEvent extends Event {
|
|
|
76
77
|
export class CSSOverviewStartView extends HTMLElement {
|
|
77
78
|
static readonly litTagName = LitHtml.literal`devtools-css-overview-start-view`;
|
|
78
79
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
79
|
-
#feedbackLink:
|
|
80
|
+
#feedbackLink: HTMLElement;
|
|
80
81
|
|
|
81
82
|
constructor() {
|
|
82
83
|
super();
|
|
83
|
-
this.#feedbackLink =
|
|
84
|
-
|
|
85
|
-
this.#feedbackLink.target = '_blank';
|
|
86
|
-
this.#feedbackLink.innerText = i18nString(UIStrings.feedbackInline);
|
|
84
|
+
this.#feedbackLink =
|
|
85
|
+
Legacy.XLink.XLink.create(FEEDBACK_LINK, i18nString(UIStrings.feedbackInline), 'devtools-link');
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
connectedCallback(): void {
|
|
@@ -106,7 +105,6 @@ export class CSSOverviewStartView extends HTMLElement {
|
|
|
106
105
|
private render(): void {
|
|
107
106
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
108
107
|
// clang-format off
|
|
109
|
-
// eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
|
|
110
108
|
render(html`
|
|
111
109
|
<div class="css-overview-start-view">
|
|
112
110
|
<h1 class="summary-header">${i18nString(UIStrings.identifyCSSImprovements)}</h1>
|
|
@@ -144,11 +142,11 @@ export class CSSOverviewStartView extends HTMLElement {
|
|
|
144
142
|
</div>
|
|
145
143
|
<div>
|
|
146
144
|
<h1 class="video-doc-header">${i18nString(UIStrings.videoAndDocumentation)}</h1>
|
|
147
|
-
<
|
|
145
|
+
<x-link class="devtools-link" href=${DOC_LINK}>${i18nString(UIStrings.quickStartWithCSSOverview)}</x-link>
|
|
148
146
|
</div>
|
|
149
147
|
</div>
|
|
150
148
|
</section>
|
|
151
|
-
<
|
|
149
|
+
<x-link class="feedback-standalone" href=${FEEDBACK_LINK}>${i18nString(UIStrings.feedbackStandalone)}</x-link>
|
|
152
150
|
</div>
|
|
153
151
|
`, this.#shadow, {
|
|
154
152
|
host: this,
|
|
@@ -95,6 +95,12 @@ h1 {
|
|
|
95
95
|
margin-bottom: 24px;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.feedback-prompt .devtools-link {
|
|
99
|
+
color: -webkit-link;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
text-decoration: underline;
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
.resources {
|
|
99
105
|
display: flex;
|
|
100
106
|
flex-direction: row;
|
|
@@ -125,7 +131,7 @@ h1 {
|
|
|
125
131
|
font-weight: bold;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
|
-
.resources
|
|
134
|
+
.resources .devtools-link {
|
|
129
135
|
font-size: 14px;
|
|
130
136
|
line-height: 22px;
|
|
131
137
|
letter-spacing: 0.04em;
|
|
@@ -1827,7 +1827,8 @@ export class StylePropertiesSection {
|
|
|
1827
1827
|
containerElement.data = {
|
|
1828
1828
|
container: ElementsComponents.Helper.legacyNodeToElementsComponentsNode(container.containerNode),
|
|
1829
1829
|
queryName: containerQuery.name,
|
|
1830
|
-
onContainerLinkClick: (): void => {
|
|
1830
|
+
onContainerLinkClick: (event): void => {
|
|
1831
|
+
event.preventDefault();
|
|
1831
1832
|
ElementsPanel.instance().revealAndSelectNode(container.containerNode, true, true);
|
|
1832
1833
|
container.containerNode.scrollIntoView();
|
|
1833
1834
|
},
|
|
@@ -262,42 +262,19 @@ export class LighthouseController extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
262
262
|
return '';
|
|
263
263
|
}
|
|
264
264
|
const mainTarget = this.manager.target();
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
let inspectedURL = mainTarget.inspectedURL();
|
|
268
|
-
if (!executionContext) {
|
|
269
|
-
return inspectedURL;
|
|
270
|
-
}
|
|
265
|
+
// target.inspectedURL is reliably populated, however it lacks any url #hash
|
|
266
|
+
const inspectedURL = mainTarget.inspectedURL();
|
|
271
267
|
|
|
272
|
-
//
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
expression: 'window.location.href',
|
|
278
|
-
objectGroup: 'lighthouse',
|
|
279
|
-
includeCommandLineAPI: false,
|
|
280
|
-
silent: false,
|
|
281
|
-
returnByValue: true,
|
|
282
|
-
generatePreview: false,
|
|
283
|
-
allowUnsafeEvalBlockedByCSP: undefined,
|
|
284
|
-
disableBreaks: undefined,
|
|
285
|
-
replMode: undefined,
|
|
286
|
-
throwOnSideEffect: undefined,
|
|
287
|
-
timeout: undefined,
|
|
288
|
-
},
|
|
289
|
-
/* userGesture */ false, /* awaitPromise */ false);
|
|
290
|
-
if ((!('exceptionDetails' in result) || !result.exceptionDetails) && 'object' in result && result.object) {
|
|
291
|
-
if (result.object.value) {
|
|
292
|
-
inspectedURL = result.object.value;
|
|
293
|
-
}
|
|
294
|
-
result.object.release();
|
|
295
|
-
}
|
|
296
|
-
} catch (err) {
|
|
297
|
-
console.error(err);
|
|
268
|
+
// We'll use the navigationHistory to acquire the current URL including hash
|
|
269
|
+
const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
270
|
+
const navHistory = resourceTreeModel && await resourceTreeModel.navigationHistory();
|
|
271
|
+
if (!resourceTreeModel || !navHistory) {
|
|
272
|
+
return inspectedURL;
|
|
298
273
|
}
|
|
299
274
|
|
|
300
|
-
|
|
275
|
+
const {currentIndex, entries} = navHistory;
|
|
276
|
+
const navigationEntry = entries[currentIndex];
|
|
277
|
+
return navigationEntry.url;
|
|
301
278
|
}
|
|
302
279
|
|
|
303
280
|
getFlags(): {internalDisableDeviceScreenEmulation: boolean, emulatedFormFactor: (string|undefined)} {
|
|
@@ -263,7 +263,8 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
|
263
263
|
|
|
264
264
|
const reportContainer = this.auditResultsElement.createChild('div', 'lh-vars lh-root lh-devtools');
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
// @ts-ignore: Second argument will soon be required.
|
|
267
|
+
const dom = new LighthouseReport.DOM(this.auditResultsElement.ownerDocument as Document, reportContainer);
|
|
267
268
|
const renderer = new LighthouseReportRenderer(dom) as LighthouseReport.ReportRenderer;
|
|
268
269
|
|
|
269
270
|
const el = renderer.renderReport(lighthouseResult, reportContainer);
|
|
@@ -221,8 +221,9 @@ export class LighthouseReportUIFeatures extends LighthouseReport.ReportUIFeature
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
getDocument(): Document {
|
|
224
|
-
return this.
|
|
224
|
+
return this._dom.document();
|
|
225
225
|
}
|
|
226
|
+
|
|
226
227
|
resetUIState(): void {
|
|
227
228
|
this._resetUIState();
|
|
228
229
|
}
|
|
@@ -8,6 +8,7 @@ import type * as Host from '../../../core/host/host.js';
|
|
|
8
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
9
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
10
10
|
import * as Settings from '../../../ui/components/settings/settings.js';
|
|
11
|
+
import * as SDK from '../../../core/sdk/sdk.js';
|
|
11
12
|
|
|
12
13
|
import syncSectionStyles from './syncSection.css.js';
|
|
13
14
|
|
|
@@ -81,21 +82,31 @@ export class SyncSection extends HTMLElement {
|
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
/* x-link doesn't work with custom click/keydown handlers */
|
|
86
|
+
/* eslint-disable rulesdir/ban_a_tags_in_lit_html */
|
|
87
|
+
|
|
84
88
|
function renderAccountInfoOrWarning(syncInfo: Host.InspectorFrontendHostAPI.SyncInformation): LitHtml.TemplateResult {
|
|
85
89
|
if (!syncInfo.isSyncActive) {
|
|
90
|
+
const link = 'chrome://settings/syncSetup';
|
|
91
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
|
92
|
+
// clang-format off
|
|
86
93
|
return LitHtml.html`
|
|
87
94
|
<span class="warning">
|
|
88
|
-
${i18nString(UIStrings.syncDisabled)} <
|
|
89
|
-
|
|
95
|
+
${i18nString(UIStrings.syncDisabled)} <a href="${link}" class="link" target="_blank"
|
|
96
|
+
@click=${(e: Event): void => openSettingsTab(link, e)}
|
|
97
|
+
@keydown=${(e: Event): void => openSettingsTab(link, e)}>${i18nString(UIStrings.settings)}</x-link>
|
|
90
98
|
</span>`;
|
|
99
|
+
// clang-format on
|
|
91
100
|
}
|
|
92
101
|
if (!syncInfo.arePreferencesSynced) {
|
|
102
|
+
const link = 'chrome://settings/syncSetup/advanced';
|
|
93
103
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
94
104
|
// clang-format off
|
|
95
105
|
return LitHtml.html`
|
|
96
106
|
<span class="warning">
|
|
97
|
-
${i18nString(UIStrings.preferencesSyncDisabled)} <
|
|
98
|
-
|
|
107
|
+
${i18nString(UIStrings.preferencesSyncDisabled)} <a href="${link}" class="link" target="_blank"
|
|
108
|
+
@click=${(e: Event): void => openSettingsTab(link, e)}
|
|
109
|
+
@keydown=${(e: Event): void => openSettingsTab(link, e)}>${i18nString(UIStrings.settings)}</x-link>
|
|
99
110
|
</span>`;
|
|
100
111
|
// clang-format on
|
|
101
112
|
}
|
|
@@ -109,6 +120,16 @@ function renderAccountInfoOrWarning(syncInfo: Host.InspectorFrontendHostAPI.Sync
|
|
|
109
120
|
</div>`;
|
|
110
121
|
}
|
|
111
122
|
|
|
123
|
+
// Navigating to a chrome:// link via a normal anchor doesn't work, so we "navigate"
|
|
124
|
+
// there using CDP.
|
|
125
|
+
function openSettingsTab(url: string, event: Event): void {
|
|
126
|
+
if (event.type === 'click' || (event.type === 'keydown' && self.isEnterOrSpaceKey(event))) {
|
|
127
|
+
const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
|
|
128
|
+
mainTarget && mainTarget.targetAgent().invoke_createTarget({url});
|
|
129
|
+
event.consume(true);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
112
133
|
ComponentHelpers.CustomElements.defineComponent('devtools-sync-section', SyncSection);
|
|
113
134
|
|
|
114
135
|
declare global {
|
|
@@ -30,6 +30,7 @@ interface ButtonState {
|
|
|
30
30
|
variant?: Variant;
|
|
31
31
|
size?: Size;
|
|
32
32
|
disabled: boolean;
|
|
33
|
+
active: boolean;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export type ButtonData = {
|
|
@@ -37,11 +38,13 @@ export type ButtonData = {
|
|
|
37
38
|
iconUrl: string,
|
|
38
39
|
size?: Size,
|
|
39
40
|
disabled?: boolean,
|
|
41
|
+
active?: boolean,
|
|
40
42
|
}|{
|
|
41
43
|
variant: Variant.PRIMARY | Variant.SECONDARY,
|
|
42
44
|
iconUrl?: string,
|
|
43
45
|
size?: Size,
|
|
44
46
|
disabled?: boolean,
|
|
47
|
+
active?: boolean,
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
export class Button extends HTMLElement {
|
|
@@ -52,6 +55,7 @@ export class Button extends HTMLElement {
|
|
|
52
55
|
private readonly props: ButtonState = {
|
|
53
56
|
size: Size.MEDIUM,
|
|
54
57
|
disabled: false,
|
|
58
|
+
active: false,
|
|
55
59
|
};
|
|
56
60
|
private isEmpty = true;
|
|
57
61
|
|
|
@@ -69,6 +73,7 @@ export class Button extends HTMLElement {
|
|
|
69
73
|
this.props.variant = data.variant;
|
|
70
74
|
this.props.iconUrl = data.iconUrl;
|
|
71
75
|
this.props.size = data.size || Size.MEDIUM;
|
|
76
|
+
this.props.active = Boolean(data.active);
|
|
72
77
|
this.setDisabledProperty(data.disabled || false);
|
|
73
78
|
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
74
79
|
}
|
|
@@ -93,6 +98,11 @@ export class Button extends HTMLElement {
|
|
|
93
98
|
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
set active(active: boolean) {
|
|
102
|
+
this.props.active = active;
|
|
103
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
private setDisabledProperty(disabled: boolean): void {
|
|
97
107
|
this.props.disabled = disabled;
|
|
98
108
|
this.toggleAttribute('disabled', disabled);
|
|
@@ -140,6 +150,7 @@ export class Button extends HTMLElement {
|
|
|
140
150
|
'text-with-icon': Boolean(this.props.iconUrl) && !this.isEmpty,
|
|
141
151
|
'only-icon': Boolean(this.props.iconUrl) && this.isEmpty,
|
|
142
152
|
small: Boolean(this.props.size === Size.SMALL),
|
|
153
|
+
active: this.props.active,
|
|
143
154
|
};
|
|
144
155
|
// clang-format off
|
|
145
156
|
LitHtml.render(
|
|
@@ -80,6 +80,7 @@ button.primary:hover {
|
|
|
80
80
|
border: 1px solid var(--color-button-primary-background-hovering);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
button.primary.active,
|
|
83
84
|
button.primary:active {
|
|
84
85
|
background: var(--color-button-primary-background-pressed);
|
|
85
86
|
border: 1px solid var(--color-button-primary-background-pressed);
|
|
@@ -103,6 +104,7 @@ button.secondary:hover {
|
|
|
103
104
|
background: var(--color-button-secondary-background-hovering);
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
button.secondary.active,
|
|
106
108
|
button.secondary:active {
|
|
107
109
|
background: var(--color-button-secondary-background-pressed);
|
|
108
110
|
border: 1px solid var(--color-button-secondary-background-pressed);
|
|
@@ -120,6 +122,7 @@ button.secondary:disabled:hover {
|
|
|
120
122
|
cursor: not-allowed;
|
|
121
123
|
}
|
|
122
124
|
|
|
125
|
+
button.secondary.active:focus-visible,
|
|
123
126
|
button.secondary:active:focus-visible {
|
|
124
127
|
border: 1px solid var(--color-button-secondary-background-pressed);
|
|
125
128
|
}
|
|
@@ -128,6 +131,7 @@ button.toolbar:hover {
|
|
|
128
131
|
background-color: var(--color-button-secondary-background-hovering);
|
|
129
132
|
}
|
|
130
133
|
|
|
134
|
+
button.toolbar.active,
|
|
131
135
|
button.toolbar:active {
|
|
132
136
|
background-color: var(--color-button-secondary-background-pressed);
|
|
133
137
|
}
|
|
@@ -32,6 +32,16 @@ primaryButton.innerText = 'Click me';
|
|
|
32
32
|
primaryButton.onclick = () => alert('clicked');
|
|
33
33
|
appendButton(primaryButton);
|
|
34
34
|
|
|
35
|
+
// Primary (forced active)
|
|
36
|
+
const forcedActive = new Buttons.Button.Button();
|
|
37
|
+
forcedActive.data = {
|
|
38
|
+
variant: Buttons.Button.Variant.PRIMARY,
|
|
39
|
+
active: true,
|
|
40
|
+
};
|
|
41
|
+
forcedActive.innerText = 'Forced active';
|
|
42
|
+
forcedActive.onclick = () => alert('clicked');
|
|
43
|
+
appendButton(forcedActive);
|
|
44
|
+
|
|
35
45
|
// Secondary
|
|
36
46
|
const secondaryButton = new Buttons.Button.Button();
|
|
37
47
|
secondaryButton.innerText = 'Click me';
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"check-external-links": "third_party/node/node.py --output scripts/check_external_links.js",
|
|
32
32
|
"check-gn": "third_party/node/node.py --output scripts/check_gn.js",
|
|
33
33
|
"check-json": "third_party/node/node.py --output scripts/json_validator/validate_module_json.js",
|
|
34
|
-
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.
|
|
34
|
+
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.mjs && third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
35
35
|
"check-lint-css": "third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
36
36
|
"collect-strings": "third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
|
|
37
37
|
"components-server": "third_party/node/node.py --output scripts/component_server/server.js",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"unittest": "scripts/test/run_unittests.py --no-text-coverage",
|
|
56
56
|
"watch": "third_party/node/node.py --output scripts/watch_build.js"
|
|
57
57
|
},
|
|
58
|
-
"version": "1.0.
|
|
58
|
+
"version": "1.0.940255"
|
|
59
59
|
}
|