-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support web annotations #189
Comments
Hi @ronaldtse, could you be more specific/give me an example of this feature? I see the tag for the foreword annotation in the html. How would it be displayed/styled/placed? Would it be on hover or static? Thanks! |
Word and Google Docs, for example, allows placing comments next to the content, displayed as a side note. W3C has a web annotation specification but it is not currently supported by browsers. However, this JS code: https://github.com/predict-r/annotation-model is implemented according to the W3C specification, and I think we can use it to perform what we need. |
We probably should have a "show all / show simple / hide all" annotation toggle just like Word? |
Ok great, thanks for the clarification. :) I'll take a crack at this soon! |
After a lot of testing I've added a plugin for annotating the page. It's from https://github.com/openannotation/annotator Please let me know what you think. I haven't styled it or anything yet, I just wanted the basic functionality going first. |
@pierrefortier thanks now I can see the annotation plugin working (when I highlight it shows the annotator), but could we enable the existing annotations? The document contains two existing annotations under
and
I gather however that there is no locality information there for these comments -- @opoudjis could you help here? Thanks! |
I never saw this. They are not two annotations, they are two paragraphs in the one annotation; This is raw Word HTML, so there is indeed no distinct locality information; whatever is done in the pure HTML will presumably add more information to work from. This comment is identified in the div as id=1, and its corresponding comment span in the text is |
I don't think this is what we want at all. We don't want a tool to allow users to annotate the HTML page generated from Asciidoctor, because we don't actually want them to enter annotations on the HTML. The annotations are meant to originate and persist in the Asciidoctor text input. We only want something that gets divs with style as (currently) "mso-element:comment", and converts them into annotations. So we don't want to write annotations. These are read-only annotations, to be extracted out of the HTML. |
@pierrefortier Instantiating the existing annotations in the document as calls to Annotator would work (though I'd rather you do that than me :-) --- but Annotator looks like overkill for this requirement. Could you come up with something, instantiating some sort of annotation? |
@opoudjis it is not only the reading of annotation, but also the "writing of it". Currently when we distribute Metanorma documents (in HTML or PDF form), there is no method of allowing them to suggest changes (comments, direct edits). We need to:
|
This means mapping html back to asciidoctor-iso, and hoping that the users have not mangled the source irretrievably. In fact, you would only want to map the annotations back, not the html itself. |
Exactly, we could do some specific tagging in the HTML so that we can retrieve the annotations via the annotation JS that can be applied back to the source. |
This means that we retain the annotator JS functionality. I'm not happy about it, given how huge the code is. The task breaks down as follows, and these are really separate tickets:
We can assume that no new anchors will be added to the source; the alternative is a nightmare. That may mean that any added annotations will need to snap-to the existing anchors. |
Just for the record. We could potentially do Isodoc -> Word -> Apply annotations -> Isodoc annotations but this is just too tough. We'd rather do Isodoc -> HTML -> Apply annotations -> Isodoc annotations. |
This task has been unactioned for a year, and it needs to come back. @pierrefortier or @strogonoff , it needs JS chops, and it preferably needs a JS library that doesn't take up lots of MB. @ronaldtse , please manage allocation. In addition, do not ask for write-back to Metanorma, that is a much bigger ask (and in my opinion not feasible), and it should not be holding up implementation of this. |
@opoudjis I talked to @strogonoff he will be looking at this. |
@opoudjis let’s remove the annotations from HTML until we have a solid annotation solution. Right now they just break the HTML. Thanks. |
We discussed with Ronald and I’d take a look unless someone else is eager. Once I’m a bit free from ITU stuff
… On 7 Aug 2019, at 7:28 AM, Nick Nicholas ***@***.***> wrote:
This task has been unactioned for a year, and it needs to come back. @pierrefortier or @strogonoff , it needs JS chops, and it preferably needs a JS library that doesn't take up lots of MB. @ronaldtse , please manage allocation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Unactioned for two years. I am transferring this to somewhere visible (isodoc) and unassigning myself. |
Currently annotations are all placed at the bottom. There are some Annotation JS libraries that allow displaying these annotations at the right locations.
@pierrefortier would you be able to help with this?
The text was updated successfully, but these errors were encountered: