Skip to content

Commit 317b92f

Browse files
Adriana IxbaDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Expand entry track only when modifying trace window
This fixes the experience for a user hovering on insight tables where hovering after closing a track re-opens it. Bug: 398043732 Change-Id: Ief66a7caaec21489343c8d3539a1926a1cc51895 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6305885 Auto-Submit: Adriana Ixba <[email protected]> Reviewed-by: Adam Raine <[email protected]> Commit-Queue: Adam Raine <[email protected]> Reviewed-by: Connor Clark <[email protected]>
1 parent 1670340 commit 317b92f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

front_end/panels/timeline/TimelineFlameChartView.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,11 +692,6 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
692692
entries.push(...Overlays.Overlays.entriesForOverlay(overlay));
693693
}
694694

695-
for (const entry of entries) {
696-
// Ensure that the track for the entries are open.
697-
this.#expandEntryTrack(entry);
698-
}
699-
700695
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_DIM_UNRELATED_EVENTS)) {
701696
// The insight's `relatedEvents` property likely already includes the events associated with
702697
// an overlay, but just in case not, include both arrays. Duplicates are fine.
@@ -710,6 +705,13 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
710705
}
711706

712707
if (options.updateTraceWindow) {
708+
// We should only expand the entry track when we are updating the trace window
709+
// (eg. when insight cards are initially opened).
710+
// Otherwise the track will open when not intending to.
711+
for (const entry of entries) {
712+
// Ensure that the track for the entries are open.
713+
this.#expandEntryTrack(entry);
714+
}
713715
const overlaysBounds = Overlays.Overlays.traceWindowContainingOverlays(this.#currentInsightOverlays);
714716
if (overlaysBounds) {
715717
// Trace window covering all overlays expanded by 100% so that the overlays cover 50% of the visible window.

0 commit comments

Comments
 (0)