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

Conversation

@jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Jun 10, 2019

When an individual file is opened from the PR detail view, the comment margin wasn't appearing.

What this PR does

  • Ensure that Git relative path is always used

How to test

  1. Open a solution that contains pull requests
  2. Open the pull request detail view without checking out the PR
  3. Right-click on a PR file that has comments and View File
  4. Check that comments appear on comment margin

Fixes #2380

Consistently new up PullRequestTextBufferInfo with Git relative path.
Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. Thanks for the fix.

@jcansdale
Copy link
Collaborator Author

This looks like a 🐛

var fileName = file.FileName.Replace("/", "\\");
return changes?.Renamed.FirstOrDefault(x => x.Path == fileName)?.OldPath;

Git uses / as its directory separator. Why are we renaming it to \ before searching? 😕

@jcansdale jcansdale force-pushed the fixes/2380-view-file-comment-margin branch from 1b42ef5 to 4f6b57e Compare June 13, 2019 08:47
co-authoried-by: Jamie Cansdale <jcansdale@gmail.com>
@jcansdale jcansdale merged commit 8ae29c8 into master Aug 9, 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.

Inline comment margin doesn't appear when viewing file

4 participants