chrome-devtools-frontend 1.0.1597448 → 1.0.1598808
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/ui_engineering.md +6 -6
- package/front_end/core/host/AidaClient.ts +6 -0
- package/front_end/core/sdk/CPUThrottlingManager.ts +5 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +28 -0
- package/front_end/models/ai_assistance/AiConversation.ts +40 -22
- package/front_end/models/ai_assistance/ChangeManager.ts +16 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +127 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +35 -6
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +11 -8
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +109 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +30 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +34 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +27 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +21 -0
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +33 -0
- package/front_end/models/trace/insights/CharacterSet.ts +172 -0
- package/front_end/models/trace/insights/Models.ts +1 -0
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/types/TraceEvents.ts +17 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -12
- package/front_end/panels/ai_assistance/PatchWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +131 -63
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +18 -9
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/application/AppManifestView.ts +4 -5
- package/front_end/panels/application/CookieItemsView.ts +9 -15
- package/front_end/panels/application/DeviceBoundSessionsView.ts +20 -26
- package/front_end/panels/application/FrameDetailsView.ts +10 -16
- package/front_end/panels/application/OriginTrialTreeView.ts +2 -3
- package/front_end/panels/application/ReportingApiView.ts +14 -18
- package/front_end/panels/application/components/BackForwardCacheView.ts +3 -3
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -3
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
- package/front_end/panels/changes/ChangesView.ts +13 -15
- package/front_end/panels/console/ConsolePinPane.ts +3 -3
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageView.ts +4 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +11 -15
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +34 -8
- package/front_end/panels/elements/EventListenersWidget.ts +3 -2
- package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -6
- package/front_end/panels/elements/StylePropertiesSection.ts +129 -1
- package/front_end/panels/elements/StylePropertyHighlighter.ts +3 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -4
- package/front_end/panels/elements/stylesSidebarPane.css +34 -0
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +3 -5
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +2 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +5 -4
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +5 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +6 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +4 -4
- package/front_end/panels/network/RequestCookiesView.ts +5 -6
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/RequestInitiatorView.ts +7 -5
- package/front_end/panels/network/RequestResponseView.ts +10 -15
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +5 -6
- package/front_end/panels/recorder/components/RecordingView.ts +31 -36
- package/front_end/panels/recorder/components/StepEditor.ts +6 -7
- package/front_end/panels/recorder/components/StepView.ts +2 -1
- package/front_end/panels/search/SearchView.ts +3 -4
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -5
- package/front_end/panels/timeline/TimelineDetailsView.ts +8 -6
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -8
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +2 -7
- package/front_end/panels/timeline/components/insights/Cache.ts +8 -10
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +34 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +16 -20
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -6
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +3 -4
- package/front_end/panels/timeline/components/insights/EventRef.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +3 -4
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +5 -7
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +3 -4
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +3 -4
- package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -4
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +2 -0
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +5 -7
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -4
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +3 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +3 -4
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +7 -11
- package/front_end/panels/timeline/components/insights/NodeLink.ts +2 -4
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +3 -4
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +7 -10
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +5 -7
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/web_audio/WebAudioView.ts +3 -4
- package/front_end/panels/webauthn/WebauthnPane.ts +2 -2
- 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/lib/cjs/puppeteer/bidi/Realm.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +13 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +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/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.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/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/mitt.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/parsel-js/parsel-js.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/rxjs/rxjs.js +446 -446
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +166 -167
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +12 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/mitt.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js/parsel-js.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs/rxjs.js +97 -97
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +17 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +2 -0
- package/front_end/ui/legacy/Widget.ts +42 -6
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -8
- package/front_end/ui/visual_logging/Debugging.ts +0 -32
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import * as ApplicationComponents from './components/components.js';
|
|
|
22
22
|
|
|
23
23
|
const {styleMap, classMap, ref} = Directives;
|
|
24
24
|
const {linkifyURL} = Components.Linkifier.Linkifier;
|
|
25
|
-
const {
|
|
25
|
+
const {widget} = UI.Widget;
|
|
26
26
|
|
|
27
27
|
const UIStrings = {
|
|
28
28
|
/**
|
|
@@ -719,7 +719,7 @@ function renderProtocolHandlers(data: ProtocolHandlersSectionData, output: ViewO
|
|
|
719
719
|
// clang-format off
|
|
720
720
|
return html`${renderSectionHeader(i18nString(UIStrings.protocolHandlers), output)}
|
|
721
721
|
<div class="report-row">
|
|
722
|
-
<devtools-widget
|
|
722
|
+
<devtools-widget ${widget(
|
|
723
723
|
ApplicationComponents.ProtocolHandlersView.ProtocolHandlersView,
|
|
724
724
|
{protocolHandlers: data.protocolHandlers, manifestLink: data.manifestLink})}
|
|
725
725
|
${ref(setFocusOnSection(i18nString(UIStrings.protocolHandlers), output))}>
|
|
@@ -1095,12 +1095,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
1095
1095
|
render(html`
|
|
1096
1096
|
<style>${appManifestViewStyles}</style>
|
|
1097
1097
|
<style>${UI.inspectorCommonStyles}</style>
|
|
1098
|
-
${isEmpty ?
|
|
1099
|
-
<devtools-widget .widgetConfig=${widgetConfig(UI.EmptyWidget.EmptyWidget, {
|
|
1098
|
+
${isEmpty ? widget(UI.EmptyWidget.EmptyWidget, {
|
|
1100
1099
|
header: i18nString(UIStrings.noManifestDetected),
|
|
1101
1100
|
text: i18nString(UIStrings.manifestDescription),
|
|
1102
1101
|
link: 'https://web.dev/add-manifest/' as Platform.DevToolsPath.UrlString
|
|
1103
|
-
})
|
|
1102
|
+
}) : html`
|
|
1104
1103
|
<devtools-report .data=${{reportTitle: i18nString(UIStrings.appManifest), reportUrl: url}}>
|
|
1105
1104
|
${renderErrors(warnings, errors, imageErrors, output)}
|
|
1106
1105
|
${installabilityErrors?.length ? renderInstallability(installabilityErrors) : nothing}
|
|
@@ -82,6 +82,7 @@ const UIStrings = {
|
|
|
82
82
|
const str_ = i18n.i18n.registerUIStrings('panels/application/CookieItemsView.ts', UIStrings);
|
|
83
83
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
84
84
|
const {Size} = Geometry;
|
|
85
|
+
const {widget} = UI.Widget;
|
|
85
86
|
|
|
86
87
|
interface CookiePreviewWidgetInput {
|
|
87
88
|
cookie: SDK.Cookie.Cookie|null;
|
|
@@ -184,10 +185,8 @@ type View = (input: CookieItemsViewInput, output: CookieItemsViewOutput, target:
|
|
|
184
185
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
185
186
|
// clang-format off
|
|
186
187
|
render(html`<style>${cookieItemsViewStyles}</style>
|
|
187
|
-
<devtools-widget class="storage-view"
|
|
188
|
-
|
|
189
|
-
<devtools-widget
|
|
190
|
-
.widgetConfig=${UI.Widget.widgetConfig(StorageItemsToolbar, {
|
|
188
|
+
<devtools-widget class="storage-view" ${widget(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}>
|
|
189
|
+
<devtools-widget ${widget(StorageItemsToolbar, {
|
|
191
190
|
onDeleteSelectedCallback: input.onDeleteSelectedItems,
|
|
192
191
|
onDeleteAllCallback: input.onDeleteAllItems,
|
|
193
192
|
onRefreshCallback: input.onRefreshItems,
|
|
@@ -196,10 +195,8 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
196
195
|
${UI.Widget.widgetRef(StorageItemsToolbar, toolbar => { output.toolbar = toolbar; })}
|
|
197
196
|
></devtools-widget>
|
|
198
197
|
<devtools-split-view sidebar-position="second" name="cookie-items-split-view-state">
|
|
199
|
-
<devtools-widget
|
|
200
|
-
|
|
201
|
-
.widgetConfig=${UI.Widget.widgetConfig(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}>
|
|
202
|
-
<devtools-widget slot="main" .widgetConfig=${UI.Widget.widgetConfig(CookieTable.CookiesTable.CookiesTable, {
|
|
198
|
+
<devtools-widget slot="main" ${widget(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}>
|
|
199
|
+
<devtools-widget slot="main" ${widget(CookieTable.CookiesTable.CookiesTable, {
|
|
203
200
|
cookieDomain: input.cookieDomain,
|
|
204
201
|
cookiesData: input.cookiesData,
|
|
205
202
|
saveCallback: input.onSaveCookie,
|
|
@@ -210,15 +207,12 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
210
207
|
})}
|
|
211
208
|
></devtools-widget>
|
|
212
209
|
</devtools-widget>
|
|
213
|
-
<devtools-widget
|
|
214
|
-
slot="sidebar"
|
|
215
|
-
.widgetConfig=${UI.Widget.widgetConfig(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}
|
|
210
|
+
<devtools-widget slot="sidebar" ${widget(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}
|
|
216
211
|
jslog=${VisualLogging.pane('preview').track({resize: true})}>
|
|
217
212
|
${input.selectedCookie ?
|
|
218
|
-
html`<devtools-widget
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
html`<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(UI.EmptyWidget.EmptyWidget, {
|
|
213
|
+
html`<devtools-widget ${widget(CookiePreviewWidget, {cookie: input.selectedCookie})}>
|
|
214
|
+
</devtools-widget>` :
|
|
215
|
+
html`<devtools-widget ${widget(UI.EmptyWidget.EmptyWidget, {
|
|
222
216
|
header: i18nString(UIStrings.noCookieSelected),
|
|
223
217
|
text: i18nString(UIStrings.selectACookieToPreviewItsValue)
|
|
224
218
|
})}></devtools-widget>`}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
type SessionAndEvents
|
|
20
20
|
} from './DeviceBoundSessionsModel.js';
|
|
21
21
|
import deviceBoundSessionsViewStyles from './deviceBoundSessionsView.css.js';
|
|
22
|
-
const {
|
|
22
|
+
const {widget} = UI.Widget;
|
|
23
23
|
|
|
24
24
|
const UIStrings = {
|
|
25
25
|
/**
|
|
@@ -583,10 +583,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
583
583
|
<style>${UI.inspectorCommonStyles}</style>
|
|
584
584
|
<style>${deviceBoundSessionsViewStyles}</style>
|
|
585
585
|
${toolbarHtml}
|
|
586
|
-
<devtools-widget
|
|
587
|
-
|
|
588
|
-
text: defaultDescription
|
|
589
|
-
})} jslog=${VisualLogging.pane('device-bound-sessions-empty')}></devtools-widget>
|
|
586
|
+
<devtools-widget ${widget(UI.EmptyWidget.EmptyWidget, {header: defaultTitle, text: defaultDescription})} jslog=${
|
|
587
|
+
VisualLogging.pane('device-bound-sessions-empty')}></devtools-widget>
|
|
590
588
|
`,
|
|
591
589
|
target);
|
|
592
590
|
return;
|
|
@@ -727,28 +725,24 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
727
725
|
if (!failedRequest) {
|
|
728
726
|
return nothing;
|
|
729
727
|
}
|
|
728
|
+
// clang-format off
|
|
730
729
|
return html`${failedRequest.requestUrl && html`
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(SourceFrame.JSONView.SearchableJsonView, {
|
|
748
|
-
jsonObject: tryParseJson(failedRequest.responseErrorBody),
|
|
749
|
-
})}></devtools-widget>
|
|
750
|
-
</devtools-report-value>
|
|
751
|
-
`}`;
|
|
730
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestUrl)}</devtools-report-key>
|
|
731
|
+
<devtools-report-value>${failedRequest.requestUrl}</devtools-report-value>`}
|
|
732
|
+
${failedRequest.netError && html`
|
|
733
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestNetError)}</devtools-report-key>
|
|
734
|
+
<devtools-report-value>${failedRequest.netError}</devtools-report-value>`}
|
|
735
|
+
${failedRequest.responseError !== undefined ? html`
|
|
736
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestResponseCode)}</devtools-report-key>
|
|
737
|
+
<devtools-report-value>${failedRequest.responseError}</devtools-report-value>` : nothing}
|
|
738
|
+
${failedRequest.responseErrorBody && html`
|
|
739
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestResponseBody)}</devtools-report-key>
|
|
740
|
+
<devtools-report-value>
|
|
741
|
+
${widget(SourceFrame.JSONView.SearchableJsonView, {
|
|
742
|
+
jsonObject: tryParseJson(failedRequest.responseErrorBody),
|
|
743
|
+
})}
|
|
744
|
+
</devtools-report-value>`}`;
|
|
745
|
+
// clang-format on
|
|
752
746
|
};
|
|
753
747
|
|
|
754
748
|
const creationEventDetails =
|
|
@@ -30,7 +30,7 @@ import * as ApplicationComponents from './components/components.js';
|
|
|
30
30
|
import frameDetailsReportViewStyles from './frameDetailsReportView.css.js';
|
|
31
31
|
import {OriginTrialTreeView} from './OriginTrialTreeView.js';
|
|
32
32
|
|
|
33
|
-
const {
|
|
33
|
+
const {widget} = UI.Widget;
|
|
34
34
|
|
|
35
35
|
const UIStrings = {
|
|
36
36
|
/**
|
|
@@ -297,11 +297,10 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
297
297
|
${renderIsolationSection(input)}
|
|
298
298
|
${renderApiAvailabilitySection(input.frame)}
|
|
299
299
|
${renderOriginTrial(input.trials)}
|
|
300
|
-
${input.permissionsPolicies ?
|
|
301
|
-
|
|
300
|
+
${input.permissionsPolicies ?
|
|
301
|
+
widget(ApplicationComponents.PermissionsPolicySection.PermissionsPolicySection, {
|
|
302
302
|
policies: input.permissionsPolicies,
|
|
303
|
-
showDetails: false})}
|
|
304
|
-
</devtools-widget>` : nothing}
|
|
303
|
+
showDetails: false}) : nothing}
|
|
305
304
|
${input.protocolMonitorExperimentEnabled ? renderAdditionalInfoSection(input.frame) : nothing}
|
|
306
305
|
</devtools-report>
|
|
307
306
|
`, target);
|
|
@@ -328,7 +327,7 @@ function renderOriginTrial(trials: Protocol.Page.OriginTrial[]|null): LitTemplat
|
|
|
328
327
|
</devtools-link>
|
|
329
328
|
</span>
|
|
330
329
|
</devtools-report-section>
|
|
331
|
-
<devtools-widget class="span-cols"
|
|
330
|
+
<devtools-widget class="span-cols" ${widget(OriginTrialTreeView, {data})}>
|
|
332
331
|
</devtools-widget>
|
|
333
332
|
<devtools-report-divider></devtools-report-divider>`;
|
|
334
333
|
// clang-format on
|
|
@@ -434,10 +433,7 @@ function renderOwnerElement(linkTargetDOMNode: SDK.DOMModel.DOMNode|null): LitTe
|
|
|
434
433
|
<devtools-report-key>${i18nString(UIStrings.ownerElement)}</devtools-report-key>
|
|
435
434
|
<devtools-report-value class="without-min-width">
|
|
436
435
|
<div class="inline-items">
|
|
437
|
-
|
|
438
|
-
node: linkTargetDOMNode
|
|
439
|
-
})}>
|
|
440
|
-
</devtools-widget>
|
|
436
|
+
${widget(PanelCommon.DOMLinkifier.DOMNodeLink, {node: linkTargetDOMNode})}
|
|
441
437
|
</div>
|
|
442
438
|
</devtools-report-value>
|
|
443
439
|
`;
|
|
@@ -454,9 +450,8 @@ function maybeRenderCreationStacktrace(stackTrace: StackTrace.StackTrace.StackTr
|
|
|
454
450
|
<devtools-report-key title=${i18nString(UIStrings.creationStackTraceExplanation)}>${
|
|
455
451
|
i18nString(UIStrings.creationStackTrace)}</devtools-report-key>
|
|
456
452
|
<devtools-report-value jslog=${VisualLogging.section('frame-creation-stack-trace')}>
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
</devtools-widget>
|
|
453
|
+
${widget(Components.JSPresentationUtils.StackTracePreviewContent,
|
|
454
|
+
{stackTrace, options: {expandable: true}})}
|
|
460
455
|
</devtools-report-value>
|
|
461
456
|
`;
|
|
462
457
|
// clang-format on
|
|
@@ -524,9 +519,8 @@ function maybeRenderCreatorAdScriptAncestry(
|
|
|
524
519
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
525
520
|
// clang-format off
|
|
526
521
|
return html`<div>
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
</devtools-widget>
|
|
522
|
+
${widget(Components.Linkifier.ScriptLocationLink,
|
|
523
|
+
{target, scriptId: adScriptId.scriptId, options: {jslogContext: 'ad-script'}})}
|
|
530
524
|
</div>`;
|
|
531
525
|
// clang-format on
|
|
532
526
|
});
|
|
@@ -16,7 +16,7 @@ import originTrialTokenRowsStyles from './originTrialTokenRows.css.js';
|
|
|
16
16
|
import originTrialTreeViewStyles from './originTrialTreeView.css.js';
|
|
17
17
|
|
|
18
18
|
const {classMap} = Directives;
|
|
19
|
-
const {
|
|
19
|
+
const {widget} = UI.Widget;
|
|
20
20
|
|
|
21
21
|
const UIStrings = {
|
|
22
22
|
/**
|
|
@@ -131,8 +131,7 @@ interface TokenField {
|
|
|
131
131
|
function renderTokenDetails(token: Protocol.Page.OriginTrialTokenWithStatus): TemplateResult {
|
|
132
132
|
return html`
|
|
133
133
|
<li role="treeitem">
|
|
134
|
-
|
|
135
|
-
</devtools-widget>
|
|
134
|
+
${widget(OriginTrialTokenRows, {data: token})}
|
|
136
135
|
</li>`;
|
|
137
136
|
}
|
|
138
137
|
|
|
@@ -13,7 +13,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
13
13
|
|
|
14
14
|
import * as ApplicationComponents from './components/components.js';
|
|
15
15
|
|
|
16
|
-
const {
|
|
16
|
+
const {widget} = UI.Widget;
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
@@ -66,34 +66,30 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
66
66
|
${input.hasReports ? html`
|
|
67
67
|
<devtools-split-view slot="main" sidebar-position="second" sidebar-initial-size="150">
|
|
68
68
|
<div slot="main">
|
|
69
|
-
|
|
69
|
+
${widget(ApplicationComponents.ReportsGrid.ReportsGrid, {
|
|
70
70
|
reports: input.reports, onReportSelected: input.onReportSelected,
|
|
71
|
-
})}
|
|
71
|
+
})}
|
|
72
72
|
</div>
|
|
73
73
|
<div slot="sidebar" class="vbox" jslog=${VisualLogging.pane('preview').track({resize: true})}>
|
|
74
|
-
${input.focusedReport
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
header: i18nString(UIStrings.noReportSelected),
|
|
81
|
-
text: i18nString(UIStrings.clickToDisplayBody),
|
|
82
|
-
})}></devtools-widget>
|
|
83
|
-
`}
|
|
74
|
+
${input.focusedReport
|
|
75
|
+
? widget(SourceFrame.JSONView.SearchableJsonView, {jsonObject: input.focusedReport.body})
|
|
76
|
+
: widget(UI.EmptyWidget.EmptyWidget, {
|
|
77
|
+
header: i18nString(UIStrings.noReportSelected),
|
|
78
|
+
text: i18nString(UIStrings.clickToDisplayBody),
|
|
79
|
+
})}
|
|
84
80
|
</div>
|
|
85
81
|
</devtools-split-view>
|
|
86
82
|
` : html`
|
|
87
83
|
<div slot="main">
|
|
88
|
-
|
|
84
|
+
${widget(ApplicationComponents.ReportsGrid.ReportsGrid, {
|
|
89
85
|
reports: input.reports, onReportSelected: input.onReportSelected,
|
|
90
|
-
})}
|
|
86
|
+
})}
|
|
91
87
|
</div>
|
|
92
88
|
`}
|
|
93
89
|
<div slot="sidebar">
|
|
94
|
-
|
|
90
|
+
${widget(ApplicationComponents.EndpointsGrid.EndpointsGrid, {
|
|
95
91
|
endpoints: input.endpoints,
|
|
96
|
-
})}
|
|
92
|
+
})}
|
|
97
93
|
</div>
|
|
98
94
|
</devtools-split-view>
|
|
99
95
|
`, target);
|
|
@@ -101,7 +97,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
101
97
|
} else {
|
|
102
98
|
// clang-format off
|
|
103
99
|
render(html`
|
|
104
|
-
<devtools-widget
|
|
100
|
+
<devtools-widget ${widget(UI.EmptyWidget.EmptyWidget, {
|
|
105
101
|
header: i18nString(UIStrings.noReportOrEndpoint),
|
|
106
102
|
text: i18nString(UIStrings.reportingApiDescription),
|
|
107
103
|
link: REPORTING_API_EXPLANATION_URL,
|
|
@@ -147,7 +147,7 @@ const UIStrings = {
|
|
|
147
147
|
|
|
148
148
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
|
|
149
149
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
150
|
-
const {
|
|
150
|
+
const {widget} = UI.Widget;
|
|
151
151
|
|
|
152
152
|
const enum ScreenStatusType {
|
|
153
153
|
RUNNING = 'Running',
|
|
@@ -387,7 +387,7 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
|
|
|
387
387
|
const maxLengthForDisplayedURLs = 50;
|
|
388
388
|
const rows = [html`<div>${i18nString(UIStrings.filesPerIssue, {n: details.length})}</div>`];
|
|
389
389
|
rows.push(...details.map(detail => html`
|
|
390
|
-
|
|
390
|
+
${widget(Components.Linkifier.ScriptLocationLink, {
|
|
391
391
|
sourceURL: detail.url as Platform.DevToolsPath.UrlString,
|
|
392
392
|
lineNumber: detail.lineNumber,
|
|
393
393
|
options: {
|
|
@@ -396,7 +396,7 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
|
|
|
396
396
|
inlineFrameIndex: 0,
|
|
397
397
|
maxLength: maxLengthForDisplayedURLs,
|
|
398
398
|
}
|
|
399
|
-
})}
|
|
399
|
+
})}`));
|
|
400
400
|
return html`
|
|
401
401
|
<div class="details-list">
|
|
402
402
|
<devtools-expandable-list .data=${
|
|
@@ -28,6 +28,7 @@ import preloadingViewStyles from './preloadingView.css.js';
|
|
|
28
28
|
import preloadingViewDropDownStyles from './preloadingViewDropDown.css.js';
|
|
29
29
|
|
|
30
30
|
const {createRef, ref} = Directives;
|
|
31
|
+
const {widget} = UI.Widget;
|
|
31
32
|
|
|
32
33
|
const UIStrings = {
|
|
33
34
|
/**
|
|
@@ -266,7 +267,7 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
266
267
|
<div slot="main" ${ref(this.ruleSetGridContainerRef)}>
|
|
267
268
|
</div>
|
|
268
269
|
<div slot="sidebar" jslog=${VisualLogging.section('rule-set-details')}>
|
|
269
|
-
<devtools-widget
|
|
270
|
+
<devtools-widget ${widget(PreloadingComponents.RuleSetDetailsView.RuleSetDetailsView, {
|
|
270
271
|
ruleSet: this.getRuleSet(),
|
|
271
272
|
shouldPrettyPrint: this.shouldPrettyPrint,
|
|
272
273
|
})} ${ref(this.ruleSetDetailsRef)}></devtools-widget>
|
|
@@ -448,6 +449,7 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
448
449
|
new PreloadingComponents.PreloadingDetailsReportView.PreloadingDetailsReportView();
|
|
449
450
|
private readonly ruleSetSelector: PreloadingRuleSetSelector;
|
|
450
451
|
private readonly textFilterUI: UI.Toolbar.ToolbarFilter;
|
|
452
|
+
private hsplit?: UI.SplitWidget.SplitWidget;
|
|
451
453
|
private clearButton: UI.Toolbar.ToolbarButton;
|
|
452
454
|
|
|
453
455
|
constructor(model: SDK.PreloadingModel.PreloadingModel) {
|
|
@@ -541,7 +543,12 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
541
543
|
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
542
544
|
</div>
|
|
543
545
|
</div>
|
|
544
|
-
<devtools-split-view sidebar-position="second"
|
|
546
|
+
<devtools-split-view sidebar-position="second" ${
|
|
547
|
+
UI.Widget.widgetRef(
|
|
548
|
+
UI.SplitWidget.SplitWidget,
|
|
549
|
+
w => {
|
|
550
|
+
this.hsplit = w;
|
|
551
|
+
})}>
|
|
545
552
|
<div slot="main" class="overflow-auto" style="height: 100%">
|
|
546
553
|
${preloadingGridContainer}
|
|
547
554
|
</div>
|
|
@@ -632,7 +639,15 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
632
639
|
this.preloadingGrid.rows = filteredRows;
|
|
633
640
|
this.preloadingGrid.pageURL = pageURL();
|
|
634
641
|
// Only show empty state when there are truly no speculations (not when filter has no matches)
|
|
635
|
-
this.contentElement.classList.
|
|
642
|
+
const wasEmpty = this.contentElement.classList.contains('empty');
|
|
643
|
+
const isEmpty = rows.length === 0;
|
|
644
|
+
this.contentElement.classList.toggle('empty', isEmpty);
|
|
645
|
+
|
|
646
|
+
// When this view starts empty, the split view gets laid out while hidden and collapses
|
|
647
|
+
// its sidebar to 0. Re-layout once it becomes visible.
|
|
648
|
+
if (wasEmpty && !isEmpty) {
|
|
649
|
+
this.hsplit?.doLayout();
|
|
650
|
+
}
|
|
636
651
|
|
|
637
652
|
this.updatePreloadingDetails();
|
|
638
653
|
}
|
|
@@ -134,7 +134,7 @@ const UIStrings = {
|
|
|
134
134
|
const str_ = i18n.i18n.registerUIStrings('panels/application/preloading/components/UsedPreloadingView.ts', UIStrings);
|
|
135
135
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
136
136
|
|
|
137
|
-
const {
|
|
137
|
+
const {widget} = UI.Widget;
|
|
138
138
|
|
|
139
139
|
export interface UsedPreloadingViewData {
|
|
140
140
|
pageURL: Platform.DevToolsPath.UrlString;
|
|
@@ -270,8 +270,7 @@ function renderMismatchedSections(data: MismatchedData): LitTemplate {
|
|
|
270
270
|
${i18nString(UIStrings.preloadedURLs)}
|
|
271
271
|
</devtools-report-section-header>
|
|
272
272
|
<devtools-report-section jslog=${VisualLogging.section('preloaded-urls')}>
|
|
273
|
-
|
|
274
|
-
</devtools-widget>
|
|
273
|
+
${widget(MismatchedPreloadingGrid, {data})}
|
|
275
274
|
</devtools-report-section>`;
|
|
276
275
|
// clang-format on
|
|
277
276
|
}
|
|
@@ -107,6 +107,7 @@ const DOM_BREAKPOINT_DOCUMENTATION_URL =
|
|
|
107
107
|
'https://developer.chrome.com/docs/devtools/javascript/breakpoints#dom' as Platform.DevToolsPath.UrlString;
|
|
108
108
|
|
|
109
109
|
const {html, render, Directives} = Lit;
|
|
110
|
+
const {widget} = UI.Widget;
|
|
110
111
|
|
|
111
112
|
export interface Breakpoint {
|
|
112
113
|
breakpoint: SDK.DOMDebuggerModel.DOMBreakpoint;
|
|
@@ -169,11 +170,11 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
169
170
|
</ul>` : html
|
|
170
171
|
`<div class="placeholder">
|
|
171
172
|
<div class="gray-info-message">${i18nString(UIStrings.noBreakpoints)}</div>
|
|
172
|
-
|
|
173
|
+
${widget(UI.EmptyWidget.EmptyWidget, {
|
|
173
174
|
header: i18nString(UIStrings.noBreakpoints),
|
|
174
175
|
text: i18nString(UIStrings.domBreakpointsDescription),
|
|
175
176
|
link: DOM_BREAKPOINT_DOCUMENTATION_URL,
|
|
176
|
-
})}
|
|
177
|
+
})}
|
|
177
178
|
</div>`}
|
|
178
179
|
</div>
|
|
179
180
|
`,
|
|
@@ -34,6 +34,8 @@ const UIStrings = {
|
|
|
34
34
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesView.ts', UIStrings);
|
|
35
35
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
36
36
|
const {render, html} = Lit;
|
|
37
|
+
const {widget} = UI.Widget;
|
|
38
|
+
|
|
37
39
|
interface ViewInput {
|
|
38
40
|
selectedSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
39
41
|
onSelect(sourceCode: Workspace.UISourceCode.UISourceCode|null): void;
|
|
@@ -56,32 +58,28 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
56
58
|
<div class=vbox slot="main">
|
|
57
59
|
<devtools-widget
|
|
58
60
|
?hidden=${input.workspaceDiff.modifiedUISourceCodes().length > 0}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
${widget(UI.EmptyWidget.EmptyWidget, {
|
|
62
|
+
header: i18nString(UIStrings.noChanges),
|
|
63
|
+
text: i18nString(UIStrings.changesViewDescription),
|
|
64
|
+
link: CHANGES_VIEW_URL,
|
|
65
|
+
})}>
|
|
64
66
|
</devtools-widget>
|
|
65
67
|
<div class=diff-container role=tabpanel ?hidden=${input.workspaceDiff.modifiedUISourceCodes().length === 0}>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
${widget(CombinedDiffView.CombinedDiffView, {
|
|
69
|
+
selectedFileUrl: input.selectedSourceCode?.url(),
|
|
70
|
+
workspaceDiff: input.workspaceDiff
|
|
71
|
+
})}
|
|
70
72
|
</div>
|
|
71
73
|
${hasCopyToPrompt ? html`
|
|
72
74
|
<devtools-widget class="copy-to-prompt"
|
|
73
|
-
|
|
75
|
+
${widget(PanelsCommon.CopyChangesToPrompt, {
|
|
74
76
|
workspaceDiff: input.workspaceDiff,
|
|
75
77
|
patchAgentCSSChange: null,
|
|
76
78
|
})}
|
|
77
79
|
></devtools-widget>
|
|
78
80
|
` : Lit.nothing}
|
|
79
81
|
</div>
|
|
80
|
-
<devtools-widget
|
|
81
|
-
slot="sidebar"
|
|
82
|
-
.widgetConfig=${UI.Widget.widgetConfig(ChangesSidebar, {
|
|
83
|
-
workspaceDiff: input.workspaceDiff
|
|
84
|
-
})}
|
|
82
|
+
<devtools-widget slot="sidebar" ${widget(ChangesSidebar, {workspaceDiff: input.workspaceDiff})}
|
|
85
83
|
${UI.Widget.widgetRef(ChangesSidebar, onSidebar)}>
|
|
86
84
|
</devtools-widget>
|
|
87
85
|
</devtools-split-view>`,
|
|
@@ -20,6 +20,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
20
20
|
import consolePinPaneStyles from './consolePinPane.css.js';
|
|
21
21
|
|
|
22
22
|
const {createRef, ref} = Directives;
|
|
23
|
+
const {widget} = UI.Widget;
|
|
23
24
|
|
|
24
25
|
const UIStrings = {
|
|
25
26
|
/**
|
|
@@ -71,12 +72,11 @@ export const DEFAULT_PANE_VIEW = (input: PaneViewInput, _output: object, target:
|
|
|
71
72
|
render(html`
|
|
72
73
|
<style>${consolePinPaneStyles}</style>
|
|
73
74
|
<div class='console-pins monospace' jslog=${VisualLogging.pane('console-pins')} @contextmenu=${input.onContextMenu}>
|
|
74
|
-
${input.pins.map(pin =>
|
|
75
|
-
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(ConsolePinPresenter, {
|
|
75
|
+
${input.pins.map(pin => widget(ConsolePinPresenter, {
|
|
76
76
|
pin,
|
|
77
77
|
focusOut: input.focusOut,
|
|
78
78
|
onRemove: () => input.onRemove(pin),
|
|
79
|
-
|
|
79
|
+
})
|
|
80
80
|
)}
|
|
81
81
|
</div>`, target);
|
|
82
82
|
// clang-format on
|
|
@@ -340,7 +340,7 @@ function renderItem(info: CoverageListItem, input: ViewInput): TemplateResult {
|
|
|
340
340
|
</td>
|
|
341
341
|
${info.sources.length > 0 ? html`
|
|
342
342
|
<td><table>
|
|
343
|
-
${ifExpanded(
|
|
343
|
+
${ifExpanded(html`${repeat(info.sources, source => source.url, source => renderItem(source, input))}`)}
|
|
344
344
|
</table></td>` : nothing}
|
|
345
345
|
</tr>`;
|
|
346
346
|
// clang-format on
|
|
@@ -127,7 +127,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
127
127
|
const i18nTemplate = unboundI18nTemplate.bind(undefined, str_);
|
|
128
128
|
const {ref} = Directives;
|
|
129
129
|
const {bindToAction, bindToSetting} = UI.UIUtils;
|
|
130
|
-
const {
|
|
130
|
+
const {widget} = UI.Widget;
|
|
131
131
|
|
|
132
132
|
let coverageViewInstance: CoverageView|undefined;
|
|
133
133
|
|
|
@@ -222,7 +222,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
222
222
|
i18nString(UIStrings.bfcacheNoCapture) : i18nString(UIStrings.activationNoCapture),
|
|
223
223
|
input.needsReload)
|
|
224
224
|
: input.coverageInfo ? html`
|
|
225
|
-
<devtools-widget autofocus class="results"
|
|
225
|
+
<devtools-widget autofocus class="results" ${widget(CoverageListView, {
|
|
226
226
|
coverageInfo: input.coverageInfo,
|
|
227
227
|
highlightRegExp: input.textFilter,
|
|
228
228
|
selectedUrl: input.selectedUrl,
|
|
@@ -242,7 +242,7 @@ function renderLandingPage(supportsRecordOnReload: boolean): TemplateResult {
|
|
|
242
242
|
if (supportsRecordOnReload) {
|
|
243
243
|
// clang-format off
|
|
244
244
|
return html`
|
|
245
|
-
<devtools-widget
|
|
245
|
+
<devtools-widget ${widget(UI.EmptyWidget.EmptyWidget,{
|
|
246
246
|
header: i18nString(UIStrings.noCoverageData),
|
|
247
247
|
link: 'https://developer.chrome.com/docs/devtools/coverage' as Platform.DevToolsPath.UrlString,
|
|
248
248
|
text: i18nString(UIStrings.clickTheReloadButtonSToReloadAnd, {PH1: i18nString(UIStrings.reloadPage)}),
|
|
@@ -256,7 +256,7 @@ function renderLandingPage(supportsRecordOnReload: boolean): TemplateResult {
|
|
|
256
256
|
}
|
|
257
257
|
// clang-format off
|
|
258
258
|
return html`
|
|
259
|
-
<devtools-widget
|
|
259
|
+
<devtools-widget ${widget(UI.EmptyWidget.EmptyWidget,{
|
|
260
260
|
header: i18nString(UIStrings.noCoverageData),
|
|
261
261
|
link: 'https://developer.chrome.com/docs/devtools/coverage' as Platform.DevToolsPath.UrlString,
|
|
262
262
|
text: i18nString(UIStrings.clickTheRecordButtonSToStart, {PH1: i18nString(UIStrings.startRecording)}),
|
|
@@ -25,7 +25,7 @@ import {CSSOverviewSidebarPanel} from './CSSOverviewSidebarPanel.js';
|
|
|
25
25
|
import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
|
26
26
|
|
|
27
27
|
const {styleMap, ref} = Directives;
|
|
28
|
-
const {
|
|
28
|
+
const {widget} = UI.Widget;
|
|
29
29
|
|
|
30
30
|
const UIStrings = {
|
|
31
31
|
/**
|
|
@@ -281,7 +281,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
281
281
|
render(html`
|
|
282
282
|
<style>${cssOverviewCompletedViewStyles}</style>
|
|
283
283
|
<devtools-split-view direction="column" sidebar-position="first" sidebar-initial-size="200">
|
|
284
|
-
<devtools-widget slot="sidebar"
|
|
284
|
+
<devtools-widget slot="sidebar" ${widget(CSSOverviewSidebarPanel, {
|
|
285
285
|
minimumSize: new Geometry.Size(100, 25),
|
|
286
286
|
items: [
|
|
287
287
|
{name: i18nString(UIStrings.overviewSummary), id: 'summary'},
|
|
@@ -325,7 +325,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
325
325
|
${renderMediaQueries(input.mediaQueries)}
|
|
326
326
|
</div>
|
|
327
327
|
</div>
|
|
328
|
-
<devtools-widget slot="sidebar"
|
|
328
|
+
<devtools-widget slot="sidebar" ${widget(e => {
|
|
329
329
|
const tabbedPane = new UI.TabbedPane.TabbedPane(e);
|
|
330
330
|
output.closeAllTabs = () => { tabbedPane.closeTabs(tabbedPane.tabIds()); };
|
|
331
331
|
output.addTab = (id: string, tabTitle: string, view: UI.Widget.Widget, jslogContext: string) => {
|
|
@@ -6,7 +6,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
|
-
import {
|
|
9
|
+
import {render} from '../../ui/lit/lit.js';
|
|
10
10
|
|
|
11
11
|
import {type ContrastIssue, CSSOverviewCompletedView, type OverviewData} from './CSSOverviewCompletedView.js';
|
|
12
12
|
import {CSSOverviewModel, type GlobalStyleStats} from './CSSOverviewModel.js';
|
|
@@ -14,7 +14,7 @@ import {CSSOverviewProcessingView} from './CSSOverviewProcessingView.js';
|
|
|
14
14
|
import {CSSOverviewStartView} from './CSSOverviewStartView.js';
|
|
15
15
|
import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
|
16
16
|
|
|
17
|
-
const {
|
|
17
|
+
const {widget} = UI.Widget;
|
|
18
18
|
|
|
19
19
|
interface ViewInput {
|
|
20
20
|
state: 'start'|'processing'|'completed';
|
|
@@ -28,19 +28,15 @@ interface ViewInput {
|
|
|
28
28
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
29
29
|
|
|
30
30
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
target: input.target,
|
|
41
|
-
})}></devtools-widget>`,
|
|
42
|
-
target);
|
|
43
|
-
// clang-format on
|
|
31
|
+
render(
|
|
32
|
+
input.state === 'start' ? widget(CSSOverviewStartView, {onStartCapture: input.onStartCapture}) :
|
|
33
|
+
input.state === 'processing' ? widget(CSSOverviewProcessingView, {onCancel: input.onCancel}) :
|
|
34
|
+
widget(CSSOverviewCompletedView, {
|
|
35
|
+
onReset: input.onReset,
|
|
36
|
+
overviewData: input.overviewData,
|
|
37
|
+
target: input.target,
|
|
38
|
+
}),
|
|
39
|
+
target);
|
|
44
40
|
};
|
|
45
41
|
|
|
46
42
|
export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManager.Observer {
|