chrome-devtools-frontend 1.0.1596535 → 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 (101) hide show
  1. package/agents/prompts/ui-widgets.md +7 -8
  2. package/docs/ui_engineering.md +10 -11
  3. package/front_end/core/host/AidaClient.ts +4 -0
  4. package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
  5. package/front_end/core/host/UserMetrics.ts +12 -0
  6. package/front_end/core/root/Runtime.ts +5 -0
  7. package/front_end/core/sdk/CPUThrottlingManager.ts +14 -13
  8. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
  9. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +28 -0
  10. package/front_end/core/sdk/PageResourceLoader.ts +22 -1
  11. package/front_end/devtools_compatibility.js +2 -1
  12. package/front_end/models/ai_assistance/AiConversation.ts +29 -8
  13. package/front_end/models/ai_assistance/ChangeManager.ts +16 -0
  14. package/front_end/models/ai_assistance/ExtensionScope.ts +11 -3
  15. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +127 -0
  16. package/front_end/models/ai_assistance/agents/AiAgent.ts +26 -3
  17. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +1 -1
  18. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +11 -8
  19. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +24 -0
  20. package/front_end/models/ai_assistance/agents/StylingAgent.ts +323 -16
  21. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  22. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +27 -0
  23. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +21 -0
  24. package/front_end/models/greendev/Prototypes.ts +7 -1
  25. package/front_end/models/trace/Processor.ts +1 -0
  26. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +33 -0
  27. package/front_end/models/trace/insights/CharacterSet.ts +172 -0
  28. package/front_end/models/trace/insights/Models.ts +1 -0
  29. package/front_end/models/trace/insights/types.ts +1 -0
  30. package/front_end/models/trace/types/TraceEvents.ts +17 -0
  31. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +51 -36
  32. package/front_end/panels/ai_assistance/PatchWidget.ts +6 -6
  33. package/front_end/panels/ai_assistance/components/ChatMessage.ts +93 -74
  34. package/front_end/panels/ai_assistance/components/ChatView.ts +6 -11
  35. package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +18 -9
  36. package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +200 -0
  37. package/front_end/panels/ai_assistance/components/chatMessage.css +11 -8
  38. package/front_end/panels/application/AppManifestView.ts +3 -4
  39. package/front_end/panels/application/DeviceBoundSessionsView.ts +18 -22
  40. package/front_end/panels/application/FrameDetailsView.ts +9 -15
  41. package/front_end/panels/application/OriginTrialTreeView.ts +2 -3
  42. package/front_end/panels/application/ReportingApiView.ts +13 -17
  43. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  44. package/front_end/panels/application/components/BackForwardCacheView.ts +3 -3
  45. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -3
  46. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
  47. package/front_end/panels/changes/ChangesView.ts +6 -4
  48. package/front_end/panels/common/ExtensionServer.ts +15 -0
  49. package/front_end/panels/console/ConsolePinPane.ts +3 -3
  50. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  51. package/front_end/panels/css_overview/CSSOverviewPanel.ts +11 -15
  52. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -5
  53. package/front_end/panels/elements/ElementsTreeElement.ts +55 -47
  54. package/front_end/panels/elements/ElementsTreeOutline.ts +149 -28
  55. package/front_end/panels/elements/EventListenersWidget.ts +3 -2
  56. package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -6
  57. package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -4
  58. package/front_end/panels/layer_viewer/Layers3DView.ts +5 -4
  59. package/front_end/panels/lighthouse/LighthousePanel.ts +8 -0
  60. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +5 -6
  61. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +6 -11
  62. package/front_end/panels/network/RequestCookiesView.ts +3 -4
  63. package/front_end/panels/network/RequestInitiatorView.ts +7 -5
  64. package/front_end/panels/network/RequestResponseView.ts +10 -15
  65. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -4
  66. package/front_end/panels/recorder/components/RecordingView.ts +31 -36
  67. package/front_end/panels/recorder/components/StepEditor.ts +6 -7
  68. package/front_end/panels/search/SearchView.ts +2 -3
  69. package/front_end/panels/settings/SettingsScreen.ts +3 -2
  70. package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -5
  71. package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -8
  72. package/front_end/panels/timeline/components/insights/Cache.ts +8 -10
  73. package/front_end/panels/timeline/components/insights/CharacterSet.ts +38 -0
  74. package/front_end/panels/timeline/components/insights/DOMSize.ts +16 -20
  75. package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -6
  76. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +3 -4
  77. package/front_end/panels/timeline/components/insights/FontDisplay.ts +3 -4
  78. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +5 -7
  79. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +3 -4
  80. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +3 -4
  81. package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -4
  82. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +2 -0
  83. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +5 -7
  84. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -4
  85. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +3 -4
  86. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +3 -4
  87. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +7 -11
  88. package/front_end/panels/timeline/components/insights/NodeLink.ts +2 -4
  89. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +3 -4
  90. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +7 -10
  91. package/front_end/panels/timeline/components/insights/ThirdParties.ts +5 -7
  92. package/front_end/panels/timeline/components/insights/insights.ts +2 -0
  93. package/front_end/panels/web_audio/WebAudioView.ts +3 -4
  94. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -0
  95. package/front_end/ui/legacy/UIUtils.ts +5 -5
  96. package/front_end/ui/legacy/Widget.ts +33 -2
  97. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
  98. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -8
  99. package/front_end/ui/visual_logging/Debugging.ts +0 -32
  100. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  101. package/package.json +1 -1
@@ -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
@@ -20,7 +20,7 @@ import {Table} from './Table.js';
20
20
  const {UIStrings, i18nString} = Trace.Insights.Models.SlowCSSSelector;
21
21
 
22
22
  const {html} = Lit;
23
- const {widgetConfig} = UI.Widget;
23
+ const {widget} = UI.Widget;
24
24
 
25
25
  export class SlowCSSSelector extends BaseInsightComponent<SlowCSSSelectorInsightModel> {
26
26
  override internalName = 'slow-css-selector';
@@ -107,7 +107,7 @@ export class SlowCSSSelector extends BaseInsightComponent<SlowCSSSelectorInsight
107
107
  // clang-format off
108
108
  const sections = [html`
109
109
  <div class="insight-section">
110
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
110
+ ${widget(Table, {
111
111
  data: {
112
112
  insight: this,
113
113
  headers: [i18nString(UIStrings.total), ''],
@@ -116,8 +116,7 @@ export class SlowCSSSelector extends BaseInsightComponent<SlowCSSSelectorInsight
116
116
  {values: [i18nString(UIStrings.matchCount), this.model.totalMatchCount]},
117
117
  {values: [i18nString(UIStrings.elapsed), i18n.TimeUtilities.millisToString(this.model.totalElapsedMs)]},
118
118
  ],
119
- }})}>
120
- </devtools-widget>
119
+ }})}
121
120
  </div>
122
121
  `];
123
122
  // clang-format on
@@ -127,14 +126,13 @@ export class SlowCSSSelector extends BaseInsightComponent<SlowCSSSelectorInsight
127
126
  // clang-format off
128
127
  sections.push(html`
129
128
  <div class="insight-section">
130
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
129
+ ${widget(Table, {
131
130
  data: {
132
131
  insight: this,
133
132
  headers: [`${i18nString(UIStrings.topSelectorElapsedTime)}: ${time(Trace.Types.Timing.Micro(selector['elapsed (us)']))}`],
134
133
  rows: [{
135
134
  values: [html`${selector.selector} ${Lit.Directives.until(this.getSelectorLinks(cssModel, selector))}`]}]
136
- }})}>
137
- </devtools-widget>
135
+ }})}
138
136
  </div>
139
137
  `);
140
138
  // clang-format on
@@ -145,15 +143,14 @@ export class SlowCSSSelector extends BaseInsightComponent<SlowCSSSelectorInsight
145
143
  // clang-format off
146
144
  sections.push(html`
147
145
  <div class="insight-section">
148
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
146
+ ${widget(Table, {
149
147
  data: {
150
148
  insight: this,
151
149
  headers: [`${i18nString(UIStrings.topSelectorMatchAttempt)}: ${selector['match_attempts']}`],
152
150
  rows: [{
153
151
  values: [html`${selector.selector} ${Lit.Directives.until(this.getSelectorLinks(cssModel, selector))}` as unknown as string],
154
152
  }]
155
- }})}>
156
- </devtools-widget>
153
+ }})}
157
154
  </div>
158
155
  `);
159
156
  // clang-format on
@@ -14,7 +14,7 @@ import {createLimitedRows, renderOthersLabel, type RowLimitAggregator, Table} fr
14
14
  const {UIStrings, i18nString, createOverlaysForSummary} = Trace.Insights.Models.ThirdParties;
15
15
 
16
16
  const {html} = Lit;
17
- const {widgetConfig} = UI.Widget;
17
+ const {widget} = UI.Widget;
18
18
 
19
19
  const MAX_TO_SHOW = 5;
20
20
 
@@ -79,13 +79,12 @@ export class ThirdParties extends BaseInsightComponent<ThirdPartiesInsightModel>
79
79
  // clang-format off
80
80
  sections.push(html`
81
81
  <div class="insight-section">
82
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
82
+ ${widget(Table, {
83
83
  data: {
84
84
  insight: this,
85
85
  headers: [i18nString(UIStrings.columnThirdParty), i18nString(UIStrings.columnTransferSize)],
86
86
  rows,
87
- }})}>
88
- </devtools-widget>
87
+ }})}
89
88
  </div>
90
89
  `);
91
90
  // clang-format on
@@ -96,13 +95,12 @@ export class ThirdParties extends BaseInsightComponent<ThirdPartiesInsightModel>
96
95
  // clang-format off
97
96
  sections.push(html`
98
97
  <div class="insight-section">
99
- <devtools-widget .widgetConfig=${widgetConfig(Table, {
98
+ ${widget(Table, {
100
99
  data: {
101
100
  insight: this,
102
101
  headers: [i18nString(UIStrings.columnThirdParty), i18nString(UIStrings.columnMainThreadTime)],
103
102
  rows,
104
- }})}>
105
- </devtools-widget>
103
+ }})}
106
104
  </div>
107
105
  `);
108
106
  // clang-format on
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as BaseInsightComponent from './BaseInsightComponent.js';
6
6
  import * as Cache from './Cache.js';
7
+ import * as CharacterSet from './CharacterSet.js';
7
8
  import * as Checklist from './Checklist.js';
8
9
  import * as CLSCulprits from './CLSCulprits.js';
9
10
  import * as DocumentLatency from './DocumentLatency.js';
@@ -33,6 +34,7 @@ import * as Viewport from './Viewport.js';
33
34
  export {
34
35
  BaseInsightComponent,
35
36
  Cache,
37
+ CharacterSet,
36
38
  Checklist,
37
39
  CLSCulprits,
38
40
  DocumentLatency,