You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposed feature to permit annotation of documents with comments.
The primary aims of the commenting feature are to:
allow selecting a cursor position or selection in document and attaching comment
showing a side-panel with comment threads
responding to comments
marking comments resolved
(optional) allowing comments to propose changes in text - amend/delete/highlight
Various approaches were considered and previous discussed in hedgedoc/hedgedoc#657. The main technical question is whether to include the commenting within the markdown source document or to store the comments in a database. This specification chooses the database storage option because it enables commenting threads without polluting the source document with too much inline syntax.
Plan
In the first instance, this feature will be developed as a plugin for RefMD v1
Once RefMD v2 API is stabilised, it can be integrated as a core feature
Implementation
For each document (defined by document id):
Corresponding THREAD entities can be created.
Each THREAD is anchored to the document by an HTML comment, e.g. <!--CTHREAD:yTs5gh39dyagJKG-->.
When a document is loaded, the database is queried for matching THREAD ids and the threads are populated in the commenting panel
Each THREAD can have multiple COMMENTS
Each COMMENT includes metadata about Creator and Datetime which is used to identify comment details
Users can mark a comment or thread with TAGS, including a "resolved" tag
The current plan is to implement just commenting of document parts, but the functionality could be extended with attributes to mark suggested edits to the selected text. For instance, a comment metadata could mark the text for deletion or amendment. This feature would require extension of the UI with a "proposed changes" mode.
Introduction
This is a proposed feature to permit annotation of documents with comments.
The primary aims of the commenting feature are to:
Various approaches were considered and previous discussed in hedgedoc/hedgedoc#657. The main technical question is whether to include the commenting within the markdown source document or to store the comments in a database. This specification chooses the database storage option because it enables commenting threads without polluting the source document with too much inline syntax.
Plan
Implementation
For each document (defined by document id):
THREADentities can be created.THREADis anchored to the document by an HTML comment, e.g.<!--CTHREAD:yTs5gh39dyagJKG-->.THREADids and the threads are populated in the commenting panelTHREADcan have multipleCOMMENTSCOMMENTincludes metadata aboutCreatorandDatetimewhich is used to identify comment detailsThe current plan is to implement just commenting of document parts, but the functionality could be extended with attributes to mark suggested edits to the selected text. For instance, a comment metadata could mark the text for deletion or amendment. This feature would require extension of the UI with a "proposed changes" mode.
UI considerations
A similar implementation as shown in the mockup in hedgedoc/hedgedoc#657 (comment) would be a reasonable start.
The main proposed differences from that mockup are:
Specification
erDiagram %% Main entity for the comment thread THREAD { UUID TID PK "Unique Thread ID" UUID DOC_ID FK "RefMD document ID" string Commit_ID FK "Last commit of doc" string Anchor_start "Start anchor (line, pos)" string Anchor_end "End anchor (line, pos)" boolean Anchored "Is anchor still present?" datetime Created datetime Updated UUID Creator FK boolean Resolved datetime T_resolved "Time resolved" UUID W_resolved FK "Who resolved?" } %% Entity for tags TAG { string name PK string color string description } %% Entity for individual comments within a thread COMMENT { UUID CID PK UUID Creator FK datetime Datetime boolean Resolved datetime T_resolved UUID W_resolved FK string Content } %% Relationships THREAD ||--|{ COMMENT : "contains" THREAD ||--|{ TAG : "categorized by" COMMENT ||--|{ TAG : "tagged with"