Skip to content

Commit 254fce6

Browse files
csharpfritzCopilot
andcommitted
docs: Add Themes and Skins migration strategy document
Evaluate 5 Blazor-native approaches to replicate Web Forms Themes and Skins functionality: CSS Custom Properties, CascadingValue ThemeProvider, Generated CSS Isolation, DI-based Configuration, and Hybrid. Recommend CascadingValue ThemeProvider as the primary approach due to full Web Forms fidelity (Theme/StyleSheetTheme semantics, SkinID support, all property types). Document is exploratory per Jeff's request. - Create docs/Migration/ThemesAndSkins.md with full analysis - Add to mkdocs.yml nav under Migration section - Record decision in .ai-team/decisions/inbox/ - Update forge history with learnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6ce142a commit 254fce6

4 files changed

Lines changed: 829 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,14 @@ Evaluated 4 JS libraries for Chart component. D3 rejected (zero built-in charts,
4848
📌 Team update (2026-02-11): Milestone 3 gate review — DetailsView APPROVED, PasswordRecovery APPROVED. 50/53 (94%). — decided by Forge
4949
📌 Team update (2026-02-12): Chart component feasibility confirmed — Chart.js recommended via JS interop. Effort: L. Target Milestone 4. — decided by Forge
5050
📌 Team update (2026-02-12): Milestone 4 planned — Chart component with Chart.js via JS interop. 8 work items, design review required before implementation. — decided by Forge + Squad
51+
52+
### Themes and Skins Migration Strategy (2026-02-12)
53+
54+
- Evaluated 5 approaches for migrating Web Forms Themes/Skins to Blazor: CSS Custom Properties, CascadingValue ThemeProvider, Generated CSS Isolation, DI Service, and Hybrid.
55+
- **Recommended CascadingValue ThemeProvider** — only approach that faithfully models both `Theme` (override) and `StyleSheetTheme` (default) semantics, supports SkinID selection, and can set any property (not just CSS-expressible ones).
56+
- CSS-only approaches (1, 3, 5) cannot set non-CSS properties like `Width` (as HTML attribute), `ToolTip`, or `Visible` — which are valid skin properties in Web Forms.
57+
- DI-based approach (4) works functionally but cannot scope themes to a page or subtree, unlike `CascadingValue` which mirrors Web Forms' per-page `@Page Theme=` directive.
58+
- **Known bug:** `BaseWebFormsComponent.SkinID` is typed as `bool` instead of `string`. Must be fixed before any theme implementation.
59+
- The library already uses CascadingParameters extensively (TableItemStyle, LoginControl styles) — ThemeProvider follows the same pattern.
60+
- Implementation is opt-in and non-breaking: no `ThemeProvider` wrapper = no behavior change.
61+
- Strategy is exploratory per Jeff's request — the README exclusion of themes/skins still stands until a decision to implement.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Themes and Skins Migration Strategy
2+
3+
**By:** Forge
4+
**Date:** 2026-02-12
5+
**What:** Evaluated 5 approaches for migrating Web Forms Themes and Skins to Blazor. Recommended **CascadingValue ThemeProvider** (Approach 2) as the primary strategy. CSS Custom Properties are complementary but insufficient alone. Generated CSS Isolation rejected due to high tooling cost. DI-based approach rejected because it cannot scope themes to subtrees.
6+
7+
**Key points:**
8+
- CascadingValue is the only approach that faithfully models both `Theme` (override) and `StyleSheetTheme` (default) semantics
9+
- SkinID must be corrected from `bool` to `string` on `BaseWebFormsComponent` before any implementation
10+
- Implementation is opt-in via `<ThemeProvider>` wrapper — zero breaking changes to existing consumers
11+
- Theme resolution logic lives in `BaseWebFormsComponent.OnParametersSet`, benefiting all 50+ components automatically
12+
- Strategy is exploratory — the README still says themes/skins are not converted; this documents how they *could* be
13+
14+
**Why:** Jeff requested exploration of theme/skin migration despite the project's current exclusion. Developers migrating themed Web Forms apps need guidance. The CascadingValue approach aligns with existing library patterns (TableItemStyle already cascades) and is incrementally adoptable.

0 commit comments

Comments
 (0)