Skip to content

Commit d641e73

Browse files
Merge pull request #295 from erikdarlingdata/revert/insight-cards
Revert insight card style refactor (#294)
2 parents 8495b24 + b1e6519 commit d641e73

2 files changed

Lines changed: 33 additions & 37 deletions

File tree

src/PlanViewer.App/Controls/PlanViewerControl.axaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
x:Class="PlanViewer.App.Controls.PlanViewerControl"
44
Background="{DynamicResource BackgroundBrush}">
5-
<UserControl.Styles>
6-
<Style Selector="Border.InsightCard">
7-
<Setter Property="Background" Value="{DynamicResource InsightCardBackgroundBrush}"/>
8-
<Setter Property="BorderBrush" Value="{DynamicResource InsightCardBorderBrush}"/>
9-
<Setter Property="BorderThickness" Value="1"/>
10-
<Setter Property="CornerRadius" Value="8"/>
11-
<Setter Property="BoxShadow" Value="0 4 12 0 #60000000"/>
12-
<Setter Property="Padding" Value="12,8,12,10"/>
13-
<Setter Property="Margin" Value="0,0,8,0"/>
14-
</Style>
15-
<Style Selector="TextBlock.InsightHeader">
16-
<Setter Property="FontSize" Value="14"/>
17-
<Setter Property="FontWeight" Value="SemiBold"/>
18-
<Setter Property="Margin" Value="0,0,0,8"/>
19-
</Style>
20-
</UserControl.Styles>
215
<Grid>
226
<Grid.RowDefinitions>
237
<RowDefinition Height="Auto"/>
@@ -90,7 +74,7 @@
9074
FontWeight="SemiBold"
9175
Foreground="{DynamicResource ForegroundBrush}"/>
9276
</Expander.Header>
93-
<Grid MaxHeight="240" Margin="8,4,8,8" HorizontalAlignment="Stretch">
77+
<Grid MaxHeight="220" HorizontalAlignment="Stretch">
9478
<Grid.ColumnDefinitions>
9579
<ColumnDefinition Width="Auto" MinWidth="0"/>
9680
<ColumnDefinition Width="Auto" MinWidth="180"/>
@@ -100,14 +84,18 @@
10084
</Grid.ColumnDefinitions>
10185

10286
<!-- Server Context (first, placeholder when no metadata) -->
103-
<Border x:Name="ServerContextBorder" Grid.Column="0" Classes="InsightCard"
87+
<Border x:Name="ServerContextBorder" Grid.Column="0" Padding="10,4,10,8"
88+
Background="#1A1A2D"
89+
BorderBrush="#3A3A5A" BorderThickness="0,0,1,0"
10490
IsVisible="False">
10591
<ScrollViewer VerticalScrollBarVisibility="Auto"
10692
HorizontalScrollBarVisibility="Disabled">
10793
<StackPanel>
108-
<TextBlock Classes="InsightHeader"
109-
Text="Server Context"
110-
Foreground="#9B9BFF"/>
94+
<TextBlock Text="Server Context"
95+
FontSize="13"
96+
FontWeight="SemiBold"
97+
Foreground="#9B9BFF"
98+
Margin="0,0,0,6"/>
11199
<StackPanel x:Name="ServerContextContent"/>
112100
<TextBlock x:Name="ServerContextEmpty"
113101
Text="Run Repro Script to capture server context"
@@ -118,12 +106,16 @@
118106
</Border>
119107

120108
<!-- Runtime Summary -->
121-
<Border Grid.Column="1" Classes="InsightCard">
109+
<Border Grid.Column="1" Padding="10,4,10,8"
110+
Background="{DynamicResource BackgroundDarkBrush}"
111+
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,1,0">
122112
<StackPanel>
123113
<TextBlock x:Name="RuntimeSummaryTitle"
124-
Classes="InsightHeader"
125114
Text="Runtime Summary"
126-
Foreground="{DynamicResource ForegroundBrush}"/>
115+
FontSize="13"
116+
FontWeight="SemiBold"
117+
Foreground="{DynamicResource ForegroundBrush}"
118+
Margin="0,0,0,4"/>
127119
<StackPanel x:Name="RuntimeSummaryContent"/>
128120
<TextBlock x:Name="RuntimeSummaryEmpty"
129121
Text="Estimated plan — no runtime stats"
@@ -133,14 +125,17 @@
133125
</Border>
134126

135127
<!-- Missing Indexes (center) -->
136-
<Border Grid.Column="2" Classes="InsightCard">
128+
<Border Grid.Column="2" Padding="10,4,10,8"
129+
Background="#3D2A0E"
130+
BorderBrush="#7A5A1E" BorderThickness="0,0,1,0">
137131
<ScrollViewer VerticalScrollBarVisibility="Auto"
138132
HorizontalScrollBarVisibility="Disabled">
139133
<StackPanel>
140134
<TextBlock x:Name="MissingIndexHeader"
141-
Classes="InsightHeader"
142135
Text="Missing Index Suggestions"
143-
Foreground="#FFB347"/>
136+
FontSize="13"
137+
FontWeight="SemiBold" Foreground="#FFB347"
138+
Margin="0,0,0,6"/>
144139
<StackPanel x:Name="MissingIndexContent"/>
145140
<TextBlock x:Name="MissingIndexEmpty"
146141
Text="No missing index suggestions"
@@ -151,14 +146,17 @@
151146
</Border>
152147

153148
<!-- Parameters -->
154-
<Border Grid.Column="3" Classes="InsightCard">
149+
<Border Grid.Column="3" Padding="10,4,10,8"
150+
Background="#1A2D1A"
151+
BorderBrush="#3A5A3A" BorderThickness="0,0,1,0">
155152
<ScrollViewer VerticalScrollBarVisibility="Auto"
156153
HorizontalScrollBarVisibility="Disabled">
157154
<StackPanel>
158155
<TextBlock x:Name="ParametersHeader"
159-
Classes="InsightHeader"
160156
Text="Parameters"
161-
Foreground="#7BCF7B"/>
157+
FontSize="13"
158+
FontWeight="SemiBold" Foreground="#7BCF7B"
159+
Margin="0,0,0,6"/>
162160
<StackPanel x:Name="ParametersContent"/>
163161
<TextBlock x:Name="ParametersEmpty"
164162
Text="No parameters"
@@ -169,14 +167,16 @@
169167
</Border>
170168

171169
<!-- Wait Stats (right, fills remaining space) -->
172-
<Border Grid.Column="4" Classes="InsightCard" Margin="0">
170+
<Border Grid.Column="4" Padding="10,4,10,8"
171+
Background="#1A2A3D">
173172
<ScrollViewer VerticalScrollBarVisibility="Auto"
174173
HorizontalScrollBarVisibility="Auto">
175174
<StackPanel>
176175
<TextBlock x:Name="WaitStatsHeader"
177-
Classes="InsightHeader"
178176
Text="Wait Stats"
179-
Foreground="#4FA3FF"/>
177+
FontSize="13"
178+
FontWeight="SemiBold" Foreground="#4FA3FF"
179+
Margin="0,0,0,6"/>
180180
<StackPanel x:Name="WaitStatsContent"/>
181181
<TextBlock x:Name="WaitStatsEmpty"
182182
Text="No wait stats (estimated plan)"

src/PlanViewer.App/Themes/DarkTheme.axaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
<SolidColorBrush x:Key="BorderBrush" Color="#3A3D45"/>
99
<SolidColorBrush x:Key="AccentBrush" Color="#2eaef1"/>
1010

11-
<!-- Insight card surfaces (lifted from BackgroundDarkBrush so cards visibly float) -->
12-
<SolidColorBrush x:Key="InsightCardBackgroundBrush" Color="#1E2228"/>
13-
<SolidColorBrush x:Key="InsightCardBorderBrush" Color="#353942"/>
14-
1511
<!-- Fluent theme accent override: TabItem selected underline, focus rings, etc. -->
1612
<Color x:Key="SystemAccentColor">#2eaef1</Color>
1713
<Color x:Key="SystemAccentColorDark1">#2596d4</Color>

0 commit comments

Comments
 (0)