latin-language-toolkit/arethusa — pull request #308 by LFDM (2014-08-04 10:06:33+00:00)
Title: Comments plugin

Leightweight implementation of a comment system for tokens.

What it can:
- Allows to comment on one or several tokens
- Allows to filter token (based on current selections or a full text search)
- Can highlight commented tokens
- Has the default key binding `ctrl-K` to create a new comment

What it can't do:
- Edit or delete comments
- Comment on specific annotations such as only on a relation label. Every comment references the token itself
- Provide special markup in the comment field to reference things (could be a cool feature one day maybe)

The retriever that comes with it works with the Perseids/SoSOL API as specified in PerseusDL/perseids_docs#152. This is a very temporary solution. The comments API doesn't allow to reference tokens - all comments are saved referencing the complete publication/document. The retriever, which also acts as persister, therefore hacks identifiers into the comment body, so that the `comments` service knows which tokens are referenced.

It's not really sustainable that way - once we much to new schemas and have better identifiers for tokens available, this will receive an update.

Right now the plugin is not fully compatible with artificialTokens. The retriever references the document-source ids of tokens - an artificialToken doesn't have one when it's created. The document needs to be saved before. So there might be a short window where comments on such tokens fail. Will deal with this in a separate PR.