chrome-devtools-frontend 1.0.1597448 → 1.0.1597624

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.
Files changed (81) hide show
  1. package/front_end/core/host/AidaClient.ts +4 -0
  2. package/front_end/core/sdk/CPUThrottlingManager.ts +5 -1
  3. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
  4. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +28 -0
  5. package/front_end/models/ai_assistance/AiConversation.ts +24 -8
  6. package/front_end/models/ai_assistance/ChangeManager.ts +16 -0
  7. package/front_end/models/ai_assistance/ExtensionScope.ts +11 -3
  8. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +127 -0
  9. package/front_end/models/ai_assistance/agents/AiAgent.ts +22 -3
  10. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +1 -1
  11. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +11 -8
  12. package/front_end/models/ai_assistance/agents/StylingAgent.ts +34 -4
  13. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  14. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +27 -0
  15. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +21 -0
  16. package/front_end/models/trace/Processor.ts +1 -0
  17. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +33 -0
  18. package/front_end/models/trace/insights/CharacterSet.ts +172 -0
  19. package/front_end/models/trace/insights/Models.ts +1 -0
  20. package/front_end/models/trace/insights/types.ts +1 -0
  21. package/front_end/models/trace/types/TraceEvents.ts +17 -0
  22. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +16 -3
  23. package/front_end/panels/ai_assistance/components/ChatMessage.ts +90 -46
  24. package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +18 -9
  25. package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
  26. package/front_end/panels/application/AppManifestView.ts +3 -4
  27. package/front_end/panels/application/DeviceBoundSessionsView.ts +18 -22
  28. package/front_end/panels/application/FrameDetailsView.ts +9 -15
  29. package/front_end/panels/application/OriginTrialTreeView.ts +2 -3
  30. package/front_end/panels/application/ReportingApiView.ts +13 -17
  31. package/front_end/panels/application/components/BackForwardCacheView.ts +3 -3
  32. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -3
  33. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
  34. package/front_end/panels/changes/ChangesView.ts +6 -4
  35. package/front_end/panels/console/ConsolePinPane.ts +3 -3
  36. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  37. package/front_end/panels/css_overview/CSSOverviewPanel.ts +11 -15
  38. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -5
  39. package/front_end/panels/elements/EventListenersWidget.ts +3 -2
  40. package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -6
  41. package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -4
  42. package/front_end/panels/layer_viewer/Layers3DView.ts +5 -4
  43. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +5 -6
  44. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +6 -11
  45. package/front_end/panels/network/RequestCookiesView.ts +3 -4
  46. package/front_end/panels/network/RequestInitiatorView.ts +7 -5
  47. package/front_end/panels/network/RequestResponseView.ts +10 -15
  48. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -4
  49. package/front_end/panels/recorder/components/RecordingView.ts +31 -36
  50. package/front_end/panels/recorder/components/StepEditor.ts +6 -7
  51. package/front_end/panels/search/SearchView.ts +2 -3
  52. package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -5
  53. package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -8
  54. package/front_end/panels/timeline/components/insights/Cache.ts +8 -10
  55. package/front_end/panels/timeline/components/insights/CharacterSet.ts +38 -0
  56. package/front_end/panels/timeline/components/insights/DOMSize.ts +16 -20
  57. package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -6
  58. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +3 -4
  59. package/front_end/panels/timeline/components/insights/FontDisplay.ts +3 -4
  60. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +5 -7
  61. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +3 -4
  62. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +3 -4
  63. package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -4
  64. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +2 -0
  65. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +5 -7
  66. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -4
  67. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +3 -4
  68. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +3 -4
  69. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +7 -11
  70. package/front_end/panels/timeline/components/insights/NodeLink.ts +2 -4
  71. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +3 -4
  72. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +7 -10
  73. package/front_end/panels/timeline/components/insights/ThirdParties.ts +5 -7
  74. package/front_end/panels/timeline/components/insights/insights.ts +2 -0
  75. package/front_end/panels/web_audio/WebAudioView.ts +3 -4
  76. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -0
  77. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
  78. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -8
  79. package/front_end/ui/visual_logging/Debugging.ts +0 -32
  80. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  81. package/package.json +1 -1
@@ -41,6 +41,7 @@ const UIStrings = {
41
41
  } as const;
42
42
  const str_ = i18n.i18n.registerUIStrings('panels/settings/WorkspaceSettingsTab.ts', UIStrings);
43
43
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
44
+ const {widget} = UI.Widget;
44
45
 
45
46
  export interface WorkspaceSettingsTabInput {
46
47
  excludePatternSetting: Common.Settings.RegExpSetting;
@@ -70,11 +71,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
70
71
  <devtools-card heading=${fileSystem.displayName}>
71
72
  <devtools-icon name="folder" slot="heading-prefix"></devtools-icon>
72
73
  <div class="mapping-view-container">
73
- <devtools-widget .widgetConfig=${
74
- UI.Widget.widgetConfig(
75
- EditFileSystemView,
76
- {fileSystem: fileSystem.fileSystem})}>
77
- </devtools-widget>
74
+ ${widget(EditFileSystemView, {fileSystem: fileSystem.fileSystem})}
78
75
  </div>
79
76
  <devtools-button
80
77
  slot="heading-suffix"
@@ -41,7 +41,7 @@ import metricValueStyles from './metricValueStyles.css.js';
41
41
  import {CLS_THRESHOLDS, INP_THRESHOLDS, renderMetricValue} from './Utils.js';
42
42
 
43
43
  const {html, nothing} = Lit;
44
- const {widgetConfig} = UI.Widget;
44
+ const {widget} = UI.Widget;
45
45
 
46
46
  type DeviceOption = CrUXManager.DeviceScope|'AUTO';
47
47
 
@@ -485,8 +485,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
485
485
  <div class="related-info" slot="extra-info">
486
486
  <span class="related-info-label">${i18nString(UIStrings.lcpElement)}</span>
487
487
  <span class="related-info-link">
488
- <devtools-widget .widgetConfig=${widgetConfig(PanelsCommon.DOMLinkifier.DOMNodeLink, {node: this.#lcpValue?.nodeRef})}>
489
- </devtools-widget>
488
+ ${widget(PanelsCommon.DOMLinkifier.DOMNodeLink, {node: this.#lcpValue?.nodeRef})}
490
489
  </span>
491
490
  </div>
492
491
  `
@@ -650,7 +649,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
650
649
  </ul>
651
650
  ` : nothing}
652
651
  <div class="environment-option">
653
- <devtools-widget .widgetConfig=${widgetConfig(CPUThrottlingSelector, {recommendedOption: recs.cpuOption})}></devtools-widget>
652
+ ${widget(CPUThrottlingSelector, {recommendedOption: recs.cpuOption})}
654
653
  </div>
655
654
  <div class="environment-option">
656
655
  <devtools-network-throttling-selector .recommendedConditions=${recs.networkConditions}></devtools-network-throttling-selector>
@@ -1003,8 +1002,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
1003
1002
  : nothing}
1004
1003
  </span>
1005
1004
  <span class="interaction-node">
1006
- <devtools-widget .widgetConfig=${widgetConfig(PanelsCommon.DOMLinkifier.DOMNodeLink, {node: interaction.nodeRef})}>
1007
- </devtools-widget>
1005
+ ${widget(PanelsCommon.DOMLinkifier.DOMNodeLink, {node: interaction.nodeRef})}
1008
1006
  </span>
1009
1007
  ${isP98Excluded ? html`<devtools-icon
1010
1008
  class="interaction-info"
@@ -1113,8 +1111,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
1113
1111
  <div class="layout-shift-nodes">
1114
1112
  ${layoutShift.affectedNodeRefs.map(node => html`
1115
1113
  <div class="layout-shift-node">
1116
- <devtools-widget .widgetConfig=${widgetConfig(PanelsCommon.DOMLinkifier.DOMNodeLink, {node})}>
1117
- </devtools-widget>
1114
+ ${widget(PanelsCommon.DOMLinkifier.DOMNodeLink, {node})}
1118
1115
  </div>
1119
1116
  `)}
1120
1117
  </div>
@@ -17,7 +17,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
17
17
  const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.Cache;
18
18
 
19
19
  const {html} = Lit;
20
- const {widgetConfig} = UI.Widget;
20
+ const {widget} = UI.Widget;
21
21
 
22
22
  export class Cache extends BaseInsightComponent<CacheInsightModel> {
23
23
  override internalName = 'cache';
@@ -58,15 +58,13 @@ export class Cache extends BaseInsightComponent<CacheInsightModel> {
58
58
  // clang-format off
59
59
  return html`
60
60
  <div class="insight-section">
61
- <devtools-widget
62
- .widgetConfig=${widgetConfig(Table, {
63
- data: {
64
- insight: this,
65
- headers: [i18nString(UIStrings.requestColumn), i18nString(UIStrings.cacheTTL)],
66
- rows,
67
- },
68
- })}>
69
- </devtools-widget>
61
+ ${widget(Table, {
62
+ data: {
63
+ insight: this,
64
+ headers: [i18nString(UIStrings.requestColumn), i18nString(UIStrings.cacheTTL)],
65
+ rows,
66
+ },
67
+ })}
70
68
  </div>`;
71
69
  // clang-format on
72
70
  }
@@ -0,0 +1,38 @@
1
+ // Copyright 2026 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import type {CharacterSetInsightModel} from '../../../../models/trace/insights/CharacterSet.js';
6
+ import type * as Trace from '../../../../models/trace/trace.js';
7
+ import * as UI from '../../../../ui/legacy/legacy.js';
8
+ import * as Lit from '../../../../ui/lit/lit.js';
9
+
10
+ import {BaseInsightComponent} from './BaseInsightComponent.js';
11
+ import {Checklist} from './Checklist.js';
12
+
13
+ const {html} = Lit;
14
+ const {widgetConfig} = UI.Widget;
15
+
16
+ export class CharacterSet extends BaseInsightComponent<CharacterSetInsightModel> {
17
+ override internalName = 'character-set';
18
+
19
+ protected override hasAskAiSupport(): boolean {
20
+ return true;
21
+ }
22
+
23
+ override getEstimatedSavingsTime(): Trace.Types.Timing.Milli|null {
24
+ return this.model?.metricSavings?.FCP ?? null;
25
+ }
26
+
27
+ override renderContent(): Lit.LitTemplate {
28
+ if (!this.model?.data) {
29
+ return Lit.nothing;
30
+ }
31
+
32
+ // clang-format off
33
+ return html`<devtools-widget .widgetConfig=${widgetConfig(Checklist, {
34
+ checklist: this.model.data.checklist,
35
+ })}></devtools-widget>`;
36
+ // clang-format on
37
+ }
38
+ }
@@ -20,7 +20,7 @@ import {Table, type TableDataRow} from './Table.js';
20
20
  const {UIStrings, i18nString} = Trace.Insights.Models.DOMSize;
21
21
 
22
22
  const {html} = Lit;
23
- const {widgetConfig} = UI.Widget;
23
+ const {widget} = UI.Widget;
24
24
 
25
25
  export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
26
26
  override internalName = 'dom-size';
@@ -58,13 +58,12 @@ export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
58
58
 
59
59
  // clang-format off
60
60
  return html`<div class="insight-section">
61
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
61
+ ${widget(Table, {
62
62
  data: {
63
63
  insight: this,
64
64
  headers: [i18nString(UIStrings.statistic), i18nString(UIStrings.element)],
65
65
  rows,
66
- }})}>
67
- </devtools-widget>
66
+ }})}
68
67
  </div>`;
69
68
  // clang-format on
70
69
  }
@@ -88,13 +87,12 @@ export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
88
87
  // clang-format off
89
88
  return html`<div class="insight-section">
90
89
  <div class="insight-description">${md(i18nString(UIStrings.topUpdatesDescription))}</div>
91
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
90
+ ${widget(Table, {
92
91
  data: {
93
92
  insight: this,
94
93
  headers: ['', i18nString(UIStrings.duration)],
95
94
  rows,
96
- }})}>
97
- </devtools-widget>
95
+ }})}
98
96
  </div>`;
99
97
  // clang-format on
100
98
  }
@@ -111,19 +109,17 @@ export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
111
109
 
112
110
  // clang-format off
113
111
  return html`<div class="insight-section">
114
- <devtools-widget
115
- .widgetConfig=${widgetConfig(Table, {
116
- data: {
117
- insight: this,
118
- headers: [i18nString(UIStrings.statistic), i18nString(UIStrings.value)],
119
- rows: [
120
- {values: [i18nString(UIStrings.totalElements), domStatsData.totalElements]},
121
- {values: [i18nString(UIStrings.maxDOMDepth), domStatsData.maxDepth?.depth ?? 0]},
122
- {values: [i18nString(UIStrings.maxChildren), domStatsData.maxChildren?.numChildren ?? 0]},
123
- ],
124
- },
125
- })}>
126
- </devtools-widget>
112
+ ${widget(Table, {
113
+ data: {
114
+ insight: this,
115
+ headers: [i18nString(UIStrings.statistic), i18nString(UIStrings.value)],
116
+ rows: [
117
+ {values: [i18nString(UIStrings.totalElements), domStatsData.totalElements]},
118
+ {values: [i18nString(UIStrings.maxDOMDepth), domStatsData.maxDepth?.depth ?? 0]},
119
+ {values: [i18nString(UIStrings.maxChildren), domStatsData.maxChildren?.numChildren ?? 0]},
120
+ ],
121
+ },
122
+ })}>
127
123
  </div>
128
124
  ${this.#renderNodeTable(domStatsData)}
129
125
  ${this.#renderLargeUpdatesTable()}
@@ -11,7 +11,7 @@ import {BaseInsightComponent} from './BaseInsightComponent.js';
11
11
  import {Checklist} from './Checklist.js';
12
12
 
13
13
  const {html} = Lit;
14
- const {widgetConfig} = UI.Widget;
14
+ const {widget} = UI.Widget;
15
15
 
16
16
  export class DocumentLatency extends BaseInsightComponent<DocumentLatencyInsightModel> {
17
17
  override internalName = 'document-latency';
@@ -29,10 +29,6 @@ export class DocumentLatency extends BaseInsightComponent<DocumentLatencyInsight
29
29
  return Lit.nothing;
30
30
  }
31
31
 
32
- // clang-format off
33
- return html`<devtools-widget .widgetConfig=${widgetConfig(Checklist, {
34
- checklist: this.model.data.checklist,
35
- })}></devtools-widget>`;
36
- // clang-format on
32
+ return html`${widget(Checklist, {checklist: this.model.data.checklist})}`;
37
33
  }
38
34
  }
@@ -18,7 +18,7 @@ import {Table, type TableDataRow} from './Table.js';
18
18
  const {UIStrings, i18nString} = Trace.Insights.Models.DuplicatedJavaScript;
19
19
 
20
20
  const {html} = Lit;
21
- const {widgetConfig} = UI.Widget;
21
+ const {widget} = UI.Widget;
22
22
 
23
23
  export class DuplicatedJavaScript extends BaseInsightComponent<DuplicatedJavaScriptInsightModel> {
24
24
  override internalName = 'duplicated-javascript';
@@ -105,13 +105,12 @@ export class DuplicatedJavaScript extends BaseInsightComponent<DuplicatedJavaScr
105
105
  return html`
106
106
  ${treemapButton}
107
107
  <div class="insight-section">
108
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
108
+ ${widget(Table, {
109
109
  data: {
110
110
  insight: this,
111
111
  headers: [i18nString(UIStrings.columnSource), i18nString(UIStrings.columnDuplicatedBytes)],
112
112
  rows,
113
- }})}>
114
- </devtools-widget>
113
+ }})}
115
114
  </div>
116
115
  `;
117
116
  // clang-format on
@@ -17,7 +17,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
17
17
  const {UIStrings, i18nString} = Trace.Insights.Models.FontDisplay;
18
18
 
19
19
  const {html} = Lit;
20
- const {widgetConfig} = UI.Widget;
20
+ const {widget} = UI.Widget;
21
21
 
22
22
  export class FontDisplay extends BaseInsightComponent<FontDisplayInsightModel> {
23
23
  override internalName = 'font-display';
@@ -78,13 +78,12 @@ export class FontDisplay extends BaseInsightComponent<FontDisplayInsightModel> {
78
78
  // clang-format off
79
79
  return html`
80
80
  <div class="insight-section">
81
- ${html`<devtools-widget .widgetConfig=${widgetConfig(Table, {
81
+ ${widget(Table, {
82
82
  data: {
83
83
  insight: this,
84
84
  headers: [i18nString(UIStrings.fontColumn), i18nString(UIStrings.wastedTimeColumn)],
85
85
  rows,
86
- }})}>
87
- </devtools-widget>`}
86
+ }})}
88
87
  </div>`;
89
88
  // clang-format on
90
89
  }
@@ -18,7 +18,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
18
18
  const {UIStrings, i18nString, createOverlayForEvents} = Trace.Insights.Models.ForcedReflow;
19
19
 
20
20
  const {html, nothing} = Lit;
21
- const {widgetConfig} = UI.Widget;
21
+ const {widget} = UI.Widget;
22
22
 
23
23
  export class ForcedReflow extends BaseInsightComponent<ForcedReflowInsightModel> {
24
24
  override internalName = 'forced-reflow';
@@ -87,7 +87,7 @@ export class ForcedReflow extends BaseInsightComponent<ForcedReflowInsightModel>
87
87
  return html`
88
88
  ${topLevelFunctionCallData ? html`
89
89
  <div class="insight-section">
90
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
90
+ ${widget(Table, {
91
91
  data: {
92
92
  insight: this,
93
93
  headers: [i18nString(UIStrings.topTimeConsumingFunctionCall), i18nString(UIStrings.totalReflowTime)],
@@ -98,18 +98,16 @@ export class ForcedReflow extends BaseInsightComponent<ForcedReflowInsightModel>
98
98
  ],
99
99
  overlays: createOverlayForEvents(topLevelFunctionCallData.topLevelFunctionCallEvents, 'INFO'),
100
100
  }],
101
- }})}>
102
- </devtools-widget>
101
+ }})}
103
102
  </div>
104
103
  ` : nothing}
105
104
  <div class="insight-section">
106
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
105
+ ${widget(Table, {
107
106
  data: {
108
107
  insight: this,
109
108
  headers: [i18nString(UIStrings.reflowCallFrames)],
110
109
  rows,
111
- }})}>
112
- </devtools-widget>
110
+ }})}
113
111
  </div>`;
114
112
  // clang-format on
115
113
  }
@@ -15,7 +15,7 @@ import {Table} from './Table.js';
15
15
  const {UIStrings, i18nString, createOverlaysForSubpart} = Trace.Insights.Models.INPBreakdown;
16
16
 
17
17
  const {html} = Lit;
18
- const {widgetConfig} = UI.Widget;
18
+ const {widget} = UI.Widget;
19
19
 
20
20
  export class INPBreakdown extends BaseInsightComponent<INPBreakdownInsightModel> {
21
21
  override internalName = 'inp';
@@ -36,7 +36,7 @@ export class INPBreakdown extends BaseInsightComponent<INPBreakdownInsightModel>
36
36
  // clang-format off
37
37
  return html`
38
38
  <div class="insight-section">
39
- ${html`<devtools-widget .widgetConfig=${widgetConfig(Table, {
39
+ ${widget(Table, {
40
40
  data: {
41
41
  insight: this,
42
42
  headers: [i18nString(UIStrings.subpart), i18nString(UIStrings.duration)],
@@ -54,8 +54,7 @@ export class INPBreakdown extends BaseInsightComponent<INPBreakdownInsightModel>
54
54
  overlays: createOverlaysForSubpart(event, 2),
55
55
  },
56
56
  ],
57
- }})}>
58
- </devtools-widget>`}
57
+ }})}
59
58
  </div>`;
60
59
  // clang-format on
61
60
  }
@@ -16,7 +16,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
16
16
  const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.ImageDelivery;
17
17
 
18
18
  const {html} = Lit;
19
- const {widgetConfig} = UI.Widget;
19
+ const {widget} = UI.Widget;
20
20
 
21
21
  export class ImageDelivery extends BaseInsightComponent<ImageDeliveryInsightModel> {
22
22
  override internalName = 'image-delivery';
@@ -58,13 +58,12 @@ export class ImageDelivery extends BaseInsightComponent<ImageDeliveryInsightMode
58
58
  // clang-format off
59
59
  return html`
60
60
  <div class="insight-section">
61
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
61
+ ${widget(Table, {
62
62
  data: {
63
63
  insight: this,
64
64
  headers: [i18nString(UIStrings.optimizeFile)],
65
65
  rows,
66
- }})}>
67
- </devtools-widget>
66
+ }})}
68
67
  </div>
69
68
  `;
70
69
  // clang-format on
@@ -13,7 +13,7 @@ import baseInsightComponentStyles from './baseInsightComponent.css.js';
13
13
  import {eventRef} from './EventRef.js';
14
14
 
15
15
  const {html} = Lit;
16
- const {widgetConfig} = UI.Widget;
16
+ const {widget} = UI.Widget;
17
17
 
18
18
  interface ViewInput {
19
19
  request: Trace.Types.Events.SyntheticNetworkRequest;
@@ -106,7 +106,5 @@ class ImageRef extends UI.Widget.Widget {
106
106
  }
107
107
 
108
108
  export function imageRef(request: Trace.Types.Events.SyntheticNetworkRequest): Lit.TemplateResult {
109
- return html`<devtools-widget .widgetConfig=${widgetConfig(ImageRef, {
110
- request,
111
- })}></devtools-widget>`;
109
+ return html`${widget(ImageRef, {request})}`;
112
110
  }
@@ -7,6 +7,7 @@ import * as UI from '../../../../ui/legacy/legacy.js';
7
7
 
8
8
  import type {BaseInsightComponent} from './BaseInsightComponent.js';
9
9
  import {Cache} from './Cache.js';
10
+ import {CharacterSet} from './CharacterSet.js';
10
11
  import {CLSCulprits} from './CLSCulprits.js';
11
12
  import {DocumentLatency} from './DocumentLatency.js';
12
13
  import {DOMSize} from './DOMSize.js';
@@ -36,6 +37,7 @@ type InsightWidgetElement = UI.Widget.WidgetElement<BaseInsightComponent<Trace.I
36
37
  */
37
38
  const INSIGHT_NAME_TO_COMPONENT = {
38
39
  Cache,
40
+ CharacterSet,
39
41
  CLSCulprits,
40
42
  DocumentLatency,
41
43
  DOMSize,
@@ -15,7 +15,7 @@ import {Table, type TableDataRow} from './Table.js';
15
15
  const {UIStrings, i18nString} = Trace.Insights.Models.LCPBreakdown;
16
16
 
17
17
  const {html} = Lit;
18
- const {widgetConfig} = UI.Widget;
18
+ const {widget} = UI.Widget;
19
19
 
20
20
  export class LCPBreakdown extends BaseInsightComponent<LCPBreakdownInsightModel> {
21
21
  override internalName = 'lcp-by-phase';
@@ -69,13 +69,12 @@ export class LCPBreakdown extends BaseInsightComponent<LCPBreakdownInsightModel>
69
69
  // clang-format off
70
70
  return html`
71
71
  <div class="insight-section">
72
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
72
+ ${widget(Table, {
73
73
  data: {
74
74
  insight: this,
75
75
  headers: [i18nString(UIStrings.subpart), i18nString(UIStrings.fieldDuration)],
76
76
  rows,
77
- }})}>
78
- </devtools-widget>
77
+ }})}
79
78
  </div>
80
79
  `;
81
80
  // clang-format on
@@ -116,13 +115,12 @@ export class LCPBreakdown extends BaseInsightComponent<LCPBreakdownInsightModel>
116
115
  // clang-format off
117
116
  const sections: Lit.LitTemplate[] = [html`
118
117
  <div class="insight-section">
119
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
118
+ ${widget(Table, {
120
119
  data: {
121
120
  insight: this,
122
121
  headers: [i18nString(UIStrings.subpart), i18nString(UIStrings.duration)],
123
122
  rows,
124
- }})}>
125
- </devtools-widget>
123
+ }})}
126
124
  </div>`
127
125
  ];
128
126
  // clang-format on
@@ -13,7 +13,7 @@ import {BaseInsightComponent} from './BaseInsightComponent.js';
13
13
  import {Checklist} from './Checklist.js';
14
14
  import {imageRef} from './ImageRef.js';
15
15
 
16
- const {widgetConfig} = UI.Widget;
16
+ const {widget} = UI.Widget;
17
17
 
18
18
  const {UIStrings, i18nString, getImageData} = Trace.Insights.Models.LCPDiscovery;
19
19
 
@@ -91,9 +91,7 @@ export class LCPDiscovery extends BaseInsightComponent<LCPDiscoveryInsightModel>
91
91
  // clang-format off
92
92
  return html`
93
93
  <div class="insight-section">
94
- <devtools-widget .widgetConfig=${widgetConfig(Checklist, {
95
- checklist: imageData.checklist,
96
- })}></devtools-widget>
94
+ ${widget(Checklist, {checklist: imageData.checklist})}
97
95
  <div class="insight-section">${imageRef(imageData.request)}${delayEl}</div>
98
96
  </div>`;
99
97
  // clang-format on
@@ -19,7 +19,7 @@ import {Table, type TableDataRow} from './Table.js';
19
19
  const {UIStrings, i18nString} = Trace.Insights.Models.LegacyJavaScript;
20
20
 
21
21
  const {html} = Lit;
22
- const {widgetConfig} = UI.Widget;
22
+ const {widget} = UI.Widget;
23
23
 
24
24
  export class LegacyJavaScript extends BaseInsightComponent<LegacyJavaScriptInsightModel> {
25
25
  override internalName = 'legacy-javascript';
@@ -85,13 +85,12 @@ export class LegacyJavaScript extends BaseInsightComponent<LegacyJavaScriptInsig
85
85
  // clang-format off
86
86
  return html`
87
87
  <div class="insight-section">
88
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
88
+ ${widget(Table, {
89
89
  data: {
90
90
  insight: this,
91
91
  headers: [i18nString(UIStrings.columnScript), i18nString(UIStrings.columnWastedBytes)],
92
92
  rows,
93
- }})}>
94
- </devtools-widget>
93
+ }})}
95
94
  </div>
96
95
  `;
97
96
  // clang-format on
@@ -16,7 +16,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
16
16
  const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.ModernHTTP;
17
17
 
18
18
  const {html} = Lit;
19
- const {widgetConfig} = UI.Widget;
19
+ const {widget} = UI.Widget;
20
20
 
21
21
  export class ModernHTTP extends BaseInsightComponent<ModernHTTPInsightModel> {
22
22
  override internalName = 'modern-http';
@@ -58,13 +58,12 @@ export class ModernHTTP extends BaseInsightComponent<ModernHTTPInsightModel> {
58
58
  // clang-format off
59
59
  return html`
60
60
  <div class="insight-section">
61
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
61
+ ${widget(Table, {
62
62
  data: {
63
63
  insight: this,
64
64
  headers: [i18nString(UIStrings.request), i18nString(UIStrings.protocol)],
65
65
  rows,
66
- }})}>
67
- </devtools-widget>
66
+ }})}
68
67
  </div>`;
69
68
  // clang-format on
70
69
  }
@@ -23,7 +23,7 @@ import {renderOthersLabel, Table, type TableDataRow} from './Table.js';
23
23
  const {UIStrings, i18nString} = Trace.Insights.Models.NetworkDependencyTree;
24
24
 
25
25
  const {html} = Lit;
26
- const {widgetConfig} = UI.Widget;
26
+ const {widget} = UI.Widget;
27
27
 
28
28
  export const MAX_CHAINS_TO_SHOW = 5;
29
29
 
@@ -117,14 +117,12 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
117
117
 
118
118
  // clang-format off
119
119
  return html`
120
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
120
+ ${widget(Table, {
121
121
  data: {
122
122
  insight: this,
123
123
  headers: [i18nString(UIStrings.columnRequest), i18nString(UIStrings.columnTime)],
124
124
  rows,
125
- }})}>
126
- </devtools-widget>
127
- `;
125
+ }})}`;
128
126
  // clang-format on
129
127
  }
130
128
 
@@ -242,13 +240,12 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
242
240
  <div class="insight-section">
243
241
  ${preconnectOriginsTableTitle}
244
242
  ${this.#renderTooManyPreconnectsWarning()}
245
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
243
+ ${widget(Table, {
246
244
  data: {
247
245
  insight: this,
248
246
  headers: [i18nString(UIStrings.columnOrigin), i18nString(UIStrings.columnSource)],
249
247
  rows,
250
- }})}>
251
- </devtools-widget>
248
+ }})}
252
249
  </div>
253
250
  `;
254
251
  // clang-format on
@@ -285,13 +282,12 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
285
282
  return html`
286
283
  <div class="insight-section">
287
284
  ${estSavingTableTitle}
288
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
285
+ ${widget(Table, {
289
286
  data: {
290
287
  insight: this,
291
288
  headers: [i18nString(UIStrings.columnOrigin), i18nString(UIStrings.columnWastedMs)],
292
289
  rows,
293
- }})}>
294
- </devtools-widget>
290
+ }})}
295
291
  </div>
296
292
  `;
297
293
  // clang-format on
@@ -12,7 +12,7 @@ import * as Lit from '../../../../ui/lit/lit.js';
12
12
  import * as PanelsCommon from '../../../common/common.js';
13
13
 
14
14
  const {html} = Lit;
15
- const {widgetConfig} = UI.Widget;
15
+ const {widget} = UI.Widget;
16
16
 
17
17
  interface ViewInput {
18
18
  relatedNodeEl: Node|undefined;
@@ -157,7 +157,5 @@ export class NodeLink extends UI.Widget.Widget {
157
157
  }
158
158
 
159
159
  export function nodeLink(data: NodeLinkData): Lit.TemplateResult {
160
- return html`<devtools-widget .widgetConfig=${widgetConfig(NodeLink, {
161
- data,
162
- })}></devtools-widget>`;
160
+ return html`${widget(NodeLink, {data})}`;
163
161
  }
@@ -15,7 +15,7 @@ import {createLimitedRows, renderOthersLabel, Table, type TableDataRow} from './
15
15
  const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.RenderBlocking;
16
16
 
17
17
  const {html} = Lit;
18
- const {widgetConfig} = UI.Widget;
18
+ const {widget} = UI.Widget;
19
19
 
20
20
  export class RenderBlocking extends BaseInsightComponent<RenderBlockingInsightModel> {
21
21
  override internalName = 'render-blocking-requests';
@@ -60,13 +60,12 @@ export class RenderBlocking extends BaseInsightComponent<RenderBlockingInsightMo
60
60
  // clang-format off
61
61
  return html`
62
62
  <div class="insight-section">
63
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
63
+ ${widget(Table, {
64
64
  data: {
65
65
  insight: this,
66
66
  headers: [i18nString(UIStrings.renderBlockingRequest), i18nString(UIStrings.duration)],
67
67
  rows,
68
- }})}>
69
- </devtools-widget>
68
+ }})}
70
69
  </div>
71
70
  `;
72
71
  // clang-format on