|
6 | 6 | xmlns:ghfvs="https://github.com/github/VisualStudio" |
7 | 7 | xmlns:local="clr-namespace:GitHub.VisualStudio.Views.GitHubPane" |
8 | 8 | xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI" |
| 9 | + xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" |
| 10 | + xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" |
9 | 11 | xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf" |
10 | 12 | mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="300"> |
11 | 13 |
|
|
29 | 31 | <StackPanel DockPanel.Dock="Top" Margin="8 0" Orientation="Vertical"> |
30 | 32 | <TextBlock FontSize="16" VerticalAlignment="Center"> |
31 | 33 | <Run FontWeight="SemiBold" Text="{Binding CheckSuiteName, Mode=OneWay}"/> |
32 | | - </TextBlock> |
33 | | - <TextBlock FontSize="16" VerticalAlignment="Center"> |
| 34 | + <Run Text="/"/> |
34 | 35 | <Run FontWeight="SemiBold" Text="{Binding CheckRunName, Mode=OneWay}"/> |
| 36 | + |
35 | 37 | <Run>for</Run> |
| 38 | + |
36 | 39 | <Hyperlink Command="{Binding NavigateToPullRequest}"> |
37 | 40 | <Run>#</Run><Run Text="{Binding PullRequestNumber, Mode=OneWay}"/> |
38 | 41 | </Hyperlink> |
|
42 | 45 | Margin="0" |
43 | 46 | Text="{Binding PullRequestTitle}" |
44 | 47 | TextWrapping="Wrap"/> |
45 | | - <StackPanel Orientation="Horizontal" Margin="0 4"> |
46 | | - </StackPanel> |
| 48 | + <Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="-8 4"/> |
47 | 49 |
|
48 | | - <ItemsControl ItemsSource="{Binding AnnotationsDictionary}"> |
| 50 | + <ItemsControl Margin="-4 0" ItemsSource="{Binding AnnotationsDictionary}"> |
49 | 51 | <ItemsControl.ItemTemplate> |
50 | 52 | <DataTemplate> |
51 | 53 | <StackPanel> |
52 | | - <Label Content="{Binding Key}"></Label> |
| 54 | + <Expander> |
| 55 | + <Expander.Header> |
| 56 | + <Label Content="{Binding Key}" FontWeight="SemiBold" ToolTip="{Binding Key}" /> |
| 57 | + </Expander.Header> |
| 58 | + |
| 59 | + <ItemsControl ItemsSource="{Binding Value}"> |
| 60 | + <ItemsControl.ItemTemplate> |
| 61 | + <DataTemplate> |
| 62 | + <Grid Margin="22 0 0 8" > |
| 63 | + <Grid.ColumnDefinitions> |
| 64 | + <ColumnDefinition Width="16" /> |
| 65 | + <ColumnDefinition Width="*" /> |
| 66 | + </Grid.ColumnDefinitions> |
| 67 | + |
| 68 | + <StackPanel Grid.Column="0" VerticalAlignment="Center"> |
| 69 | + <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.StatusInformation}" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Notice}}"/> |
| 70 | + <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.StatusWarning}" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Warning}}"/> |
| 71 | + <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.StatusError}" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Failure}}"/> |
| 72 | + </StackPanel> |
| 73 | + |
| 74 | + <StackPanel Margin="8,0,0,0" Grid.Column="1"> |
| 75 | + <TextBlock FontWeight="SemiBold" Grid.Row="0"> |
| 76 | + <Run Text="{Binding Annotation.Title, Mode=OneWay}"/> |
| 77 | + </TextBlock> |
53 | 78 |
|
54 | | - <ItemsControl ItemsSource="{Binding Value}"> |
55 | | - <ItemsControl.ItemTemplate> |
56 | | - <DataTemplate> |
57 | | - <StackPanel> |
58 | | - <Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="0 4"/> |
| 79 | + <TextBlock FontFamily="Consolas" Foreground="{DynamicResource VsBrush.GrayText}" Grid.Row="1" Visibility="{Binding IsFileInPullRequest, Converter={ghfvs:BooleanToVisibilityConverter}}"> |
| 80 | + <Hyperlink Command="{Binding OpenAnnotation}"> |
| 81 | + <Run Text="Line" /> |
| 82 | + <Run Text="{Binding LineDescription, Mode=OneWay}"/> |
| 83 | + </Hyperlink> |
| 84 | + </TextBlock> |
59 | 85 |
|
60 | | - <Expander Margin="0 0 4 0" Foreground="{DynamicResource GitHubVsToolWindowText}" IsExpanded="{Binding IsExpanded, Mode=OneTime}"> |
61 | | - <Expander.Header> |
62 | | - <StackPanel Orientation="Horizontal"> |
63 | | - <ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="search" Foreground="CornflowerBlue" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Notice}}"/> |
64 | | - <ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="alert" Foreground="#f1c647" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Warning}}"/> |
65 | | - <ghfvs:OcticonImage Margin="0 0 0 0" MinWidth="20" Icon="x" Foreground="#cb2431" Visibility="{Binding Annotation.AnnotationLevel, Converter={ghfvs:EqualsToVisibilityConverter Failure}}"/> |
66 | | - <TextBlock FontWeight="SemiBold" Margin="2 0"> |
67 | | - <Run Text="{Binding Annotation.Title, Mode=OneWay}"/> |
68 | | - </TextBlock> |
69 | | - </StackPanel> |
70 | | - </Expander.Header> |
71 | | - <StackPanel Margin="21 4 0 4"> |
72 | | - <TextBlock Margin="5 4 0 0"> |
73 | | - <Run Text="{Binding Annotation.Path, Mode=OneWay}"/> |
74 | | - <Run FontWeight="SemiBold" Text="{Binding LineDescription, Mode=OneWay}"/> |
| 86 | + <TextBlock FontFamily="Consolas" Foreground="{DynamicResource VsBrush.GrayText}" Grid.Row="1" Visibility="{Binding IsFileInPullRequest, Converter={ghfvs:BooleanToInverseVisibilityConverter}}"> |
| 87 | + <Run Text="Line" /> |
| 88 | + <Run Text="{Binding LineDescription, Mode=OneWay}"/> |
75 | 89 | </TextBlock> |
76 | | - <markdig:MarkdownViewer Margin="5 0 0 0" Markdown="{Binding Annotation.Message}"/> |
| 90 | + |
| 91 | + <markdig:MarkdownViewer Grid.Column="1" Grid.Row="2" |
| 92 | + FontFamily="Consolas" Markdown="{Binding Annotation.Message}" /> |
77 | 93 | </StackPanel> |
78 | | - </Expander> |
79 | | - </StackPanel> |
80 | | - </DataTemplate> |
81 | | - </ItemsControl.ItemTemplate> |
82 | | - </ItemsControl> |
| 94 | + </Grid> |
| 95 | + </DataTemplate> |
| 96 | + </ItemsControl.ItemTemplate> |
| 97 | + </ItemsControl> |
| 98 | + </Expander> |
83 | 99 | </StackPanel> |
84 | | - |
85 | 100 | </DataTemplate> |
86 | 101 | </ItemsControl.ItemTemplate> |
87 | 102 | </ItemsControl> |
|
0 commit comments