From 9857cdcf52c55eb35f322914bf912acf4d8ce647 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Mon, 15 Jan 2018 10:07:43 +0000 Subject: [PATCH] Advertise Open File in Solution on Inline Comment view Make the `Open File in Solution` command and keyboard shortcut discoverable by advertising on the inline comment view task bar. --- .../ViewModels/InlineCommentPeekViewModel.cs | 13 +++++++++++++ .../Views/InlineCommentPeekView.xaml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs index 9deb23ab05..fc3b745522 100644 --- a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs @@ -75,6 +75,14 @@ public sealed class InlineCommentPeekViewModel : ReactiveObject, IDisposable { FromLine = peekService.GetLineNumber(peekSession, triggerPoint).Item1, })); + + NavigateToEditor = ReactiveCommand.CreateAsyncTask( + Observable.Return(true), + async _ => + { + // TODO: Execute the `openFileInSolutionCommand`. + await Task.Delay(1000); + }); } /// @@ -96,6 +104,11 @@ public ICommentThreadViewModel Thread /// public ReactiveCommand PreviousComment { get; } + /// + /// Gets a command which navigates to the position of this comment in the live editor. + /// + public ReactiveCommand NavigateToEditor { get; } + public void Dispose() { threadSubscription?.Dispose(); diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml index c27c40447b..5c0945ffbc 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml @@ -96,7 +96,20 @@ + + +