Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Hide resolved comments in changes tree; Indicate resolved comments on margin #2253

Merged
merged 16 commits into from
Mar 26, 2019

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Mar 1, 2019

Previously pull request comments would be implicitly resolved when when the text near to the comment was changed. GitHub now supports comments being explicitly resolved by a user and comments becoming implicitly outdated when the text near to the comment is changed.

This pull request surfaces the IsResolved status of a review comment threads and hides resolved comments from the changes tree (in a similar way to how outdated comments are hidden). This makes it easy to find comments that still need to be addressed when responding to a pull request review.

What this PR does

  • Use pullRequest/reviewThreads to populate the IsResolved status of a pull request comment threads
  • When using GitHub Enterprise fall back to using original model (reviewThreads might not be available)
  • Hide resolved comments from the changes tree
  • Show different in-line comment glyph for resolved comments (an empty circle)
  • Show banner to clearly indicate when a thread has been resolved

To do

  • Support fallback for older versions of GitHub Enterprise
  • Indicate outdated in-line comments in glyph
    image
  • Show banner on resolved comment threads
    image

What this PR doesn't do

  • Probe GitHub Enterprise schema to see if we could fetch resolved comment information
  • Surface comments that are outdated but unresolved
  • Allow resolving of comments using inline comment view

How to test

  1. Open https://github.com/grokys/PullRequestSandbox in Visual Studio
  2. Open Testing resolved comments grokys/PullRequestSandbox#58 in GitHub pane
  3. Check that only 1 comment appears on Program.cs
    image
  4. Click on 💬 1 comment
  5. Check Program.cs appears in diff view and comment is visible
  6. Check that empty circle glyph appears below indicating a resolved comment
  7. Click on the resolved comment glyph
  8. Check that The conversation was marked as resolved banner appears above comment

Notes

Here is what is looks like in the Dark theme

image

Related #2245

@jcansdale jcansdale force-pushed the fixes/2245-comment-thread-resolved-status branch from e2c2462 to 8e4a5a9 Compare March 4, 2019 14:47
Show, "This conversation was marked as resolved" on peek view when conversation has been marked as resolved.
@jcansdale jcansdale force-pushed the fixes/2245-comment-thread-resolved-status branch from 91b62a2 to a489f5d Compare March 5, 2019 12:32
@jcansdale jcansdale changed the title Show resolved status for pull request review comments Hide resolved comments from changes tree and indicate resolved comments on margin Mar 5, 2019
@jcansdale jcansdale marked this pull request as ready for review March 5, 2019 12:41
@donokuda
Copy link
Contributor

donokuda commented Mar 5, 2019

I went and did A Thing replacing the info icon with the one built into visual studio. The result is a look and feel closer to a native infobar:

Blue Theme!
screen shot 2019-03-05 at 3 47 52 pm

Dark Theme!
screen shot 2019-03-05 at 3 47 14 pm

At first I was concerned about how much it popped out in the Dark Theme even though I was using the background color that we get from Visual Studio. However, I think it's okay for the following reasons:

  1. I tend to look over this information when the background was less intrusive.
  2. It's what Microsoft does. 😆

We've diverged a bit from what I've prototyped but I think that's fine given that my prototype relied heavily on the interaction of collapsing resolved comments.

@jcansdale
Copy link
Collaborator Author

@donokuda,

At first I was concerned about how much it popped out in the Dark Theme even though I was using the background color that we get from Visual Studio. However, I think it's okay for the following reasons:

  1. I tend to look over this information when the background was less intrusive.

I think this is a good call. 👍 We're trying to communicate that someone stuck a fork in this comment thread, you're probably done. Making this pop out is a good thing!

@StanleyGoldman StanleyGoldman merged commit d0c5fff into master Mar 26, 2019
@StanleyGoldman StanleyGoldman deleted the fixes/2245-comment-thread-resolved-status branch March 26, 2019 13:15
@StanleyGoldman StanleyGoldman changed the title Hide resolved comments from changes tree and indicate resolved comments on margin Hide resolved comments in changes tree; Indicate resolved comments on margin Apr 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants