This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Fix viewing outdated comments in pull request reviews #2249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Navigating to an outdated comment from a pull request review is currently broken. This pull request fixes that and also provides a fallback when our comment matching algorithm diverges from the one on dotcom.
What this PR does
How to test
Opening an outdated comment
github/VisualStudio
pull request 2241 on GitHub paneReviewers > jcansdale
Outdated comments
Opening comment where line positioning algorithm doesn't quite match dotcom
This example uses a comment that dotcom doesn't flag as outdated, but current our line positioning algorithm can't find a line number for it. It will fall back to showing the file as it was when the comment was originally made.
github/VisualStudio
pull request 2241 on GitHub paneReviewers > jcansdale
Comments
log.Error(ex, ...
and hitEnter
log
andoperatingSystem
have been swapped)What this PR doesn't do
On github.com,
Outdated
pull requests are clearly marked. I think we should also do this to let users know they're not looking at the latest version of the code. We could also let users know to click on the source and hitEnter
to navigate to the latest version.Fixes #2247