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

Commit 4069376

Browse files
Merge pull request #2077 from github/donokuda/polish-annotation-margin
Update inline review / annotation margin glyph
2 parents adfada0 + 271c2cd commit 4069376

8 files changed

+16
-117
lines changed

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@
102102
<Compile Include="Services\PullRequestSessionManager.cs" />
103103
<Compile Include="Margins\InlineCommentMarginProvider.cs" />
104104
<Compile Include="Services\PullRequestSessionService.cs" />
105-
<Compile Include="Tags\ShowInlineAnnotationGlyph.xaml.cs">
106-
<DependentUpon>ShowInlineAnnotationGlyph.xaml</DependentUpon>
107-
</Compile>
108-
<Compile Include="Tags\ShowInlineCommentAnnotationGlyph.xaml.cs">
109-
<DependentUpon>ShowInlineCommentAnnotationGlyph.xaml</DependentUpon>
110-
</Compile>
111105
<Compile Include="ViewModels\PullRequestFileMarginViewModel.cs" />
112106
<Compile Include="ViewModels\InlineCommentPeekViewModel.cs" />
113107
<Compile Include="ViewModels\PullRequestStatusViewModel.cs" />
@@ -414,14 +408,6 @@
414408
<SubType>Designer</SubType>
415409
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
416410
</Page>
417-
<Page Include="Tags\ShowInlineAnnotationGlyph.xaml">
418-
<Generator>MSBuild:Compile</Generator>
419-
<SubType>Designer</SubType>
420-
</Page>
421-
<Page Include="Tags\ShowInlineCommentAnnotationGlyph.xaml">
422-
<Generator>MSBuild:Compile</Generator>
423-
<SubType>Designer</SubType>
424-
</Page>
425411
<Page Include="Views\PullRequestFileMarginView.xaml">
426412
<SubType>Designer</SubType>
427413
<Generator>MSBuild:Compile</Generator>

src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,7 @@ static UserControl CreateGlyph(InlineCommentTag tag)
5959

6060
if (showTag != null)
6161
{
62-
if (showTag.Thread != null && showTag.Annotations != null)
63-
{
64-
return new ShowInlineCommentAnnotationGlyph();
65-
}
66-
67-
if (showTag.Thread != null)
68-
{
69-
return new ShowInlineCommentGlyph
70-
{
71-
Opacity = showTag.Thread.IsStale ? 0.5 : 1,
72-
};
73-
}
74-
75-
if (showTag.Annotations != null)
76-
{
77-
return new ShowInlineAnnotationGlyph();
78-
}
79-
80-
throw new ArgumentException($"{nameof(showTag)} does not have a thread or annotations");
62+
return new ShowInlineCommentGlyph();
8163
}
8264

8365
throw new ArgumentException($"Unknown 'InlineCommentTag' type '{tag}'");

src/GitHub.InlineReviews/Tags/ShowInlineAnnotationGlyph.xaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/GitHub.InlineReviews/Tags/ShowInlineAnnotationGlyph.xaml.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/GitHub.InlineReviews/Tags/ShowInlineCommentAnnotationGlyph.xaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/GitHub.InlineReviews/Tags/ShowInlineCommentAnnotationGlyph.xaml.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/GitHub.InlineReviews/Tags/ShowInlineCommentGlyph.xaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,25 @@
99
<Grid>
1010
<Border Background="{DynamicResource GitHubGlyphMarginCommentableBackground}" BorderThickness="0,0,1,0" />
1111
<Viewbox HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,1,0,0">
12-
<Canvas Width="16" Height="15">
13-
<Path Canvas.Top="1" Canvas.Left="0.85"
14-
Data="M1,0 C0.45,0 0,0.45 0,1 L0,9 C0,9.55 0.45,10 1,10 L3,10 L3,13.5 L6.5,10 L13,10 C13.55,10 14,9.55 14,9 L14,1 C14,0.45 13.55,0 13,0 L1,0 Z" />
15-
<Path Canvas.Top="1" Canvas.Left="0.85" Opacity="0.163" Stroke="#313131"
16-
Data="M3.5,12.2928932 L6.29289322,9.5 L13,9.5 C13.2738576,9.5 13.5,9.27385763 13.5,9 L13.5,1 C13.5,0.726142375 13.2738576,0.5 13,0.5 L1,0.5 C0.726142375,0.5 0.5,0.726142375 0.5,1 L0.5,9 C0.5,9.27385763 0.726142375,9.5 1,9.5 L3.5,9.5 L3.5,12.2928932 Z" />
12+
<Canvas Width="16" Height="16">
1713
<Canvas.Resources>
1814
<Style TargetType="Path">
1915
<Setter Property="Fill" Value="{DynamicResource GitHubDiffGlyphFill.None}" />
16+
<Setter Property="Stroke" Value="{DynamicResource GitHubDiffGlyphFill.None}" />
2017
</Style>
2118
</Canvas.Resources>
19+
20+
<Rectangle Width="8"
21+
Height="8"
22+
Canvas.Top="2.3"
23+
Canvas.Left="2.3"
24+
Fill="#959da5"
25+
Stroke="White"
26+
StrokeThickness="1">
27+
<Rectangle.LayoutTransform>
28+
<RotateTransform Angle="-45" />
29+
</Rectangle.LayoutTransform>
30+
</Rectangle>
2231
</Canvas>
2332
</Viewbox>
2433
</Grid>

src/GitHub.VisualStudio.UI/Views/CommentView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
AcceptsReturn="True"
167167
AcceptsTab="True"
168168
IsReadOnly="{Binding IsReadOnly}"
169-
Margin="4 0"
169+
Margin="4 0 4 4"
170170
Text="{Binding Body, UpdateSourceTrigger=PropertyChanged}"
171171
TextWrapping="Wrap"
172172
VerticalAlignment="Center"

0 commit comments

Comments
 (0)