From 389fc88aa07ccc4c538553357d089ae34ae33f2c Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Thu, 21 May 2026 15:46:10 -0400 Subject: [PATCH] fix(palettes): reorder DeepDrftPalettes static props so Light/Dark/Typography init before Default/Cms (fixes null MudTheme NRE) --- .../Common/DeepDrftPalettes.cs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/DeepDrftShared.Client/Common/DeepDrftPalettes.cs b/DeepDrftShared.Client/Common/DeepDrftPalettes.cs index 830c295..48145cc 100644 --- a/DeepDrftShared.Client/Common/DeepDrftPalettes.cs +++ b/DeepDrftShared.Client/Common/DeepDrftPalettes.cs @@ -17,28 +17,6 @@ namespace DeepDrftShared.Client.Common; #pragma warning disable CS8601 public static class DeepDrftPalettes { - /// - /// The single MudTheme exposing both light and dark palettes plus typography. - /// Hosts pick a mode via MudThemeProvider IsDarkMode. - /// - public static MudTheme Default { get; } = new() - { - PaletteLight = Light, - PaletteDark = Dark, - Typography = Typography, - }; - - /// - /// CMS-specific MudTheme. Same as but with a solid navy AppBar - /// on the light palette to visually distinguish the admin surface from the public site. - /// - public static MudTheme Cms { get; } = new() - { - PaletteLight = CmsLight, - PaletteDark = Dark, - Typography = Typography, - }; - // Wireframe light palette - navy / green / warm off-white public static PaletteLight Light { get; } = new() { @@ -148,5 +126,27 @@ public static class DeepDrftPalettes Caption = new CaptionTypography { FontFamily = new[] { "Geist Mono", "monospace" } }, Button = new ButtonTypography { FontFamily = new[] { "Geist Mono", "monospace" } }, }; + + /// + /// The single MudTheme exposing both light and dark palettes plus typography. + /// Hosts pick a mode via MudThemeProvider IsDarkMode. + /// + public static MudTheme Default { get; } = new() + { + PaletteLight = Light, + PaletteDark = Dark, + Typography = Typography, + }; + + /// + /// CMS-specific MudTheme. Same as but with a solid navy AppBar + /// on the light palette to visually distinguish the admin surface from the public site. + /// + public static MudTheme Cms { get; } = new() + { + PaletteLight = CmsLight, + PaletteDark = Dark, + Typography = Typography, + }; } #pragma warning restore CS8601