chrome-devtools-frontend 1.0.1724140 → 1.0.1726686
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/.agents/skills/review-ui-widgets/SKILL.md +7 -7
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +12 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -3
- package/.agents/skills/ui-widgets/SKILL.md +2 -1
- package/docs/cookbook/dependencies.md +6 -4
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +16 -0
- package/front_end/entrypoints/js_app/js_app.ts +2 -5
- package/front_end/entrypoints/node_app/node_app.ts +2 -3
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +2 -1
- package/front_end/models/ai_assistance/skills/network.md +1 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +26 -2
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -7
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +2 -2
- package/front_end/models/comment_manager/CommentManager.ts +0 -6
- package/front_end/models/comment_manager/CommentThread.ts +23 -19
- package/front_end/models/elements/StyleChanges.ts +66 -0
- package/front_end/models/trace/EventsSerializer.ts +2 -7
- package/front_end/models/trace/ModelImpl.ts +0 -2
- package/front_end/models/trace/handlers/FlowsHandler.ts +37 -29
- package/front_end/models/trace/helpers/SyntheticEvents.ts +10 -37
- package/front_end/models/trace/insights/RenderBlocking.ts +3 -1
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -0
- package/front_end/panels/accessibility/SourceOrderView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +90 -0
- package/front_end/panels/application/StorageView.ts +196 -174
- package/front_end/panels/application/SubAppsView.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +360 -336
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +6 -3
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +17 -17
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/application/preloading/preloadingView.css +12 -4
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +1 -1
- package/front_end/panels/application/storageView.css +16 -21
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +6 -8
- package/front_end/panels/comments/CommentsPane.ts +26 -9
- package/front_end/panels/comments/commentsPane.css +25 -6
- package/front_end/panels/common/CommentThreadWidget.ts +2 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +94 -35
- package/front_end/panels/common/commentThreadWidget.css +17 -0
- package/front_end/panels/common/commentsOverlay.css +5 -10
- package/front_end/panels/common/common-meta.ts +11 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +130 -88
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +7 -33
- package/front_end/panels/elements/DOMTreeWidget.ts +7 -3
- package/front_end/panels/elements/ElementStatePaneWidget.ts +11 -1
- package/front_end/panels/elements/PropertyRenderer.ts +3 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +60 -41
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +227 -162
- package/front_end/panels/event_listeners/EventListenersView.ts +11 -8
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +12 -5
- package/front_end/panels/profiler/HeapProfileView.ts +28 -6
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +7 -3
- package/front_end/panels/protocol_monitor/JSONEditor.ts +0 -1
- package/front_end/panels/recorder/RecorderPanel.ts +2 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +105 -45
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +8 -5
- package/front_end/panels/sources/SourcesNavigator.ts +421 -213
- package/front_end/panels/sources/SourcesPanel.ts +6 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -5
- package/front_end/panels/sources/sources-meta.ts +4 -15
- package/front_end/panels/sources/sourcesNavigator.css +5 -0
- package/front_end/panels/timeline/ModificationsManager.ts +0 -2
- package/front_end/panels/timeline/README.md +2 -0
- package/front_end/panels/timeline/TimelineCommentController.ts +132 -30
- package/front_end/panels/timeline/TimelinePanel.ts +4 -0
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +8 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +3 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -4
- package/front_end/ui/components/lists/List.ts +14 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +23 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +3 -0
- package/front_end/ui/legacy/Toolbar.ts +0 -1
- package/front_end/ui/legacy/Treeoutline.ts +7 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -1
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +19 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +20 -11
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +27 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -166,8 +166,8 @@ export class PreloadingDisabledInfobar extends UI.Widget.VBox {
|
|
|
166
166
|
#disabledByHoldbackPrefetchSpeculationRules = false;
|
|
167
167
|
#disabledByHoldbackPrerenderSpeculationRules = false;
|
|
168
168
|
|
|
169
|
-
constructor(view: View = DEFAULT_VIEW) {
|
|
170
|
-
super({useShadowDom: true});
|
|
169
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
170
|
+
super(element, {useShadowDom: true, classes: ['flex-none']});
|
|
171
171
|
this.#view = view;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -127,9 +127,9 @@ export class PreloadingGrid extends UI.Widget.VBox {
|
|
|
127
127
|
#pageURL?: Platform.DevToolsPath.UrlString;
|
|
128
128
|
#onSelect?: ({rowId}: {rowId: string}) => void;
|
|
129
129
|
|
|
130
|
-
constructor(
|
|
131
|
-
super();
|
|
132
|
-
this.#view = view
|
|
130
|
+
constructor(element?: HTMLElement, view: View = PRELOADING_GRID_DEFAULT_VIEW) {
|
|
131
|
+
super(element);
|
|
132
|
+
this.#view = view;
|
|
133
133
|
this.requestUpdate();
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -144,6 +144,9 @@ export class PreloadingGrid extends UI.Widget.VBox {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
set onSelect(onSelect: ({rowId}: {rowId: string}) => void) {
|
|
147
|
+
if (this.#onSelect === onSelect) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
147
150
|
this.#onSelect = onSelect;
|
|
148
151
|
this.requestUpdate();
|
|
149
152
|
}
|
|
@@ -169,17 +169,13 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/** Grid component to show SpeculationRules rule sets. **/
|
|
172
|
-
|
|
173
|
-
Common.ObjectWrapper.eventMixin(
|
|
174
|
-
UI.Widget.VBox,
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
export class RuleSetGrid extends RuleSetGridBase {
|
|
172
|
+
export class RuleSetGrid extends UI.Widget.VBox {
|
|
178
173
|
readonly #view: View;
|
|
179
174
|
#data: RuleSetGridData|null = null;
|
|
175
|
+
#onSelect: (ruleSetId: Protocol.Preload.RuleSetId) => void = () => {};
|
|
180
176
|
|
|
181
|
-
constructor(view: View = DEFAULT_VIEW) {
|
|
182
|
-
super({useShadowDom: true});
|
|
177
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
178
|
+
super(element, {useShadowDom: true});
|
|
183
179
|
this.#view = view;
|
|
184
180
|
}
|
|
185
181
|
|
|
@@ -192,10 +188,22 @@ export class RuleSetGrid extends RuleSetGridBase {
|
|
|
192
188
|
this.requestUpdate();
|
|
193
189
|
}
|
|
194
190
|
|
|
191
|
+
get onSelect(): (ruleSetId: Protocol.Preload.RuleSetId) => void {
|
|
192
|
+
return this.#onSelect;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
set onSelect(onSelect: (ruleSetId: Protocol.Preload.RuleSetId) => void) {
|
|
196
|
+
if (this.#onSelect === onSelect) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
this.#onSelect = onSelect;
|
|
200
|
+
this.requestUpdate();
|
|
201
|
+
}
|
|
202
|
+
|
|
195
203
|
override performUpdate(): void {
|
|
196
204
|
const input: ViewInput = {
|
|
197
205
|
data: this.#data,
|
|
198
|
-
onSelect: this
|
|
206
|
+
onSelect: this.#onSelect,
|
|
199
207
|
onRevealInElements: this.#revealSpeculationRulesInElements.bind(this),
|
|
200
208
|
onRevealInNetwork: this.#revealSpeculationRulesInNetwork.bind(this),
|
|
201
209
|
onRevealPreloadsAssociatedWithRuleSet: this.#revealAttemptViewWithFilter.bind(this),
|
|
@@ -235,11 +243,3 @@ export class RuleSetGrid extends RuleSetGridBase {
|
|
|
235
243
|
void Common.Revealer.reveal(new PreloadingHelper.PreloadingForward.AttemptViewWithFilter(ruleSet.id));
|
|
236
244
|
}
|
|
237
245
|
}
|
|
238
|
-
|
|
239
|
-
export const enum Events {
|
|
240
|
-
SELECT = 'select',
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export interface EventTypes {
|
|
244
|
-
[Events.SELECT]: Protocol.Preload.RuleSetId;
|
|
245
|
-
}
|
|
@@ -425,8 +425,8 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
425
425
|
export class UsedPreloadingView extends UI.Widget.VBox {
|
|
426
426
|
readonly #view: View;
|
|
427
427
|
|
|
428
|
-
constructor(view: View = DEFAULT_VIEW) {
|
|
429
|
-
super({useShadowDom: true});
|
|
428
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
429
|
+
super(element, {useShadowDom: true});
|
|
430
430
|
this.#view = view;
|
|
431
431
|
}
|
|
432
432
|
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
.empty-state {
|
|
7
|
+
:host > .widget > .empty-state {
|
|
8
8
|
display: none;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.empty {
|
|
12
|
-
.empty-state {
|
|
12
|
+
&.widget > .empty-state {
|
|
13
13
|
display: flex;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -26,13 +26,21 @@
|
|
|
26
26
|
margin: var(--sys-size-2) 0;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
devtools-toolbar-input {
|
|
30
30
|
max-width: var(--sys-size-29);
|
|
31
|
+
flex-grow: 1;
|
|
32
|
+
flex-shrink: 1;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
devtools-split-view {
|
|
35
|
-
|
|
37
|
+
[slot="main"],
|
|
38
|
+
[slot="sidebar"],
|
|
39
|
+
[slot="main"] > .vbox {
|
|
36
40
|
height: 100%;
|
|
37
41
|
}
|
|
38
42
|
}
|
|
43
|
+
|
|
44
|
+
.pretty-print-button {
|
|
45
|
+
border-top: var(--sys-size-1) solid var(--sys-color-divider);
|
|
46
|
+
}
|
|
@@ -4,14 +4,22 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
.report-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
.report-subtitle {
|
|
8
|
+
font: var(--sys-typescale-body4-regular);
|
|
9
|
+
padding: 0 var(--sys-size-9) var(--sys-size-7);
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
devtools-report .report-section {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-column: 1 / 3;
|
|
18
|
+
grid-template-columns: subgrid;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
devtools-report-section:has(.quota-override-error:empty) {
|
|
22
|
+
display: none;
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
.clear-site-data-checkboxes-row {
|
|
@@ -34,15 +42,6 @@
|
|
|
34
42
|
margin-top: var(--sys-size-7);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
|
-
.link {
|
|
38
|
-
margin-left: 10px;
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.report-row:hover .link {
|
|
43
|
-
display: inline;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
45
|
.quota-override-editor-with-button {
|
|
47
46
|
align-items: baseline;
|
|
48
47
|
display: flex;
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
min-width: fit-content;
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
:host {
|
|
81
80
|
overflow: auto;
|
|
82
81
|
}
|
|
83
82
|
|
|
@@ -87,10 +86,6 @@
|
|
|
87
86
|
--nested-checkbox-indent: var(--sys-size-11);
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
.report-content-box {
|
|
91
|
-
overflow: initial;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
89
|
.include-third-party-cookies-row {
|
|
95
90
|
margin-left: var(--nested-checkbox-indent);
|
|
96
91
|
|
|
@@ -224,7 +224,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
224
224
|
title=${getLocalizedCategory(category)}
|
|
225
225
|
?indeterminate=${breakpoints.some(breakpoint => !breakpoint.enabled()) &&
|
|
226
226
|
breakpoints.some(breakpoint => breakpoint.enabled())}
|
|
227
|
-
|
|
227
|
+
.checked=${!breakpoints.some(breakpoint => !breakpoint.enabled())}
|
|
228
228
|
@change=${(e: Event) => onCheckboxClicked(e, category)}
|
|
229
229
|
>${getLocalizedCategory(category)}</devtools-checkbox>
|
|
230
230
|
<ul role="group">
|
|
@@ -238,7 +238,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
238
238
|
class=${classes(breakpoint)}
|
|
239
239
|
tabIndex=-1
|
|
240
240
|
title=${Sources.CategorizedBreakpointL10n.getLocalizedBreakpointName(breakpoint.name)}
|
|
241
|
-
|
|
241
|
+
.checked=${breakpoint.enabled()}
|
|
242
242
|
aria-description=${breakpoint === input.highlightedItem ? i18nString(UIStrings.breakpointHit)
|
|
243
243
|
: Lit.nothing}
|
|
244
244
|
@change=${(e: Event) => onCheckboxClicked(e, breakpoint)}
|
|
@@ -204,10 +204,9 @@ UI.ViewManager.registerViewExtension({
|
|
|
204
204
|
commandPrompt: i18nLazyString(UIStrings.showPage),
|
|
205
205
|
order: 2,
|
|
206
206
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
207
|
-
async loadView(
|
|
207
|
+
async loadView() {
|
|
208
208
|
const Sources = await loadSourcesModule();
|
|
209
|
-
return Sources.SourcesNavigator.NetworkNavigatorView.instance(
|
|
210
|
-
{forceNew: null, networkProjectManager: universe.networkProjectManager});
|
|
209
|
+
return Sources.SourcesNavigator.NetworkNavigatorView.instance();
|
|
211
210
|
},
|
|
212
211
|
});
|
|
213
212
|
|
|
@@ -219,10 +218,9 @@ UI.ViewManager.registerViewExtension({
|
|
|
219
218
|
order: 4,
|
|
220
219
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
221
220
|
condition: () => !Root.Runtime.Runtime.isTraceApp(),
|
|
222
|
-
async loadView(
|
|
221
|
+
async loadView() {
|
|
223
222
|
const Sources = await loadSourcesModule();
|
|
224
|
-
return Sources.SourcesNavigator.OverridesNavigatorView.instance(
|
|
225
|
-
{forceNew: null, networkProjectManager: universe.networkProjectManager});
|
|
223
|
+
return Sources.SourcesNavigator.OverridesNavigatorView.instance();
|
|
226
224
|
},
|
|
227
225
|
});
|
|
228
226
|
|
|
@@ -234,9 +232,9 @@ UI.ViewManager.registerViewExtension({
|
|
|
234
232
|
order: 5,
|
|
235
233
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
236
234
|
condition: () => Root.Runtime.getPathName() !== '/bundled/worker_app.html' && !Root.Runtime.Runtime.isTraceApp(),
|
|
237
|
-
async loadView(
|
|
235
|
+
async loadView() {
|
|
238
236
|
const Sources = await loadSourcesModule();
|
|
239
|
-
return new Sources.SourcesNavigator.ContentScriptsNavigatorView(
|
|
237
|
+
return new Sources.SourcesNavigator.ContentScriptsNavigatorView();
|
|
240
238
|
},
|
|
241
239
|
});
|
|
242
240
|
|
|
@@ -58,6 +58,10 @@ const UIStrings = {
|
|
|
58
58
|
* @description Tab label for sent and resolved comments in the comments drawer.
|
|
59
59
|
*/
|
|
60
60
|
sent: 'Sent',
|
|
61
|
+
/**
|
|
62
|
+
* @description Label shown next to an element anchor in the comments drawer when the target DOM node has been removed or can no longer be found.
|
|
63
|
+
*/
|
|
64
|
+
removed: 'removed',
|
|
61
65
|
} as const;
|
|
62
66
|
|
|
63
67
|
const UIStringsNotTranslate = {
|
|
@@ -85,7 +89,10 @@ export interface ViewInput {
|
|
|
85
89
|
threads: ThreadViewData[];
|
|
86
90
|
onTabSelect: (tab: Tab) => void;
|
|
87
91
|
onClearAll: () => void;
|
|
88
|
-
onThreadClick: (
|
|
92
|
+
onThreadClick: (
|
|
93
|
+
thread: CommentManager.CommentManager.CommentThread,
|
|
94
|
+
fallbackPosition?: {left: number, top: number},
|
|
95
|
+
) => void;
|
|
89
96
|
onDeleteThread: (threadId: string) => void;
|
|
90
97
|
onSendToAgent: () => void;
|
|
91
98
|
}
|
|
@@ -148,6 +155,12 @@ function renderThreadStatus(
|
|
|
148
155
|
export const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
149
156
|
const isQueued = input.activeTab === 'queued';
|
|
150
157
|
const isSent = input.activeTab === 'sent';
|
|
158
|
+
const onThreadClick = (e: Event, thread: CommentManager.CommentManager.CommentThread): void => {
|
|
159
|
+
const rowEl = e.currentTarget as HTMLElement;
|
|
160
|
+
const rowRect = rowEl.getBoundingClientRect();
|
|
161
|
+
const badgeRect = rowEl.querySelector('.comment-pin-badge')?.getBoundingClientRect();
|
|
162
|
+
input.onThreadClick(thread, {left: badgeRect?.left ?? rowRect.left, top: rowRect.top});
|
|
163
|
+
};
|
|
151
164
|
// clang-format off
|
|
152
165
|
render(html`
|
|
153
166
|
<style>${commentsPaneStyles}</style>
|
|
@@ -192,22 +205,23 @@ export const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target:
|
|
|
192
205
|
item => item.thread.id,
|
|
193
206
|
item => html`
|
|
194
207
|
<li
|
|
195
|
-
class="comment-thread-item"
|
|
208
|
+
class="comment-thread-item ${item.thread.isOrphaned ? 'orphaned' : ''}"
|
|
196
209
|
role="listitem"
|
|
197
210
|
tabindex="0"
|
|
198
|
-
@click=${() =>
|
|
211
|
+
@click=${(e: Event) => onThreadClick(e, item.thread)}
|
|
199
212
|
@keydown=${(e: KeyboardEvent) => {
|
|
200
213
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
201
214
|
e.preventDefault();
|
|
202
|
-
|
|
215
|
+
onThreadClick(e, item.thread);
|
|
203
216
|
}
|
|
204
217
|
}}
|
|
205
218
|
jslog=${VisualLogging.item('comment-thread').track({ click: true })}>
|
|
206
|
-
<div class="comment-pin-badge"
|
|
207
|
-
<span class="anchor-chip">
|
|
219
|
+
<div class="comment-pin-badge" aria-hidden="true"></div>
|
|
220
|
+
<span class="anchor-chip ${item.thread.isOrphaned ? 'orphaned' : ''}">
|
|
208
221
|
${'node' in item.title ?
|
|
209
|
-
widget(CommonPanels.DOMLinkifier.DOMNodeLink, { node: item.title.node, options: { preventKeyboardFocus: true } }) :
|
|
222
|
+
widget(CommonPanels.DOMLinkifier.DOMNodeLink, { node: item.title.node, options: { preventKeyboardFocus: true, disabled: item.thread.isOrphaned } }) :
|
|
210
223
|
html`<span class="anchor-chip-text">${item.title.text}</span>`}
|
|
224
|
+
${item.thread.isOrphaned ? html`<span class="orphaned-label">(${i18nString(UIStrings.removed)})</span>` : Lit.nothing}
|
|
211
225
|
</span>
|
|
212
226
|
<div class="comment-text">${item.commentText}</div>
|
|
213
227
|
${renderThreadStatus(item.thread, input.onDeleteThread)}
|
|
@@ -311,8 +325,11 @@ export class CommentsPane extends UI.Widget.Widget {
|
|
|
311
325
|
this.requestUpdate();
|
|
312
326
|
};
|
|
313
327
|
|
|
314
|
-
#handleThreadClick = (
|
|
315
|
-
|
|
328
|
+
#handleThreadClick = (
|
|
329
|
+
thread: CommentManager.CommentManager.CommentThread,
|
|
330
|
+
position?: {left: number, top: number},
|
|
331
|
+
): void => {
|
|
332
|
+
void Common.Revealer.reveal(new CommentManager.CommentThread.RevealableThread(thread, position));
|
|
316
333
|
};
|
|
317
334
|
|
|
318
335
|
#handleDeleteThread = (threadId: string): void => {
|
|
@@ -123,20 +123,19 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.comment-pin-badge {
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
126
|
width: var(--sys-size-9);
|
|
130
127
|
height: var(--sys-size-9);
|
|
131
128
|
margin-right: var(--sys-size-2);
|
|
132
129
|
border-radius: var(--sys-shape-corner-full) var(--sys-shape-corner-full) var(--sys-shape-corner-full) var(--sys-shape-corner-extra-small);
|
|
133
130
|
background-color: var(--sys-color-primary);
|
|
134
|
-
color: var(--sys-color-on-primary);
|
|
135
|
-
font-size: var(--sys-typescale-body5-size);
|
|
136
|
-
font-weight: var(--ref-typeface-weight-bold);
|
|
137
131
|
flex-shrink: 0;
|
|
138
132
|
}
|
|
139
133
|
|
|
134
|
+
.comment-thread-item.orphaned .comment-pin-badge {
|
|
135
|
+
background-color: var(--sys-color-surface-variant);
|
|
136
|
+
color: var(--sys-color-on-surface-subtle);
|
|
137
|
+
}
|
|
138
|
+
|
|
140
139
|
.anchor-chip {
|
|
141
140
|
display: flex;
|
|
142
141
|
height: calc(var(--sys-size-8) + var(--sys-size-2));
|
|
@@ -155,6 +154,26 @@
|
|
|
155
154
|
pointer-events: none;
|
|
156
155
|
}
|
|
157
156
|
|
|
157
|
+
.anchor-chip.orphaned {
|
|
158
|
+
border-style: dashed;
|
|
159
|
+
border-color: var(--sys-color-neutral-outline);
|
|
160
|
+
background: transparent;
|
|
161
|
+
color: var(--sys-color-state-disabled);
|
|
162
|
+
gap: var(--sys-size-3);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.anchor-chip.orphaned .anchor-chip-text {
|
|
166
|
+
color: var(--sys-color-state-disabled);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.orphaned-label {
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
color: var(--sys-color-on-surface-subtle);
|
|
172
|
+
font-family: var(--default-font-family);
|
|
173
|
+
font-size: var(--sys-typescale-body5-size);
|
|
174
|
+
font-style: italic;
|
|
175
|
+
}
|
|
176
|
+
|
|
158
177
|
.anchor-chip devtools-widget,
|
|
159
178
|
.anchor-chip-text {
|
|
160
179
|
display: block;
|
|
@@ -231,7 +231,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
231
231
|
${buttonText}
|
|
232
232
|
</devtools-button>
|
|
233
233
|
</div>
|
|
234
|
-
` : html
|
|
234
|
+
` : html`<div class="thread-body">${input.comments.map(comment => comment.author === 'DEVELOPER' ? html`
|
|
235
235
|
<div class="comment-text"
|
|
236
236
|
@click=${() => {input.onSetEditMode(true);}}
|
|
237
237
|
>
|
|
@@ -248,7 +248,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
248
248
|
)}
|
|
249
249
|
</div>
|
|
250
250
|
</div>
|
|
251
|
-
`)}
|
|
251
|
+
`)}</div>
|
|
252
252
|
`}
|
|
253
253
|
</div>
|
|
254
254
|
`, target);
|