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
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Provide line by line commenting, review, conversation tools in file (blob) view #211
I'd like to leave a comment about the current state of the code on a given branch.
It seems that as of 2014-06-13, to leave a comment on a given line in a given blob view, I have to navigate to Blame and then to the commit that introduced the line, where I can comment on the added line in the commit view.
My comment will trigger notifications to repository watchers, to people I mention, and presumably to the commit's author, but the GitHub website doesn't surface the comment anywhere other than on that old commit. My guess is that it's unlikely that many people will find it.
I could create an Issue instead, but issues connote a need for resolution, whereas I'm merely trying to create a greater opportunity for valuable action via starting a conversation.
Instead, I'd like to comment directly from the blob view to start a conversation about a given area of the code. I'd like those conversations to be easily retrievable via search and browsing.
I'm imagining something like Google Docs's commenting, where I can comment on a particular part of a document, a conversation can follow, and eventually one of the participants can Resolve the conversation.
Maybe "Conversations" should become Issues or have a similar but separate browsable and searchable index.
Reacted by Omid K. Rad, Andrey Akinshin, Chun Wang, Peng Li, Xiao Hanyu, Markus Döring, Yihui Xie, Julian Mehnle, Xiaowei Liu, Ryan Michela and 137 more
changed the title [-]Provide line by line commenting, review, conversation tools file (blob) view[/-][+]Provide line by line commenting, review, conversation tools in file (blob) view[/+]on Jun 13, 2014
Would be non-trivial to associate comments to sources lines that show a special preview from the preview, like HTML preview of Markdown files on URLs of type blob/master as in your screenshot.
I'm interested in things like this, but the big question is: how do you transfer the comments if the file is changed, e.g. commented lines moved to another place? I don't think its computationally doable, only through heuristics.
Another possibility would be to show the comments only until the file is changed, but that could happen anytime for an unrelated reason, so it's not a very interesting possibility.
Showing the comments from the last commit only would be a easy solution. Plus, I think we shouldn't be seeing 2 year old comments which are probably now invalid anyway.
As for creating new comments, they could automatically be delegated to the last commit.
👍
Reacted by Luke Griffiths, Chinedu Daniel, Guruprakash Rajakkannu, Markus Döring, Julian Mehnle, Benjamin Rodenberg, Joseph Kato and Paul Kuruvilla
I want this. 👍
I think the mechanism for keeping comments across commits could roughly be the way a good implementation of patch works: using fuzzy matching. There are several implementations for it in Google diff/match/patch here.
User comments line. Line text and location is saved as match for comment.
User changes line during commit.
Find the new location of the comment using match_main(new_commit_text, old_line_text, old_line_location). If the line is not found, then the comment is "dangling" and either delete it or mark it for user action, depending on user preferences.
It would also be nice to keep a complete comment history for the file, and to move comments between files when their commented lines are moved (does git provide this info?).
Documentation for match_main is here. The research question here is determining acceptable values of diff_match_patch.Match_Threshold, which determines the fuzziness of the text match, and diff_match_patch.Match_Distance, which determines the fuzziness of the location match.
Another +1. I'm a Google Summer of Code mentor, and I'd like to do a general code review on my student's repo. This is the exact feature I need to do that.
Reacted by Luke Griffiths, Yihui Xie, Emmanuel Château-Dutier, Andrey Akinshin, Ray Toal, Nathan Sheffield, Peng Li, Ben Martin, Matthijs Mullender, Markus Döring and 22 more
Another 👍. This will be very helpful for reviewing papers and books.
Reacted by Emmanuel Château-Dutier, Andrey Akinshin, Felix Lau, Nathan Dintenfass, Carl Eiserman, Nathan Sheffield, Peng Li, Joshua Lewis, Shrikanth Malarouth, chubb and 19 more
Reacted by Chaimae Chraibi, Ethan Buchman and Daira-Emma Hopwood
Please don't reply to an issue just to say '+1': it sends a notification to everyone subscribed to the issue. Instead, just react to the issue's initial comment with the 👍 emoji.
Reacted by Ruman Kim, Adam Spiers, Yu Zhang, Andrew Fitzgerald, David J Bettinardi, Aleksei Potapkin, Andriy Chikalo, jackwilsdon, Fabrizio Ferri-Benedetti, Patrick Hendricks and 18 more
Activity
[-]Provide line by line commenting, review, conversation tools file (blob) view[/-][+]Provide line by line commenting, review, conversation tools in file (blob) view[/+]cirosantilli commentedon Jun 19, 2014
IIUC this could only be doable from the raw view for files that have preview like Markdown.
matthewlmcclure commentedon Jun 19, 2014
Why do you think it wouldn't be doable for arbitrary files in the blob view?
cirosantilli commentedon Jun 19, 2014
Would be non-trivial to associate comments to sources lines that show a special preview from the preview, like HTML preview of Markdown files on URLs of type
blob/masteras in your screenshot.I'm interested in things like this, but the big question is: how do you transfer the comments if the file is changed, e.g. commented lines moved to another place? I don't think its computationally doable, only through heuristics.
Another possibility would be to show the comments only until the file is changed, but that could happen anytime for an unrelated reason, so it's not a very interesting possibility.
matthewlmcclure commentedon Jun 19, 2014
OK I understand what you're saying now. Yes I imagine that would be a challenge. Hopefully not an insurmountable one.
captn3m0 commentedon Jun 19, 2014
Showing the comments from the last commit only would be a easy solution. Plus, I think we shouldn't be seeing 2 year old comments which are probably now invalid anyway.
As for creating new comments, they could automatically be delegated to the last commit.
👍
garfieldnate commentedon Feb 22, 2015
I want this. 👍
I think the mechanism for keeping comments across commits could roughly be the way a good implementation of patch works: using fuzzy matching. There are several implementations for it in Google diff/match/patch here.
match_main(new_commit_text, old_line_text, old_line_location). If the line is not found, then the comment is "dangling" and either delete it or mark it for user action, depending on user preferences.It would also be nice to keep a complete comment history for the file, and to move comments between files when their commented lines are moved (does git provide this info?).
Documentation for
match_mainis here. The research question here is determining acceptable values ofdiff_match_patch.Match_Threshold, which determines the fuzziness of the text match, anddiff_match_patch.Match_Distance, which determines the fuzziness of the location match.marnen commentedon Jul 3, 2015
Another +1. I'm a Google Summer of Code mentor, and I'd like to do a general code review on my student's repo. This is the exact feature I need to do that.
omidkrad commentedon Jun 8, 2016
Wow, this was requested 2 years ago and there is exactly no improvement on this yet!
This is the workflow I'm looking for:
Also it would be nice to make the jump to blob (shortcut key 'y') feature more obvious, maybe by adding a button for it in the UI.
yihui commentedon Nov 5, 2016
Another 👍. This will be very helpful for reviewing papers and books.
nsheff commentedon Feb 2, 2017
chchrist commentedon Feb 3, 2017
freewind commentedon Feb 8, 2017
👍
joshilewis commentedon Mar 2, 2017
+1
xiaohanyu commentedon Mar 7, 2017
+1
jleben commentedon Mar 10, 2017
+1
chookie commentedon May 23, 2017
👍
JohnRoesler commentedon Jun 8, 2017
👍
boooklet commentedon Jun 19, 2017
+1
stenioaraujo commentedon Jun 25, 2017
👍
jmehnle commentedon Jul 10, 2017
Here's a workaround that involves creating an "empty" branch and then creating a pull request to merge the desired branch into the empty branch: http://astrofrog.github.io/blog/2013/04/10/how-to-conduct-a-full-code-review-on-github/
rumaniel commentedon Oct 24, 2017
alecbz commentedon Oct 24, 2017
Please don't reply to an issue just to say '+1': it sends a notification to everyone subscribed to the issue. Instead, just react to the issue's initial comment with the 👍 emoji.
cmagnus commentedon Nov 6, 2018