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

Commit 2c8a718

Browse files
authored
Merge pull request #913 from github/fixes/912-diff-tooltip
Make PR changes diff file tooltip and caption consistent with Team Explorer
2 parents 979c0b7 + 8d38e27 commit 2c8a718

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/GitHub.VisualStudio/UI/Views/PullRequestDetailView.xaml.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ async Task DoDiffFile(IPullRequestFileNode file)
8686
try
8787
{
8888
var fileNames = await ViewModel.ExtractDiffFiles(file);
89-
var leftLabel = $"{file.FileName};{ViewModel.TargetBranchDisplayName}";
90-
var rightLabel = $"{file.FileName};PR {ViewModel.Model.Number}";
89+
var leftLabel = $"{file.FileName};{ViewModel.TargetBranchDisplayName}";
90+
var rightLabel = $"{file.FileName};PR {ViewModel.Model.Number}";
91+
var caption = $"Diff - {file.FileName}";
92+
var tooltip = $"{leftLabel}\nvs.\n{rightLabel}";
9193

92-
Services.DifferenceService.OpenComparisonWindow2(
94+
Services.DifferenceService.OpenComparisonWindow2(
9395
fileNames.Item1,
9496
fileNames.Item2,
95-
$"{leftLabel} vs {rightLabel}",
96-
file.DirectoryPath,
97+
caption,
98+
tooltip,
9799
leftLabel,
98100
rightLabel,
99101
string.Empty,

0 commit comments

Comments
 (0)