-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comment functionality #52
Comments
Since this will be demoed to Carlsberg in September/Oktober, it should be finished by then. |
I guess it could be integrated with #28. |
The general idea is to allow comments/notes at the paragraph level, essentially just expanding how notes are already marked up in the TEI files. Notes are used in the following way in the TEI files:
It makes sense to display generated notes in the same way using the same markup. In that way, the same components can be reused for the TEI notes and the comments and the appearance is also unified. The most obvious way to handle notes is to have a New notes are created by clicking on a "new note" symbol placed in various convenient places, e.g. in the margins of a paragraph or right after the page ends. Notes are represented as entities related to the relevant entities in the Asami graph, e.g. document IDs or facsimile IDs. ;; document notes
[?note :note/target ?tei-file]
[?note :note/body ?body]
[?note :note/author ?author]
;; page notes
[?note :note/target ?facsimile]
[?note :note/body ?body]
[?note :note/author ?author] In the case of paragraph-level notes, a special paragraph attribute is used e.g. ;; paragraph note
[?note :note/target ?facsimile]
[?note :note/body ?body]
[?note :note/author ?author]
[?note :note/paragraph "#p8"] ; important bit |
Aside from text notes, we also need to support adding new entities as This further complicates things as we need to represent this in the data in a way that it will work in searches, while also keeping track of who added what. It also necessitates having to port the search UI to the comments in order to reuse it for adding entities. |
I asked @quoll about combining in-memory and persistent storage in the asami channel on Clojurians slack and she directed me here: https://github.com/quoll/asami/blob/main/src/asami/wrapgraph.cljc |
Since my intended functionality doesn't entirely align with the functionality in Asami, it might be a better idea to keep the graphs separate and develop multi-graph querying similar to what I did with DanNet. When only the persisted graph is relevant, only this graph is queried. When transacting, only the persisted graph is used, except for the initial bootstrap of the in-memory graph. |
Data architecture updateSince it is possible to use anything data structure as the [?tei-file :note {:author ?author
:target ?target
:body ?body
:timestamp ?timestamp}] This will work for comments, but it will not work for querying tei files directly by It's also perfectly possible that this is just a minor performance improvement and that I better stick with atomised triples and reification in all cases. |
Working on the frontend UI first of all, trying to get things to a usable state. Making paragraphs clickable was quite easy, however, there is one easy which has more to do with the fact that paragraphs are sometimes split across pages, resulting in paragraph targets sometimes being e.g. In those cases we want to extract and cite the entire paragraph, ignoring page breaks, and keeping the actual target found in the TEI file, e.g. |
The A comment can have a specific target—or no target at all, in which case the entity itself is the target. The frontend decides where and how to display the comments based on the mix returned. I need to figure out a good design eventually, but for now I am just focused on getting the backend machinery working. Since there is one comment with a unique ID per combination of user, entity id, and target. Resubmitting to Comment threadsIn future, the Another option is to have the entity id of the comment be that of another comment. That would make the query currently in use unable to fetch all comments (requiring additional fetches), although it would also make things more performant for heavy discussions. I think using |
What about deletion?One aspect of allowing deletion of comments is that the threads will be orphaned. It might be a better choice to not allow this and simply treat a deletion event as removing the content of the comment, i.e. "" or nil. For this reason, |
This issue now also depends on #89 since the ID format for bookmarks has changed. |
It must be possible to attach comments to documents, preferably linked to specific paragraphs.
The text was updated successfully, but these errors were encountered: