Add new Bookreader integration
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:
Testing
To test in the hypothesis dev-server:
- Start up the dev-server as per usual, and go to http://localhost:3000/document/bookreader
- 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.
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.
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.
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.
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.
Closing due to the lack of capacity to review external PRs