Skip to content

Add page-flip animation to Reading Mode#621

Merged
realproject7 merged 1 commit intomainfrom
task/616-reading-mode-page-flip
Mar 27, 2026
Merged

Add page-flip animation to Reading Mode#621
realproject7 merged 1 commit intomainfrom
task/616-reading-mode-page-flip

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #616

  • Track navigation direction (left/right) via flipDir state
  • Apply CSS-only slide animation (translateX(40px) + opacity fade) on content area
  • Works for Prev/Next buttons, keyboard arrows (Left/Right), and TOC chapter jumps
  • Direction-aware: "Next" slides from right, "Prev" slides from left, TOC compares indexes
  • 250ms ease-out duration — smooth on mobile
  • overflow-x-hidden on scroll container prevents horizontal scroll during animation
  • Animation classes in globals.css using @keyframes

Test plan

  • Click Next → content slides in from right
  • Click Prev → content slides in from left
  • Arrow keys → same directional animation
  • TOC jump → correct direction based on chapter position
  • Animation is smooth on mobile
  • Build passes

🤖 Generated with Claude Code

Track navigation direction (left/right) on Prev/Next/TOC navigation.
Apply CSS-only slide animation (translateX + opacity) on the content
area. Works for button clicks, keyboard arrows, and TOC jumps.
250ms ease-out duration keeps it smooth on mobile. Content wrapper
uses overflow-x-hidden to prevent horizontal scroll during animation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 27, 2026 10:06pm

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The PR adds a lightweight, direction-aware Reading Mode transition using local state plus CSS keyframes, with no extra dependencies and no scope creep outside the requested Reading Mode styling path.

Findings

  • None.

Decision

Approved because the change matches issue #616: Prev/Next and keyboard navigation now share the same directional animation path, the transition stays in the requested 200–300ms CSS-only range, and the implementation remains small and mobile-friendly.

@realproject7 realproject7 merged commit f1228f2 into main Mar 27, 2026
5 checks passed
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.

Add subtle page flip animation in Reading Mode

2 participants