annotator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonny Bradley <jo...@tiki.org>
Subject Re: Apache Annotator will be added to Tiki Wiki CMS Groupware (version 17)
Date Sun, 19 Feb 2017 15:55:51 GMT
Hi Benjamin,

Thanks for your thoughtful response, my replies follow inline below...

> On 15 Feb 2017, at 21:45, Benjamin Young <byoung@bigbluehat.com> wrote:
> 
> 
> Hey Jonny,
> 
> 
> The dom-anchor-* libraries are from Randall (a contributor here):
> 
> https://github.com/tilgovi?utf8=%E2%9C%93&tab=repositories&q=dom-anch&type=&language=

Brilliant, hi Randall! :)

> The intent is for Apache Annotator to use those libraries + the Web Annotation Data Model
(and for compatibility the older, idiosyncratic JSON format from Annotator.js) and give developers
an API for interacting with those and their relationship with the DOM. If you've not skimmed
this page yet, you might find it helpful:
> 
> https://cwiki.apache.org/confluence/display/ANNO/Planning

Thanks, that's a new page for me - so it looks like phase 0 should have everything we need!
(and curious they use a closed source tool for that! ;)

> Given that you're already down the road with Annotator.js 1.2.x, I'd love to hear more
about your experience and use of it. I'm assuming (since it does this), you're depending on
it for creating annotation bodies (comments, tags, etc) as well as the more foundational "highlighting"
feature. Is that correct?

Yup

We have had a simple "inline comments" system, based on our normal "bottom of the page" comments
system for some time, but it was rather crude and needed modernising and extending so we picked
annotatorjs to do that.

The old system, didn't have a concept of anchor ranges, just the quoted text (and a warning
if the text was too short or there were duplicates), but when the pages are edited (these
are usually wiki pages, so are changed frequently) the highlight and annotation would follow
the new text, usually.

So this is a function we really need to work as we didn't add annotatorjs as a new feature
but replaced the previous one (which is a bit naughty of us really).

> One of the things we're trying to determine right now is how much of the stack to provide/dictate.
The current leaning is to (at least at first) ship a small library and let developers hook
that into their own UI--and potentially providing some sample/demo code to show how it can
be done.
> 
> 
> The thinking is actually in hopes of avoiding the situation you're finding yourself in.
Most customizations (like the confirm dialog) often take "direct hacking" of Annotator.js
(though it's sometimes possible with the events/hooks system):
> 
> http://docs.annotatorjs.org/en/v1.2.x/hacking/plugin-development.html?highlight=event#annotator-events

Those look promising, i thought that was only in 2.x, so good to see we can probably use them
already...

> There's a "annotationDeleted" event...but not a "beforeAnnotationDeleted" event. In 2.x
there's a "permitDelete" option/callback which would do what you need potentially.

Ah, maybe not then - it was the beforeAnnotationDeleted hook/event that i think we need.

So basically i'm back to one of my original questions, is there any sort of schedule for when
v2, or whatever it will be called, is likely to be emerging?

It sounds very like we'll need to stick with 1.2 stable for our forthcoming release of Tiki
17 but would like some idea about when the new "toys" will really be available! :)

> I'd personally love to hear more about what you all are building and how you'd prefer
to come at the problem (as well as how you're doing it now).

Thanks again Benjamin, i guess our use case is fairly specific as we already have a back-end
for storing comments and annotations, but so far (barring those couple of questions) it seems
just about right for us!

jonny


> 
> Thanks again for reaching out!
> 
> Benjamin
> 
> 
> --
> 
> http://bigbluehat.com/
> 
> http://linkedin.com/in/benjaminyoung
> 
> ________________________________
> From: Jonny Bradley <jonny@tiki.org>
> Sent: Wednesday, February 15, 2017 9:58:56 AM
> To: dev@annotator.incubator.apache.org
> Subject: Re: Apache Annotator will be added to Tiki Wiki CMS Groupware (version 17)
> 
> Hi Robert,
> 
> Thanks for your reply, that dom-anchor-text-quote library looks like just the thing!
So how do we get it and the glue code into Annotator?
> 
> I'm not so familiar with this model of project, we generally put everything in the one
place (Tiki) which keeps things simple for coders like me... :)
> 
> Thanks again,
> 
> jonny
> 
> 
> 
> 
>> On 15 Feb 2017, at 14:15, Robert Knight <robertknight@hypothes.is> wrote:
>> 
>> Hello Jonny,
>> 
>>> Would it be possible to search for the nearest quoted text "near" to
>> where the original range was set instead of giving up and losing the
>> annotation completely?
>> 
>> I'm not familiar with whether this functionality was ever developed for
>> Annotator, but we have implemented this for the Hypothesis annotation
>> service, which was originally based on Annotator [1][2]
>> 
>> Hypothesis is a complete client and service for annotation. If you _just_
>> wanted to look into changing how anchoring works in Annotator, the library
>> that is used for converting DOM ranges to and from serialised quotes +
>> surrounding context is available as a standalone npm package at
>> https://www.npmjs.com/package/dom-anchor-text-quote .
>> 
>> Kind Regards,
>> Rob.
>> 
>> [1] https://hypothes.is
>> [2] https://github.com/hypothesis/client
>> 
>> On Tue, Feb 14, 2017 at 8:02 PM, Jonny Bradley <jonny@tiki.org> wrote:
>> 
>>> Hi Benjamin and all
>>> 
>>> I'm working with Marc Laporte to integrate Annotator in Tiki for the
>>> forthcoming version 17, which is due in the spring, and we have a few
>>> questions...
>>> 
>>> But firstly thanks for a great library, we manage to get about 90% of it
>>> done very quickly, but you know the old saying! ;)
>>> 
>>> We're using your latest stable release 1.2.10 and so i suspect that most
>>> of these queries will have the reply "coming in v 2", but here goes...
>>> 
>>> * Possibly an easy one: Is there a way of adding a confirm dialog on the
>>> delete/destroy button? I've already deleted a few i intended to edit... or
>>> even better, can we add event hooks on all events and do this ourselves?
>>> 
>>> * The harder one is regarding ranges - when the page is edited the
>>> highlight either "slips" or is lost completely, for instance when a new div
>>> or paragraph, or even some words are added to the page. Would it be
>>> possible to search for the nearest quoted text "near" to where the original
>>> range was set instead of giving up and losing the annotation completely?
>>> 
>>> * Assuming the answer to either or both of the above is "upgrade to 2.x"
>>> do you have any idea if 2.0 will be released, or at least have a release
>>> candidate within the next month or three? (as it's now written in
>>> JavaScript i may be able to help with some of these things, i drink coffee
>>> rather than write it ;)
>>> 
>>> Many thanks for the work so far, and even more thanks in advance!
>>> 
>>> jonny Bradley
>>> A Tiki Dev
>>> 
>>> 
>> 
>> 
>> --
>> Kind Regards,
>> Rob
> 


Mime
View raw message