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

Commit b6c805f

Browse files
committed
Show different message when PR not checked out
Let the user know they need to check out PR branch before navigating to editor.
1 parent 7b36cb4 commit b6c805f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/GitHub.VisualStudio.UI/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.VisualStudio.UI/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,7 @@
404404
<data name="NavigateToEditorStatusMessage" xml:space="preserve">
405405
<value>Press Enter to navigate to Editor</value>
406406
</data>
407+
<data name="NavigateToEditorNotCheckedOutStatusMessage" xml:space="preserve">
408+
<value>Checkout PR branch and press Enter to navigate to Editor</value>
409+
</data>
407410
</root>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ void EnableNavigateToEditor(IWpfTextView textView, IPullRequestFileNode file)
251251
var view = EditorAdaptersFactoryService.GetViewAdapter(textView);
252252
EnableNavigateToEditor(view, file);
253253

254+
var statusMessage = ViewModel.IsCheckedOut ?
255+
UI.Resources.NavigateToEditorStatusMessage : UI.Resources.NavigateToEditorNotCheckedOutStatusMessage;
254256
textView.GotAggregateFocus += (s, e) =>
255-
StatusBarNotificationService.ShowMessage(UI.Resources.NavigateToEditorStatusMessage);
257+
StatusBarNotificationService.ShowMessage(statusMessage);
256258

257259
textView.LostAggregateFocus += (s, e) =>
258260
StatusBarNotificationService.ShowMessage(string.Empty);

0 commit comments

Comments
 (0)