From d5f0f4bc32b905d17481d069966f1c89d4f00791 Mon Sep 17 00:00:00 2001 From: Zarana Kiran Desai Date: Mon, 3 Jun 2024 11:22:25 -0700 Subject: [PATCH] expand new insight when added from winlogs page --- tools/PI/DevHome.PI/Models/Insight.cs | 2 ++ tools/PI/DevHome.PI/Pages/InsightsPage.xaml | 2 +- tools/PI/DevHome.PI/ViewModels/WinLogsPageViewModel.cs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/PI/DevHome.PI/Models/Insight.cs b/tools/PI/DevHome.PI/Models/Insight.cs index 313f3a6678..61e819d355 100644 --- a/tools/PI/DevHome.PI/Models/Insight.cs +++ b/tools/PI/DevHome.PI/Models/Insight.cs @@ -23,6 +23,8 @@ public sealed class Insight internal string Description { get; set; } = string.Empty; internal InsightType InsightType { get; set; } = InsightType.Unknown; + + internal bool IsExpanded { get; set; } } internal sealed class InsightRegex diff --git a/tools/PI/DevHome.PI/Pages/InsightsPage.xaml b/tools/PI/DevHome.PI/Pages/InsightsPage.xaml index 5850fca238..361164f8ca 100644 --- a/tools/PI/DevHome.PI/Pages/InsightsPage.xaml +++ b/tools/PI/DevHome.PI/Pages/InsightsPage.xaml @@ -12,7 +12,7 @@ - + diff --git a/tools/PI/DevHome.PI/ViewModels/WinLogsPageViewModel.cs b/tools/PI/DevHome.PI/ViewModels/WinLogsPageViewModel.cs index ea0026b2c4..2e6040742a 100644 --- a/tools/PI/DevHome.PI/ViewModels/WinLogsPageViewModel.cs +++ b/tools/PI/DevHome.PI/ViewModels/WinLogsPageViewModel.cs @@ -193,6 +193,7 @@ private void FindPattern(string message) { if (newInsight is not null) { + newInsight.IsExpanded = true; var insightsPageViewModel = Application.Current.GetService(); insightsPageViewModel.AddInsight(newInsight); InsightsButtonVisibility = Visibility.Visible;