readest/packages
Huang Xin aa13f221ce
fix(reader): show each Curl and Page Flip sheet's own bookmark ribbon (#8076) (#8096)
Curl and Page Flip on Android and iOS capture the next and previous
pages with paginator.previewPage(), and the capture includes the
bookmark ribbon overlaid on the page. The ribbon followed the current
page, so the page revealed mid-turn carried the current page's ribbon
state: a ribbon on a page without a bookmark, or none on one with it.

Foliate's preview event now carries the previewed page's CFI
(readest/foliate-js#206). FoliateViewer puts it in the page preview as
its location, and while a preview is up, BookmarkPullDown matches that
location against the book's bookmarks instead of the current page's
state. The bookmark match moves into isLocationBookmarked in
utils/cfi.ts, which BookmarkToggler now uses too.

foliate-js is pinned at its main, 86522d9. The old pin fb174ec (#204)
never reached foliate main: it was stacked on #203 and merged into
#203's branch. readest/foliate-js#205 re-landed it unchanged, so the
code diff from the old pin to this one is #206's view.js change alone.

Verified:
- Tests that fail without the change: in BookmarkPullDown.test.tsx,
  "shows the ribbon on a bookmarked page from a page that isn't"
  (expected null not to be null) and "hides the ribbon on a page
  without a bookmark, then brings it back" (expected <div…> to be
  null); the preview test in foliate-viewer-relocate.test.tsx (progress
  location was the current page's); and "previews the location a turn
  then reaches" in paginator-paginated.browser.test.ts at the old pin
  (no cfi in the preview). All pass with the change.
- 13 related unit test files (218 tests) and the paginator-paginated
  browser file (37 tests) pass. pnpm lint and pnpm format:check pass.
- dev-web, Alice EPUB: with a bookmark on one page, the ribbon at the
  moment each neighbour page is captured matches that page. With the
  preview event dropped, as on main, it shows the current page's state.
- Android API 35 emulator, debug build, each turn held mid-way: Page
  Flip from a bookmarked page reveals a next page without a ribbon (it
  carried one before the fix); Curl from a page without a bookmark
  reveals the bookmarked page with its ribbon (none before the fix).

Not run: iOS. It takes the same code path, but WKWebView takes the
snapshots. Not reproduced: deleting a neighbouring page's bookmark from
a pinned sidebar may leave an already-captured sheet with the old
ribbon until the captures refresh.

Reported by chrox on GitHub

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 04:09:42 +01:00
..
foliate-js@86522d99b7 fix(reader): show each Curl and Page Flip sheet's own bookmark ribbon (#8076) (#8096) 2026-11-29 04:09:42 +01:00
js-mdict@d01bf62af8 feat(dict): faster MDict/StarDict import + lazy lookup; raw .dict; UX (#4334) 2026-05-28 07:48:16 +02:00
qcms@fc23a407f1 chore(fdroid): get rid of wasm binaries in fdroid build (#3677) 2026-03-29 18:31:46 +02:00
simplecc-wasm@5e5b56f5b8 chore(fdroid): get rid of wasm binaries in fdroid build (#3677) 2026-03-29 18:31:46 +02:00
swift-rs feat(reader): Page Flip page-turn style on Android, iOS and desktop (#7160) 2026-10-30 12:57:43 +01:00
tauri@382ea858bd fix(android): stop the app freezing at launch on a page load deadlock (#6240) 2026-09-17 17:43:36 +08:00
tauri-runtime-cef-stub chore(linux): catch up the CEF runtime with upstream feat/cef, closes #6397 (#6487) 2026-09-30 04:07:58 +08:00