-
Notifications
You must be signed in to change notification settings - Fork 94
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
Comments #185
Comments
@monsieurhannes yes, this would be very useful. Could you show screenshots from how Google Docs, Word and others do it as examples? |
Besides the frontend we of course need to think of a proper way how we represent the comments in markdown. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Markdown footnotes would be a possibility to represent in MD |
HackMD has this functionality. See https://hackmd.io/s/how-to-use-comments for examples. I do not think that the comments are stored in the markdown file. |
The issue with not storing it in the markdown file would be that we then loose the comments as soon as someone changes the file from outside (e.g. with a editor synced by the desktop client) |
Footnotes would be a possible way, but they limit comments to one cursor position in the text rather than having the possibility to mark a range of text and comment on that. |
Maybe Critic Markup would be an option: http://criticmarkup.com/users-guide.php |
Any development on this front? |
This would still be a nice to have feature, but is currently blocked by a proper approach to persist comments in markdown files, without impacting readability too much. The only feasible option seems to be to use footnotes for this, but then you could only comment on cursor positions and not comment on a selected area. |
I think range based comments are only possible with custom syntax. When talking about inline comments, how about HTML comment blocks? # Header
some text <!-- some comment --> text But when talking about range comments, then I could not even find one already used syntax for that. # Header
?[some text](with comment) |
Comments as per CriticMarkupSince many people have been mentioning CriticMarkup in this and duplicate threads, here's how it looks in practice. Comment (sticks to a specific point in the text
Highlight (highlights
To me this looks like an elegant solution, which will preserve the comments even when edited with an external editor. One caveat is that the CriticMarkup parser doesn't currently support broken markdown tags: a highlight has to include both the opening and closing of the tag to work properly. They hope to fix this in the future and allow partial tags to be highlighted too. First stepsI think even the first option (just inline comments at a specific point in the text, not necessarily tied to a specific highlighted passed) will be a great help for collaborative editing. Given that it also looks easier to implement, how about we start with that, and put highlights as a feature later down the line if needed? Linking to the userWhat remains to be standardised is how to link the comment to a NextCloud account. The simplest way is to prepend the commenter's name before adding the actual comment, like this:
If we're only saving these comments directly to the Markdown file, there is obviously no way to verify the identity: anyone can type my username into the text file to make it appear as if I wrote the comment. To prevent this, perhaps we could implement this in multiple stages:
That's as far as I've thought so far—is there anything I missed, any concerns, or anything that could be done better? (Tagging @juliushaertl for what you think of the markdown mechanics, and if you have any concerns about using CriticMarkup instead of vanilla markdown or whatever we use right now). |
Thanks a lot @badrihippo for the thorough reply. I like your approach. CriticMarkup doesn't look very active, but the syntax seems sensible nevertheless. And there is a markdown-it plugin for CriticMarkup (that is very old but then it's only a few lines of code anyway). We would need that for serializing the markdown into HTML. There's also vimtaai/critic-markup which might help as code inspiration (e.g. for parsing regexes). |
This discussion looks a lot like this one: I would love that It is probably utopia, but this is the way I feel, a common internal standard to collaborate between different tools, and different UI according to preferences. Sorry to open the scope of the discussion, don't hesitate to label it as offtopic. Have a nice day! |
To get a better feeling for this solution, here are some screenshots of popular text editors, as @jancborchardt suggested: Google DocsLibreOffice TextHackMDsee https://hackmd.io/s/how-to-use-comments OnlyOffice |
I've been pondering this some more. Haven't really made up my mind yet - so throwing some random thoughts out. Using links to denote commentsWe could use links to anchors in the file to denote comments like mentioned above. [Text I want to comment on](#comment1)
... more text...
... end of the actual content
----
# Comments
<div id="comment1">
> Text I want to comment on
@max-nextcloud : my comment
@someone-else: their comment
</div> Pros:
Cons:
CriticMarkupPros:
Cons:
Using our existing comments on files systemWe do have comments in Nextcloud. It's not used so often I think - but we could improve that by embedding it in text. Pros:
Cons:
|
My two pence [disclaimer: not really contributing code to this repo].
Apart from the other cons, IMO these issues pose serious obstacles for large groups where not everyone is familiar with the comment protocol. Those editing files primarily in an external editor are almost sure to break others comments because it will be easy to miss that the comment even exists or how it works.
These address the issue I mentioned above, it's harder to miss new unique syntax and will probably ensure unfamiliar users pause and consider before making changes.
even if no one else chose this path, it seems to me to be the best path for NC, given how the files within it are edited by a different people using a plethora of different editors.
A pro, not a con, IMO.
These two issues make this path non-viable, IMO. I am constantly thinking of the way nextcloud is often used -- in large heterogenous groups or organisations where not everyone is familiar with all features of all tools. |
From the discussion with @marcoambrosini and @max-nextcloud: We currently see 3 options
Stretch goals
|
I would rather go with HTML comments as a syntax that way we would also solve the problem that text does not preserve HTML comments |
The benefit of footnotes would be that it does not impact readability of the plain markdown too much, with html comments that is probably getting quite messy if there are a couple of comments on the same line |
@juliushaertl could we schedule a kickoff meeting with stakeholders to scope down this feature? |
Thats true, I was just hoping that text would now preserve my comments 😄 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Or wait, since this probably has more detailed description. Let's use this one. I'll copy the current state of discussion over. |
Copying over design spec draft from @nimishavijay (#6478 (comment)) ReferencesDesign specsExisting comments
New comments
New comment element:
Mobile viewMockups TBD
TBD:
What do you think? :) |
When splitting a paragraph, that has been commentd on three options come to my mind:
|
This is really hard to get right as it adds another layer on top of the document that is completely orthogonal to everything else:
I think we need to conceptually differentiate between the discussion (i.e. a comment and its replies) and the marks on text it discusses (i.e. the highlighted text block). Discussions need to address 3. and 4. while the marks need to account for 1. and 2. The discussion
Possible Syntax:
Marks
Possible Syntax:
|
This post summarizes the current state of the discussion in this ticket and the plans to implement (original report at the bottom):
Open tasks
Summary
Initial sketch with available comments indicated in text and a button to create a new comment on the current active section.
Allow comments on block elements (paragraphs, headings, quotes, ...):
Motivation
Comments are useful in many situation. They allow adding information that directly relates to parts of the document without adding it directly to the document content.
Comments can be particularly helpful when drafting documents and during a review process.
Comments on block elements attach the comment to the relevant section on the document
while avoiding the complexity of in line comments such as overlapping comment ranges.
Specification
Comments can be added to all block elements:
Alternatives
Inline comments
This draft mainly came out of the discussion of in line comments in #185.
In line comments allow commenting on a precise range of text, which is hard to represent in markdown.
Footnotes
While footnotes could also be used to represent comments, they serve a different purpose.
#2142 discusses footnotes.
User Interface Elements
Implementation
toMarkdown
function to serialize them.Out of scope for now (but maybe future)
Initial report
Is your feature request related to a problem? Please describe.
No, but it would be great to have the ability to comment text directly in the line.
Describe the solution you'd like
Similar to gdocs and word, marking a text and writing a comment on the side.
Describe alternatives you've considered
Linking a specific part of the text in the comment section in the panel on the right could also be a solution, maybe for the start, being able to link headlines
#H2
Just an idea, might be too ambitious, but maybe sth. for the backlogs.
The text was updated successfully, but these errors were encountered: