Skip to content

feat(reader): swipe to turn pages on touch devices#766

Merged
ajslater merged 1 commit into
developfrom
claude/trusting-gates-74d3b8
May 12, 2026
Merged

feat(reader): swipe to turn pages on touch devices#766
ajslater merged 1 commit into
developfrom
claude/trusting-gates-74d3b8

Conversation

@ajslater
Copy link
Copy Markdown
Owner

Summary

  • Add left/right swipe gestures to the horizontal comic reader on touch devices, mirroring the existing ArrowRight/ArrowLeft keyboard behavior.
  • Implemented by overriding v-window's built-in touch prop with handlers that call routeToDirection. Vuetify's touch directive already lives on that element — the defaults try to flip between v-window items, which are disabled here and rely on URL routing instead.
  • RTL handling is automatic: routeToDirection normalizes the direction through normalizeDirection, so manga / right-to-left books swap left/right just like the arrow keys do.
  • Vertical reader mode is untouched — it already responds to native touch scrolling.

Notes for reviewer

  • This branch was already 2 commits ahead of develop before this change: the v1.12.3 version bump + news, and a merge from develop. Those commits are unrelated to the swipe feature and just rode along on this branch.
  • NEWS.md was not modified for the swipe feature; happy to add a bullet under v1.12.3 if you'd like.

Test plan

  • Open a comic in horizontal mode on a phone / tablet — swipe left advances a page, swipe right goes back.
  • Open an RTL / manga title — swipe directions are flipped (left = previous, right = next), matching the arrow keys in RTL.
  • In Chrome devtools, toggle device toolbar (Cmd-Opt-I → device icon) and confirm swipes register at the default 16px threshold.
  • Two-page mode swipes still advance by a spread (delegated to the existing route logic).
  • Vertical reading mode is unaffected — native scroll still works, no horizontal swipe interference.

🤖 Generated with Claude Code

Override v-window's default touch handlers in the horizontal pager so
left/right swipes route through ``routeToDirection`` instead of trying
to flip between the (disabled) v-window items. Mirrors the keyboard
arrow behavior, so RTL handling is automatic via ``normalizeDirection``.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ajslater ajslater merged commit 5a33971 into develop May 12, 2026
3 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.

1 participant