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

Commit c75b321

Browse files
committed
Show warning on comment thread resolved
Show, "This conversation was marked as resolved" on peek view when conversation has been marked as resolved.
1 parent 8e4a5a9 commit c75b321

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed

src/GitHub.App/ViewModels/PullRequestReviewCommentThreadViewModel.cs

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public IPullRequestSessionFile File
7070
/// <inheritdoc/>
7171
public DiffSide Side { get; private set; }
7272

73+
/// <inheritdoc/>
74+
public bool IsResolved { get; private set; }
75+
7376
public bool IsNewThread
7477
{
7578
get => isNewThread;
@@ -97,6 +100,7 @@ public async Task InitializeAsync(
97100
File = file;
98101
LineNumber = thread.LineNumber;
99102
Side = thread.DiffLineType == DiffChangeType.Delete ? DiffSide.Left : DiffSide.Right;
103+
IsResolved = thread.IsResolved;
100104

101105
foreach (var comment in thread.Comments)
102106
{

src/GitHub.Exports.Reactive/ViewModels/IPullRequestReviewCommentThreadViewModel.cs

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public interface IPullRequestReviewCommentThreadViewModel : ICommentThreadViewMo
3636
/// </summary>
3737
DiffSide Side { get; }
3838

39+
/// <summary>
40+
/// Gets a value indicating whether comment thread has been marked as resolved by a user.
41+
/// </summary>
42+
bool IsResolved { get; }
43+
3944
/// <summary>
4045
/// Gets a value indicating whether the thread is a new thread being authored, that is not
4146
/// yet present on the server.

src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml

+19
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@
6363
</DockPanel>
6464
</Border>
6565

66+
<Border DockPanel.Dock="Top"
67+
Background="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"
68+
Padding="8">
69+
<Border.Style>
70+
<Style TargetType="Border">
71+
<Setter Property="Visibility" Value="Collapsed"/>
72+
<Style.Triggers>
73+
<DataTrigger Binding="{Binding Thread.IsResolved}" Value="True">
74+
<Setter Property="Visibility" Value="Visible"/>
75+
</DataTrigger>
76+
</Style.Triggers>
77+
</Style>
78+
</Border.Style>
79+
<DockPanel>
80+
<ui:OcticonImage DockPanel.Dock="Left" Icon="info" Margin="0 0 8 0"/>
81+
<TextBlock TextWrapping="Wrap" Text="{x:Static ghfvs:Resources.ThisConversationWasMarkedAsResolved}"/>
82+
</DockPanel>
83+
</Border>
84+
6685
<Border DockPanel.Dock="Top"
6786
BorderThickness="0 0 0 1"
6887
Background="{DynamicResource VsBrush.CommandBarOptionsBackground}"

src/GitHub.Resources/Resources.Designer.cs

+10-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.Resources/Resources.resx

+3
Original file line numberDiff line numberDiff line change
@@ -881,4 +881,7 @@ https://git-scm.com/download/win</value>
881881
<data name="AndOthers" xml:space="preserve">
882882
<value>and others</value>
883883
</data>
884+
<data name="ThisConversationWasMarkedAsResolved" xml:space="preserve">
885+
<value>This conversation was marked as resolved</value>
886+
</data>
884887
</root>

0 commit comments

Comments
 (0)