Skip to content

feat(web): hide timeline events while holding Alt - #1195

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-lqtznyxpzlnr
Oct 29, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-lqtznyxpzlnr

Conversation

@kyasbal

@kyasbal kyasbal commented Oct 29, 2026

Copy link
Copy Markdown
Member

Summary

When a timeline row contains many dense events, event markers obscure the underlying revision bars and crowd out revisions in the hover overlay, making it difficult to inspect or click revisions directly. Additionally, the vertical cursor line overlay intercepted pointer events on the timeline canvas.

This change hides events while holding the Alt key so users can unobstructedly inspect and click revisions behind dense events:

  • Suppresses event rendering and WebGL hit-testing on the timeline chart while Alt is held, and immediately re-evaluates hit-testing at the current pointer position when Alt is pressed or released.
  • Excludes events from the timeline hover overlay and its preceding/succeeding log lookups while Alt is held so surrounding revisions remain visible within the overlay log limit.
  • Sets pointer-events: none on the cursor time label and vertical line overlays so they no longer absorb mouse movement events over the chart canvas.

Alternatives Considered

  • Expanding timeline row and revision height on hover: Dynamically scaling the hovered row or revision height still left dense event markers overlapping the revision bar and introduced visual jitter across rows with different base heights.
  • Using Shift or Ctrl as the modifier key: Shift is already bound to switching the timeline scroll mode to time-axis scaling, and Ctrl triggers wheel zooming as well as the browser context menu on macOS when clicking. Alt avoids conflicting with existing scroll, zoom, and click interactions.
@kyasbal kyasbal added type:feature New feature or request area:frontend Web frontend application and UI components labels Oct 29, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ability to hide timeline events (e.g., when holding the Alt key) across the timeline rendering, hover overlay, and log lookup components. The feedback highlights two important issues: first, calling onMouseEvent directly inside an effect block in TimelineChartComponent registers unintended signal dependencies, which should be avoided by wrapping the call in untracked(); second, manually adding a blur event listener to window in CaptureShiftKeyDirective without cleanup causes a memory leak, which can be resolved by using Angular's @HostListener('window:blur') decorator.

@kyasbal
kyasbal added this pull request to the merge queue Oct 29, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 7b2279a Oct 29, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-lqtznyxpzlnr branch October 29, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Web frontend application and UI components type:feature New feature or request

1 participant