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

Commit 21aa934

Browse files
donokudaStanleyGoldman
authored andcommitted
Group things by file
1 parent a6f8a46 commit 21aa934

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

src/GitHub.VisualStudio.UI/Views/GitHubPane/PullRequestAnnotationsView.xaml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,49 @@
4242
Margin="0"
4343
Text="{Binding PullRequestTitle}"
4444
TextWrapping="Wrap"/>
45-
<StackPanel Orientation="Horizontal" Margin="0 4">
46-
</StackPanel>
45+
<Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="0 4"/>
4746

4847
<ItemsControl ItemsSource="{Binding AnnotationsDictionary}">
4948
<ItemsControl.ItemTemplate>
5049
<DataTemplate>
5150
<StackPanel>
52-
<Label Content="{Binding Key}"></Label>
51+
<Expander>
52+
<Expander.Header>
53+
<Label Content="{Binding Key}"></Label>
54+
</Expander.Header>
5355

56+
<ItemsControl ItemsSource="{Binding Value}">
57+
<ItemsControl.ItemTemplate>
58+
<DataTemplate>
59+
<StackPanel Margin="22 0 0 0">
60+
<StackPanel Orientation="Horizontal">
61+
<ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="search" Foreground="CornflowerBlue" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Notice}}"/>
62+
<ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="alert" Foreground="#f1c647" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Warning}}"/>
63+
<ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="x" Foreground="#cb2431" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Failure}}"/>
64+
<TextBlock FontWeight="SemiBold" Margin="2 0">
65+
<Run Text="{Binding Annotation.Title, Mode=OneWay}"/>
66+
</TextBlock>
67+
</StackPanel>
68+
69+
<StackPanel Margin="21 4 0 4">
70+
<TextBlock Margin="5 4 0 0">
71+
<Run Text="{Binding Annotation.Path, Mode=OneWay}"/>
72+
<Run FontWeight="SemiBold" Text="{Binding LineDescription, Mode=OneWay}"/>
73+
</TextBlock>
74+
<markdig:MarkdownViewer Margin="5 0 0 0" Markdown="{Binding Annotation.Message}"/>
75+
</StackPanel>
76+
</StackPanel>
77+
</DataTemplate>
78+
</ItemsControl.ItemTemplate>
79+
</ItemsControl>
80+
</Expander>
81+
</StackPanel>
82+
83+
<!--
5484
<ItemsControl ItemsSource="{Binding Value}">
5585
<ItemsControl.ItemTemplate>
5686
<DataTemplate>
5787
<StackPanel>
58-
<Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="0 4"/>
5988
6089
<Expander Margin="0 0 4 0" Foreground="{DynamicResource GitHubVsToolWindowText}" IsExpanded="{Binding IsExpanded, Mode=OneTime}">
6190
<Expander.Header>
@@ -81,6 +110,7 @@
81110
</ItemsControl.ItemTemplate>
82111
</ItemsControl>
83112
</StackPanel>
113+
-->
84114

85115
</DataTemplate>
86116
</ItemsControl.ItemTemplate>

0 commit comments

Comments
 (0)