Skip to content

Commit 651f941

Browse files
csharpfritzCopilot
andcommitted
docs: update Rogue history and flag Font.Name/Names gap
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5f052fa commit 651f941

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.ai-team/agents/rogue/history.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,29 @@ Wrote 8 bUnit tests in `src/BlazorWebFormsComponents.Test/LinkButton/CssClass.ra
115115
📌 Edge case: `GetCssClassOrNull()` uses `string.IsNullOrEmpty()` not `IsNullOrWhiteSpace()` — whitespace-only CssClass like " " would render `class=" "`. Not a blocker for #379 but noted for future audit. — Rogue
116116

117117
Team update (2026-02-28): Cyclops fixed MenuItemStyle Font- attributes (SetFontsFromAttributes call in OnInitialized) and CheckBox bare input missing id attribute may warrant additional test coverage. Issue #379 confirmed already fixed in M15.
118+
119+
### M20 Skins & Themes Pipeline Tests (Issue #368)
120+
121+
Wrote 13 bUnit end-to-end tests in `src/BlazorWebFormsComponents.Test/Theming/ThemingPipelineTests.razor` validating the ThemeProvider → BaseWebFormsComponent → BaseStyledComponent pipeline using real components (Button, Label, Panel):
122+
123+
1. `DefaultSkin_AppliesBackColor_ToButton` — default skin applies BackColor via `#FFDEAD`
124+
2. `NamedSkin_AppliesVia_SkinID` — SkinID="highlight" selects named skin with BackColor + Font.Bold
125+
3. `ExplicitValue_OverridesTheme_StyleSheetThemeSemantics` — explicit BackColor="Red" overrides theme Blue
126+
4. `EnableThemingFalse_IgnoresTheme` — EnableTheming=false skips all theme application
127+
5. `NoThemeProvider_WorksNormally` — Button renders normally without ThemeProvider
128+
6. `MissingSkinID_DoesNotThrow_FallsBackGracefully` — SkinID="nonexistent" silently skips
129+
7. `NestedThemeProvider_InnerOverridesOuter` — inner ThemeProvider wins for its children
130+
8. `Theme_AppliesForeColor_ToPanel` — ForeColor on Panel div
131+
9. `Theme_AppliesCssClass_ToLabel` — CssClass on Label span
132+
10. `Theme_AppliesWidthAndHeight_ToButton` — Width/Height on Button input
133+
11. `Theme_AppliesFontProperties_ToLabel` — Bold, Italic, Underline on Label span
134+
12. `MultipleControlTypes_ThemedSimultaneously` — Button+Label+Panel in same ThemeProvider
135+
13. `ExplicitCssClass_OverridesThemeCssClass` — explicit CssClass beats theme CssClass
136+
137+
Total: 1426 tests (1413 existing + 13 new), 0 failures.
138+
139+
📌 Bug found: `ApplyThemeSkin` sets `Font.Name` but the style builder reads `Font.Names` for `font-family` rendering. Theme font-family does not render. Not blocking — deferred to M11 skin implementation. — Rogue
140+
141+
📌 Test pattern: Button renders as `<input>`, Label as `<span>`, Panel as `<div>`. For theme pipeline tests, use `cut.Find("input")`, `cut.Find("span")`, `cut.Find("div")` respectively. Style attribute contains CSS properties like `background-color:Red`, `color:Blue`, `font-weight:bold`. — Rogue
142+
143+
📌 Test pattern: Missing SkinID (named skin not registered) returns null from `GetSkin()` — no skin applied at all, not even the default skin for that control type. This is by design per Jeff's decision. — Rogue
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Decision: Font.Name vs Font.Names gap in ApplyThemeSkin
2+
3+
**Date:** 2026-03-01
4+
**By:** Rogue (QA Analyst)
5+
**Scope:** `BaseStyledComponent.ApplyThemeSkin` + `HasStyleExtensions`
6+
7+
## Finding
8+
9+
`ApplyThemeSkin` in `BaseStyledComponent` sets `Font.Name` from the theme's `ControlSkin.Font.Name`, but the style builder (`HasStyleExtensions.ToStyle()`) reads `Font.Names` (plural) for the `font-family` CSS property. These are separate properties on `FontInfo` with no synchronization.
10+
11+
**Result:** Setting `Font.Name` via a theme skin does NOT produce `font-family` in the rendered HTML.
12+
13+
## Impact
14+
15+
- Theme font-family is silently ignored at render time
16+
- All other font properties (Bold, Italic, Underline, Size) work correctly
17+
- Not blocking for M20 PoC — documented and tested around
18+
19+
## Recommendation
20+
21+
In M11 (full Skins & Themes implementation), either:
22+
1. Sync `Font.Name``Font.Names` in `ApplyThemeSkin`, or
23+
2. Have `ApplyThemeSkin` set `Font.Names` instead of `Font.Name`, or
24+
3. Add a getter to `FontInfo` that returns `Names ?? Name` for the style builder

0 commit comments

Comments
 (0)