mirror of
https://github.com/readest/readest.git
synced 2026-11-29 19:02:28 +00:00
* fix(reader): reach the last page when a book ends partway into a spread Sections are sized by columns so the next one can start beside the previous one's end. The book's last section has no next section, so in a two-column layout the book could end on the left column of a spread, and the paginator's scroll container stopped half a spread short. The final spread showed the column before the last one again. With fractional page widths, as under Windows display scaling, the reader either never reached the end (the counter stayed at 1443 / 1447) or stopped a page early and never showed the last column. foliate-js (readest/foliate-js#147) now pads the views to whole pages and counts a partial last page as a page. Fixes #7303. Reported by gonwan on GitHub. Verification: - paginator-last-page.browser.test.ts turns pages to the end of 5-column and 3+4-column books, LTR, RTL and vertical-rl, at page sizes 1000, 1003.3, 1011.1 and 1017.9. With main's foliate-js all 16 cases fail (`expected 974.140625 to be less than 472.1015625`, `expected false to be true` on atEnd); with the change all pass. - The 27 browser suites that load the paginator pass (196 tests), as do the jsdom paginator suites. pnpm lint and pnpm format:check pass. - dev-web, Playwright Chromium at DPR 1.25, the reporter's EPUB, last chapter turned to the end at 39 window widths: main failed 12 (at 1681 the last ~14 paragraphs were never shown while the counter read 1447 / 1447); the change passes all 39, with Use Book Layout on and off, and in dark mode. - Not run: Windows WebView2 itself, iOS/macOS WebKit, Android. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(reader): bound the right edge of the last right-to-left column The right-to-left case checked only where the last column starts, so a column running off the right edge of the page would still pass. It now checks the column's right edge stays within the page. Verified: the 16 last-page browser tests pass with the fix; with foliate-js at main (2e4dbc1) the four right-to-left cases fail ("expected false to be true", "expected -442 to be greater than or equal to 471.1015625"). Biome and tsc are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): pin foliate-js to the merged paginator fix (#147) Moves the submodule from the PR branch commit 86e5d61 to c14f30c, the squash of readest/foliate-js#147 on foliate-js main. The trees are identical (`git diff 86e5d61 c14f30c` is empty). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| foliate-js@c14f30c830 | ||
| js-mdict@d01bf62af8 | ||
| qcms@fc23a407f1 | ||
| simplecc-wasm@5e5b56f5b8 | ||
| swift-rs | ||
| tauri@382ea858bd | ||
| tauri-runtime-cef-stub | ||