Repository navigation
refactor(ui): phase 2 — thème global et jetons dérivés - #16
Merged
Merged
Conversation
…ales - `Theme` is a GPUI `Global`, read where it is drawn (`Theme::of(cx)`) and changed in one place (`Theme::install`, which redraws the windows). The `theme` copies held by the station, the sidebar, the drawer, the search field and the scope dial, and the fifteen `set_theme` calls that kept them in step, are gone. The dial, which never received a new theme after startup, now follows a switch of look or brand. - State tokens are derived from the palette and the accent, with their text's contrast guarded (WCAG 4.5:1): `selection_bg` / `selection_text` for the selected row and card (the name was accent-on-surface, with no contrast guarantee), `on_accent` and `Theme::on(fill)` for text on a full colour. Text on accent, warning, success and danger fills used `bg_app`, which read at about 4:1 on the light theme's accent. - Closed scales: `rounded_sm/md/lg/full` only (`rounded_xs` folded into `sm`); panels (menus, toasts, the shortcut sheet) take `rounded_lg`; menus are the only `shadow_md`, toasts and the sheet the only `shadow_lg`; the search field's focus shadow is gone. - Tests: every brand in both looks keeps its derived text readable; the global is read with a dark default outside a window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CfvJFUwgYwz6HYiWrec9T
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 du refactor front-end inspiré de Skwir. Empilée sur #15 (base :
refactor/phase-1-fluidity).Ce qui change
Themedevient unGlobalGPUI lu au rendu (Theme::of(cx)) et changé en un seul endroit (Theme::install). Fin des copies dans 5 vues et des 15 appelsset_themeen cascade. Corrige au passage le cadran de périmètre, qui ne recevait jamais le nouveau thème après le démarrage.selection_bg/selection_text(rangée et carte sélectionnées),on_accentetTheme::on(fill)pour le texte posé sur une couleur pleine (avant :bg_app, ≈ 4:1 sur l'accent du thème clair).sm/md/lg/fullseulement, panneaux (menus, toasts, fiche des raccourcis) enrounded_lg,shadow_mdréservé aux menus etshadow_lgaux toasts/fiche.Vérification :
cargo test→ 261 OK. À regarder à l'œil : la sélection dans le catalogue (nouvelle teinte dérivée de l'accent) dans les deux thèmes.Generated by Claude Code