client icon indicating copy to clipboard operation
client copied to clipboard

SVG documents cannot be annotated

Open almereyda opened this issue 3 years ago • 3 comments

Steps to reproduce

  1. Open https://www.solipsys.co.uk/Chartodon/107731033028536736.svg
  2. Try to load the Hypothesis client
  • Either through the bookmarklet
  • Or through https://github.com/diegodlh/unofficial-hypothesis-extension
  1. Get error

Expected behaviour

Hypothes.is appears and I am able to annotate the SVG, very much like we would a PDF.

Actual behaviour

It is not possible to annotate the SVG. An error appears:

Bildschirmfoto von 2022-02-03 02-36-06

Bildschirmfoto von 2022-02-03 02-36-27

This is due to the SVG document not being an HTML document.

Browser/system information

Firefox 96, Ubuntu 21.10

almereyda avatar Feb 03 '22 01:02 almereyda

To make this work I think we'd have to do something similar to what we do with PDFs, where we have an HTML viewer app in the extension that fetches and presents the non-HTML content. The Hypothesis client can then be loaded in the HTML viewer.

An additional problem to solve is that we don't currently support drawing highlights on SVG text.

robertknight avatar Feb 03 '22 09:02 robertknight

Thank you for the details. Yes, this is what I was thinking, but didn't intend to prescribe.

You were thinking about #201 and #3747, to make the relation explicit, am I correct?

almereyda avatar Feb 05 '22 05:02 almereyda

Yes, with the twist that the entire document is SVG, rather than an SVG embedded in an HTML document.

robertknight avatar Feb 05 '22 06:02 robertknight

Closing in favour of https://github.com/hypothesis/product-backlog/issues/1502

nairiboo avatar Jul 06 '23 07:07 nairiboo