Skip to content
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

Display PR review comments inline. #1549

Conversation

@grokys
Copy link
Contributor

@grokys grokys commented Mar 21, 2018

When the user clicks a review comment represented by a PullRequestReviewFileCommentViewModel, open the comment inline in a diff view:

2018-03-21_13-47-30

This also handles showing outdated comments in a diff representing the commit at which the comment was left. Doing this required a few changes to the inline comment/PR session manager classes to make them accept a commit SHA instead of just assuming that the PR head will be needed.

Depends on #1545
Part of #1491

When the user clicks a review comment represented by a `PullRequestReviewFileCommentViewModel`, open the comment inline in a diff view.
@grokys grokys mentioned this pull request Mar 21, 2018
17 of 17 tasks complete
@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Mar 22, 2018

@grokys one thing I found interesting is that I couldn't get a diff view (the 3rd one) to open while reviewing comments.

one diff doesnt open

@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Mar 22, 2018

I also found it interesting that for comment reviews, the comment is displayed as a Description versus comments or outdated comments. Could comment reviews just be called comments?

description vs comment

@grokys
Copy link
Contributor Author

@grokys grokys commented Mar 23, 2018

I think this is because there are two separate concepts here:

  1. A comment on a line of code. These will be displayed under Comments or Outdated Comments. Using the web interface, these comments are left like so:

image

  1. The comment attached to the review itself. This is what is displayed under Description:

image

@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Mar 26, 2018

Cool, thanks for clarifying the description comments @grokys.

The only other interesting thing was that a diff didn't open for one comment (I pointed out a few days ago. The example comes from PR 1492). I initially thought it had to do with the file extension, but don't think that's the case. I noticed that the diff I want to open isn't rendered by default in dotcom:
large diff

So I'm thinking that diff won't open because it's just a really large diff. Don't know how commonly this happens but might be worth it to show something in VS to indicate why the diff doesn't open.

Copy link
Contributor

@sguthals sguthals left a comment

This also handles showing outdated comments in a diff representing the commit at which the comment was left.

Can you clarify this?

I have a ton of reviews/comments on this one file:
screen shot 2018-03-28 at 7 52 49 pm
But I don't see any differentiation between outdated and new reviews? Not in that view above or in the comments:
screen shot 2018-03-28 at 7 53 44 pm

However, it is working, when I click on a comment in the review in the pane it opens it up in the diff view.

Two things that might be out of scope or things we cannot fix:

  1. Each time I click a comment the entire diff view reloads, is that expected?
  2. When I click on the comment, if it is in a thread of comments for that line, there is no indication of this. Maybe we don't want one, but it was just interesting that I had to search through to find it. That being said, it might make sense for that functionality.
…ew-comments-in-editor
@grokys grokys mentioned this pull request Mar 29, 2018
8 of 18 tasks complete
@jcansdale jcansdale changed the base branch from feature/pr-reviews-master to feature/pr-reviews Apr 9, 2018
@jcansdale jcansdale changed the base branch from feature/pr-reviews to feature/pr-reviews-master Apr 9, 2018
@jcansdale jcansdale merged commit 94205d8 into feature/pr-reviews-master Apr 9, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@jcansdale jcansdale deleted the feature/show-pr-user-review-comments-in-editor branch Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.