Skip to content

Remove zoomed condition from Timeline animation reset logic - #13

Merged
enricobattocchi merged 3 commits into
mainfrom
claude/fix-zoom-event-overlap-Opwy0
Apr 12, 2026
Merged

Remove zoomed condition from Timeline animation reset logic#13
enricobattocchi merged 3 commits into
mainfrom
claude/fix-zoom-event-overlap-Opwy0

Conversation

@enricobattocchi

Copy link
Copy Markdown
Owner

Summary

Simplified the condition that determines when to reset flipped keys in the AnimatedTimeline component by removing the zoomed state check.

Key Changes

  • Removed zoomed from the conditional logic that triggers flipped keys reset
  • The animation reset now only checks for vertical layout (mobile) or exit state, rather than also checking the zoom state

Implementation Details

The condition on line 103 was changed from if (isVertical || exit || zoomed) to if (isVertical || exit). This means the flipped keys will no longer be automatically cleared when the timeline is in a zoomed state, allowing zoom interactions to maintain their animation state independently.

https://claude.ai/code/session_01JRsr7z5g81APXYnjDmhNW6

The overlap detection that flips info cards above the timeline was
being skipped entirely in zoom mode. This caused events sharing the
same date to render both cards below the line, overlapping each other.
Remove the zoomed guard so the existing overlap algorithm runs in zoom
mode too — it already handles the layout correctly by measuring actual
DOM positions.

https://claude.ai/code/session_01JRsr7z5g81APXYnjDmhNW6
@github-actions

Copy link
Copy Markdown

Previously overlap detection was skipped entirely on mobile, causing
same-date events to render their info cards on top of each other.

Now the layout effect runs a vertical variant of the algorithm that
checks top/bottom overlap instead of left/right. Overlapping cards
are flipped to the LEFT side of the timeline, mirroring the desktop
behavior of flipping above the line.

The CSS for .markerInfoFlipped on mobile is updated to absolutely
position the card to the left of the marker circle, fitting within
the existing 20vw left margin of the timeline.

https://claude.ai/code/session_01JRsr7z5g81APXYnjDmhNW6
@github-actions

Copy link
Copy Markdown

Instead of moving the flipped info card to the left side of the
timeline, keep it on the right side but offset it downward by the
marker circle height so both cards are visible and stacked.

https://claude.ai/code/session_01JRsr7z5g81APXYnjDmhNW6
@github-actions

Copy link
Copy Markdown

@enricobattocchi
enricobattocchi merged commit be9fa50 into main Apr 12, 2026
1 check passed
@enricobattocchi
enricobattocchi deleted the claude/fix-zoom-event-overlap-Opwy0 branch April 12, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants