Skip to content

feat(reader): page gap for dual-page spreads + ctrl+shift+scroll (#234) - #251

Merged
Gnathonic merged 11 commits into
developfrom
feat/page-gap-234
Jul 6, 2026
Merged

feat(reader): page gap for dual-page spreads + ctrl+shift+scroll (#234)#251
Gnathonic merged 11 commits into
developfrom
feat/page-gap-234

Conversation

@Gnathonic

Copy link
Copy Markdown
Owner

Resolves #234.

What

  • New `pagedGap` setting (0–100): renders as `column-gap` between the two pages of a paged-mode spread. The gap lives in image-pixel space, so it scales with zoom like a physical gutter. Slider appears in reader settings when page view mode is dual/auto.
  • Fit math stays exact: new pure `spreadContentSize()` helper includes the gap in the paged content size, so fit-to-screen/width, pan clamping, and swipe edge detection account for it.
  • Ctrl+shift+scroll live-adjusts the gap on all three reader surfaces: paged writes `pagedGap`; continuous modes write `scrollGap` and auto-sync `pageDividers` (0 = off). Keyed toast shows the current value.

Binding rationale

Wheel combos with a native browser meaning keep that meaning tuned for the reader (ctrl+wheel = zoom, shift+wheel = horizontal pan); gap adjustment takes ctrl+shift+wheel, which no browser binds. Recorded in `docs/INPUT-CONTRACTS.md`. Handles the browser quirk where shift moves the wheel delta into `deltaX`.

Verification

  • 947 unit tests pass (new: `spreadContentSize`, `gapWheelSteps`/`wheelIntentIsGapAdjust`, `pagedGap` migration); svelte-check and lint clean.
  • Playwright end-to-end against the dev build: imported a synthetic volume, verified flush baseline, toast + visual gap at 25px/100px (scaled by fit exactly), clamping at both bounds, ctrl+wheel zoom and shift+wheel pan unaffected, continuous-mode chord enabling dividers from zero, and per-mode setting independence.

🤖 Generated with Claude Code

Gnathonic and others added 11 commits July 5, 2026 21:14
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
mokuro-reader Ready Ready Preview, Comment Jul 6, 2026 5:04am

Request Review

@Gnathonic
Gnathonic merged commit 49e6e07 into develop Jul 6, 2026
9 checks passed
@Gnathonic
Gnathonic deleted the feat/page-gap-234 branch July 6, 2026 05:09
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