client icon indicating copy to clipboard operation
client copied to clipboard

Add new Bookreader integration

Open cdrini opened this issue 9 months ago • 1 comments

Adds bookreader support for hypothesis. Meaning that annotations made with hypothesis will now correctly persist on the correct page, and not become orphans as the user flips around and pages are dynamically rendered/destroyed in BookReader. Also the correctly page label is displayed, and a PageSelector and TextQuoteSelector are saved to the annotation.

Demo of it running in the BR development environment:

image

Testing

To test in the hypothesis dev-server:

  1. Start up the dev-server as per usual, and go to http://localhost:3000/document/bookreader
  2. Add annotations to the book.
  • The annotations should persist, and not convert to orphans as you flip around
  • The annotations should also persist on refresh.
  • They should persist when switching between 1up and 2up mode (hidden in thumbnail mode)
  • Clicking an annotation when not on its given page, navigates to that page.

cdrini avatar Apr 11 '25 17:04 cdrini

As a heads up, the sorting by page is being implemented in https://github.com/hypothesis/client/pull/7002. As a result you can remove that code from this PR.

robertknight avatar Apr 25 '25 08:04 robertknight

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 27 '25 10:06 github-actions[bot]

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 28 '25 10:07 github-actions[bot]

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Sep 01 '25 10:09 github-actions[bot]

Closing due to the lack of capacity to review external PRs

acelaya avatar Oct 01 '25 14:10 acelaya