Skip to content

Commit 862f232

Browse files
Adam RaineDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Always show insights tab in the sidebar
Justification: - It's not super clear that disabling the insights tab means all the insights are passing. - The information in passed insights can be somewhat useful - If there aren't any insights then there probably isn't anything worth annotating either. - Auto switching to annotations tab makes annotations the default tab for the next trace loaded, which could have useful insights. This does not affect the behavior of RPP when dealing with the brief pre-navigation period before record and reload runs. This <50ms period will still be excluded from the insight set entirely. Bug: None Change-Id: Ic224b5048446b84b6cbe76d2512607c33614c5a3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6220265 Auto-Submit: Adam Raine <[email protected]> Commit-Queue: Connor Clark <[email protected]> Commit-Queue: Adam Raine <[email protected]> Reviewed-by: Connor Clark <[email protected]>
1 parent daca806 commit 862f232

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,18 +1982,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
19821982
}
19831983
this.statusPane?.updateProgressBar(i18nString(UIStrings.processed), 70);
19841984

1985-
let traceInsightsSets = this.#traceEngineModel.traceInsights(traceIndex);
1986-
if (traceInsightsSets) {
1987-
// Omit insight sets that don't have anything of interest to show to the user.
1988-
const filteredTraceInsightsSets = new Map();
1989-
for (const [key, insightSet] of traceInsightsSets) {
1990-
if (Object.values(insightSet.model).some(model => model.shouldShow)) {
1991-
filteredTraceInsightsSets.set(key, insightSet);
1992-
}
1993-
}
1994-
1995-
traceInsightsSets = filteredTraceInsightsSets.size ? filteredTraceInsightsSets : null;
1996-
}
1985+
const traceInsightsSets = this.#traceEngineModel.traceInsights(traceIndex);
19971986
this.flameChart.setInsights(traceInsightsSets, this.#eventToRelatedInsights);
19981987

19991988
this.flameChart.setModel(parsedTrace, traceMetadata);

front_end/panels/timeline/components/Sidebar.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ export class SidebarWidget extends UI.Widget.VBox {
8888
// Swap to the Annotations tab if:
8989
// 1. Insights is currently selected.
9090
// 2. The Insights tab is disabled (which means we have no insights for this trace)
91-
// 3. The annotations tab exists (we can remove this check once annotations
92-
// are non-experimental)
9391
if (this.#tabbedPane.selectedTabId === SidebarTabs.INSIGHTS &&
94-
this.#tabbedPane.tabIsDisabled(SidebarTabs.INSIGHTS) && this.#tabbedPane.hasTab(SidebarTabs.ANNOTATIONS)) {
92+
this.#tabbedPane.tabIsDisabled(SidebarTabs.INSIGHTS)) {
9593
this.#tabbedPane.selectTab(SidebarTabs.ANNOTATIONS);
9694
}
9795
}
-35.3 KB
Loading

0 commit comments

Comments
 (0)