client
client copied to clipboard
SVG documents cannot be annotated
Steps to reproduce
- Open https://www.solipsys.co.uk/Chartodon/107731033028536736.svg
- Try to load the Hypothesis client
- Either through the bookmarklet
- Or through https://github.com/diegodlh/unofficial-hypothesis-extension
- 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:
This is due to the SVG document not being an HTML document.
Browser/system information
Firefox 96, Ubuntu 21.10
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.
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?
Yes, with the twist that the entire document is SVG, rather than an SVG embedded in an HTML document.
Closing in favour of https://github.com/hypothesis/product-backlog/issues/1502