github-review icon indicating copy to clipboard operation
github-review copied to clipboard

Multi-line code comments

Open StormFireFox1 opened this issue 5 years ago • 3 comments

Hello there, thank you for this absolutely amazing package!

Is it even possible to write multi-line code comments? The idea would be to select a segment of the diff and comment on it, kind of how you can do the same on GitHub.

Perhaps this is best left after the mode support, as this functionality could be a shortcut after selecting a part of the diff.

StormFireFox1 avatar Aug 11 '20 19:08 StormFireFox1

Thanks for the suggestion, it would be a great feature to add and I definitely miss not having that in github-review

It would be a lot easier after the mode support indeed! If you are interested in prototyping it, I would love to take a look at what you come up with.

Right now, the package just manipulates text and is very simple which makes it compatible with a broad range of use cases. Adding support for multi line comment would be awesome and I am thinking of how to maintain the accessibility of the package while doing that (and I don't have experience with that). If you use a screen reader to access this package, feel free to reach out to me to discuss, I would want to understand if that would be a problem for you. You can DM me at https://twitter.com/lc2817.

Also if you have an opinion on this feature, feel free to comment / upvote!

charignon avatar Aug 18 '20 15:08 charignon

Thinking on this for a bit more time, I've realized there could be a simple method of making multi-line comments manageable, which is to add a check at the beginning of any inline comment to see if it represents a range of lines from the start of the comments, something like:

#+3
# This is a comment spanning the next 3 lines
# after the last comment line.
Lines
more lines
even more lines

I might try this out myself (My Elisp-fu is pretty bad) but if you have a better suggestion, let me know.

StormFireFox1 avatar Sep 04 '20 18:09 StormFireFox1