hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

In-context and share links made on EPUBs do not work as expected #1356

Open mattdricker opened 2 years ago

mattdricker commented 2 years ago

Related

EPUBS

Related to https://github.com/hypothesis/product-backlog/issues/1356

Related to https://github.com/hypothesis/product-backlog/issues/709

PDFs

Related to #1358

Related to https://github.com/hypothesis/product-backlog/issues/1360

Bug report form

Reported by user https://app.hubspot.com/contacts/6291320/ticket/899698951/

Note that I haven't made an exhaustive survey of epub documents, but this issue occurs at at least 2 major providers: https://www.fulcrum.org/ & https://bookshelf.vitalsource.com/

Steps to reproduce

  1. Open a book at https://www.fulcrum.org/ E.g. https://www.fulcrum.org/epubs/0r967596b (note, they embed Hypothesis in their ereader)
  2. Annotate some text
  3. Note the share URL or the in-context URL from activity page

Expected behaviour

Share URL should open appropriate page and annotation in document.

Actual behaviour

The share or in-context URL points to a raw xhtml file, which is not expected or visitable by most users.

Additional details

You can see this on 2 annotation from May 6, 2022 I have posted to the Hypothesis Working group. Screen Shot 2022-05-06 at 3 37 55 PM

One is located at https://bookshelf.vitalsource.com/reader/books/L-999-74211/epubcfi/6/4%5Bidloc_001.xhtml-itemref%5D!/4%5Beid12%5D/2%5Beid13%5D/2%5Beid14%5D which provides a share URL of https://hyp.is/cEG9Us1zEeywc1MMZMsCiA/jigsaw.vitalsource.com/books/L-999-74211/epub/OPS/loc_001.xhtml

The other at https://www.fulcrum.org/epubs/0r967596b#/6/20[Chung-0010]!/4/2[ch01]/2[header0101]/2/2[p1]/1:0 which provides a share URL of https://hyp.is/Nbox1M1xEeywah9pdqCIiQ/www.fulcrum.org/epubs/0r967596b/OEBPS/Chung-0010.xhtml

A previous similar issue was reported here: https://github.com/hypothesis/product-backlog/issues/709

Notes

From related issue #1360 , this may be related to which URL we use

robertknight commented 1 year ago

The problem has been solved for VitalSource, and we can apply the pattern to other ebook readers in future, as well as the migration tools that we developed for VitalSource. See the issues and project document linked on https://github.com/orgs/hypothesis/projects/96. Making this work requires ebook reader-specific changes, therefore what we did for VitalSource won't help Fulcrum.

We have a couple of options here:

  1. Redefine this issue to be specifically about Fulcrum
  2. Close this issue as completed for VitalSource, and open a new one for any other ebook providers that we want to roll this out to in future.