From ec804d54c6d9fbc8defd672018593a1f0716c06e Mon Sep 17 00:00:00 2001 From: funman300 Date: Fri, 8 May 2026 13:47:58 -0700 Subject: [PATCH] =?UTF-8?q?feat(accessibility):=20finish=20HC=20chrome=20r?= =?UTF-8?q?ollout=20=E2=80=94=20home=20+=20settings=20panel=20borders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Continues the rollout from `c9af1ea` (modal scaffold) and `d87761d` (tooltip + 3 panels). Tags the remaining 7 static- border surfaces in the chrome so the HC chrome thread is effectively complete: - **`home_plugin.rs` × 3**: the home-screen Level/XP/Score summary row (line 842), the home-screen mode-selector buttons (line 945), the home-screen mode-hotkey chips (line 1158). - **`settings_plugin.rs` × 4**: the card-back picker swatches (line 1952), the theme picker swatches (line 2093), the Sync Now button (line 2214), and the swatch glyph buttons (line 2274). Pre-tagging audit: confirmed none of these sites have a dynamic-paint system that would race the `update_high_contrast_borders` system. `paint_action_buttons` in `hud_plugin.rs` only paints entities tagged with the `ActionButton` marker (HUD buttons only). The focus-overlay system in `ui_focus.rs` spawns *separate* overlay entities for focus indication, never mutating the original `BorderColor`. Settings panel buttons / swatches use their own `SettingsButton` enum for click routing; their `BorderColor` is set at spawn time and not touched again. After this commit, every `BorderColor::all(BORDER_SUBTLE)` site in the chrome (excluding the dynamic-paint sites that are intentionally skipped — HUD action buttons, modal buttons, radial menu rim) carries a `HighContrastBorder` marker. The HC thread for chrome borders is closed; the dynamic-paint sites remain open for a future iteration that needs a different shape (folding HC into the dynamic-paint logic, or having HC consult hover/focus state). 1194 passing / 0 failing across the workspace (unchanged — no new tests; the system-level lifecycle of `HighContrastBorder` was already covered by the modal-scaffold scaffolding in `c9af1ea`). Workspace clippy clean. Co-Authored-By: Claude Opus 4.7 --- solitaire_engine/src/home_plugin.rs | 7 +++++-- solitaire_engine/src/settings_plugin.rs | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/solitaire_engine/src/home_plugin.rs b/solitaire_engine/src/home_plugin.rs index 7cc0c36..b958aca 100644 --- a/solitaire_engine/src/home_plugin.rs +++ b/solitaire_engine/src/home_plugin.rs @@ -38,8 +38,8 @@ use crate::ui_modal::{ ScrimDismissible, }; use crate::ui_theme::{ - ACCENT_PRIMARY, BG_ELEVATED, BG_ELEVATED_HI, BORDER_STRONG, BORDER_SUBTLE, RADIUS_MD, - STATE_INFO, TEXT_DISABLED, TEXT_PRIMARY, TEXT_SECONDARY, TYPE_BODY, TYPE_BODY_LG, + ACCENT_PRIMARY, BG_ELEVATED, BG_ELEVATED_HI, BORDER_STRONG, BORDER_SUBTLE, HighContrastBorder, + RADIUS_MD, STATE_INFO, TEXT_DISABLED, TEXT_PRIMARY, TEXT_SECONDARY, TYPE_BODY, TYPE_BODY_LG, TYPE_CAPTION, TYPE_DISPLAY, VAL_SPACE_1, VAL_SPACE_2, VAL_SPACE_3, Z_MODAL_PANEL, }; @@ -840,6 +840,7 @@ fn spawn_home_header_chips(parent: &mut ChildSpawnerCommands, ctx: &HomeContext< }, BackgroundColor(BG_ELEVATED), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|row| { for (label, value) in [ @@ -943,6 +944,7 @@ fn spawn_draw_mode_chip( }, BackgroundColor(bg), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|c| { c.spawn((Text::new(label.to_string()), font.clone(), TextColor(fg))); @@ -1156,6 +1158,7 @@ fn spawn_mode_card( ..default() }, BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|chip| { chip.spawn(( diff --git a/solitaire_engine/src/settings_plugin.rs b/solitaire_engine/src/settings_plugin.rs index abe044c..22dcbfe 100644 --- a/solitaire_engine/src/settings_plugin.rs +++ b/solitaire_engine/src/settings_plugin.rs @@ -1950,6 +1950,7 @@ fn picker_row( }, BackgroundColor(bg), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|b| { let text_color = if is_selected { BG_BASE } else { TEXT_PRIMARY }; @@ -2091,6 +2092,7 @@ fn theme_picker_row( }, BackgroundColor(bg), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|b| { spawn_thumbnail_pair(b, entry.thumbnails.as_ref()); @@ -2212,6 +2214,7 @@ fn sync_row(parent: &mut ChildSpawnerCommands, status_text: &str, font_res: Opti }, BackgroundColor(BG_ELEVATED_HI), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|b| { b.spawn(( @@ -2272,6 +2275,7 @@ fn icon_button( }, BackgroundColor(BG_ELEVATED_HI), BorderColor::all(BORDER_SUBTLE), + HighContrastBorder::with_default(BORDER_SUBTLE), )) .with_children(|b| { b.spawn((Text::new(label.to_string()), glyph_font, TextColor(TEXT_PRIMARY)));