refactor: extract HealthBanner + promote converters to theme — Phase 2, Commit 13
HealthBanner.xaml takes the Row 1 YouTube-health banner (report-by-exception). Converters: promoted the 7 value<->visibility converters (BoolToVis, Inverse, NotNull, Null, Hidden, EnumToBool, AllTrueToVis) from MainWindow.Window.Resources into Themes/Controls.xaml so extracted UserControls can resolve them. AGENTS rule: controls cannot reach into a window's own named resources; they resolve from the app-level merged theme instead. Promoted all of them (not just NotNullToVis) so every pending extraction keeps working without window-level references. Zero behavior change; build 0 warnings; 246 pass, only the 2 known failures. Docs: ViewModels/index.md Phase 2 tracker updated in the same commit.
This commit is contained in:
+2
-1
@@ -54,7 +54,8 @@ Progress (Commit N/12 · tag):
|
||||
- [x] **Phase 1 complete:** core `MainViewModel.cs` split into 10 functional partials (1,890 → 758 lines).
|
||||
|
||||
**Phase 2 — `MainWindow.xaml` split into UserControls** (new `Controls/` folder, namespace `ytLive.Controls`):
|
||||
- [x] **Commit 12 · `refactor-commit-12`** — **BottomBar** → `Controls/BottomBar.xaml(.cs)` (gear menu + stream stats + quality dropdown; `GearButton_Click` moved to the control's code-behind). Pending: TopBar, health banner, left scene/chat panel, preview pane, overlay host.
|
||||
- [x] **Commit 12 · `refactor-commit-12`** — **BottomBar** → `Controls/BottomBar.xaml(.cs)` (gear menu + stream stats + quality dropdown; `GearButton_Click` moved to the control's code-behind).
|
||||
- [x] **Commit 13 · `refactor-commit-13`** — **HealthBanner** → `Controls/HealthBanner.xaml` (Row 1). Also promoted the 7 value↔visibility converters out of `MainWindow.Window.Resources` into `Themes/Controls.xaml` so extracted controls can resolve them (app-level, not window-level). Pending: TopBar, left scene/chat panel, preview pane, overlay host.
|
||||
|
||||
The partial `.cs` files land next to `MainViewModel.cs` in this folder as the split
|
||||
proceeds; each partial carries its own `using`s and re-declares nothing from core.
|
||||
Reference in New Issue
Block a user