<commit_before>﻿<UserControl x:Class="GitHub.VisualStudio.Views.GitHubPane.PullRequestAnnotationsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ghfvs="https://github.com/github/VisualStudio"
             xmlns:local="clr-namespace:GitHub.VisualStudio.Views.GitHubPane"
             xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI"
             xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"  
             xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
             mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="300">

    <d:DesignData.DataContext>
        <ghfvs:PullRequestAnnotationsViewModelDesigner />
    </d:DesignData.DataContext>

    <Control.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Control.Resources>

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel>
            <StackPanel DockPanel.Dock="Top" Margin="8 0" Orientation="Vertical">
                <TextBlock FontSize="16" VerticalAlignment="Center">
                        <Run FontWeight="SemiBold" Text="{Binding CheckSuiteName, Mode=OneWay}"/>
                        <Run Text="/"/>
                        <Run FontWeight="SemiBold" Text="{Binding CheckRunName, Mode=OneWay}"/>

                        <Run>for</Run>

                        <Hyperlink Command="{Binding NavigateToPullRequest}">
                            <Run>#</Run><Run Text="{Binding PullRequestNumber, Mode=OneWay}"/>
                        </Hyperlink>
                </TextBlock>

                <TextBlock Foreground="{DynamicResource GitHubVsGrayText}"
                           Margin="0"
                           Text="{Binding PullRequestTitle}"
                           TextWrapping="Wrap"/>

                <markdig:MarkdownViewer FontFamily="Consolas"
                                        Visibility="{Binding CheckRunSummary, Converter={ghfvs:NullOrWhitespaceToVisibilityConverter}}"
                                        Markdown="{Binding CheckRunSummary}" />

                <TextBlock FontFamily="Consolas" 
                           Foreground="{DynamicResource VsBrush.GrayText}"
                           Visibility="{Binding CheckRunText, Converter={ghfvs:NullOrWhitespaceToVisibilityConverter}}">
                    <Run Text="{Binding CheckRunText, Mode=OneWay}"/>
                </TextBlock>

                <Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="-8 4"/>

                <ItemsControl Margin="-4 0"  ItemsSource="{Binding AnnotationsDictionary}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Expander><commit_msg>Adding expanders to the annotations view<commit_after>﻿<UserControl x:Class="GitHub.VisualStudio.Views.GitHubPane.PullRequestAnnotationsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ghfvs="https://github.com/github/VisualStudio"
             xmlns:local="clr-namespace:GitHub.VisualStudio.Views.GitHubPane"
             xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI"
             xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"  
             xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
             mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="300">

    <d:DesignData.DataContext>
        <ghfvs:PullRequestAnnotationsViewModelDesigner />
    </d:DesignData.DataContext>

    <Control.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
                <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/Assets/Markdown.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Control.Resources>

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel>
            <StackPanel DockPanel.Dock="Top" Margin="8 0" Orientation="Vertical">
                <TextBlock FontSize="16" VerticalAlignment="Center">
                        <Run FontWeight="SemiBold" Text="{Binding CheckSuiteName, Mode=OneWay}"/>
                        <Run Text="/"/>
                        <Run FontWeight="SemiBold" Text="{Binding CheckRunName, Mode=OneWay}"/>

                        <Run>for</Run>

                        <Hyperlink Command="{Binding NavigateToPullRequest}">
                            <Run>#</Run><Run Text="{Binding PullRequestNumber, Mode=OneWay}"/>
                        </Hyperlink>
                </TextBlock>

                <TextBlock Foreground="{DynamicResource GitHubVsGrayText}"
                           Margin="0"
                           Text="{Binding PullRequestTitle}"
                           TextWrapping="Wrap"/>

                <Expander Header="Body"
                          Visibility="{Binding CheckRunSummary, Converter={ghfvs:NullOrWhitespaceToVisibilityConverter}}">
                    <markdig:MarkdownViewer FontFamily="Consolas" Markdown="{Binding CheckRunSummary}" />
                </Expander>

                <Expander Header="Details"
                          Visibility="{Binding CheckRunText, Converter={ghfvs:NullOrWhitespaceToVisibilityConverter}}">
                    <TextBlock FontFamily="Consolas" 
                           Foreground="{DynamicResource VsBrush.GrayText}">
                        <Run Text="{Binding CheckRunText, Mode=OneWay}"/>
                    </TextBlock>
                </Expander>

                <Rectangle Fill="{DynamicResource GitHubHeaderSeparatorBrush}" Height="1" Margin="-8 4"/>

                <ItemsControl Margin="-4 0"  ItemsSource="{Binding AnnotationsDictionary}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Expander>
{'fraction_non_alphanumeric': 0.11784211197551332, 'fraction_numerical': 0.008162224206096162, 'mean_word_length': 2.2661391087047065, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2372889', 'n_tokens_mistral': 2206, 'n_tokens_neox': 1966, 'n_words': 222}