Theme: move hard-coded colours into tokens, prepare a light or high-contrast variant
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 47/100
Direzione di ricerca
Start with Theme/Tokens.axaml and Theme/Styles.axaml, then use the file counts and colour values in the issue to locate hard-coded colours across the listed views. Compare each value with existing tokens and move the colours into tokens while preserving their rendered values. Check that views use the appropriate resources and compare before and after renders for pixel identity; the issue says the light or high-contrast variant and setting are separate steps.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Split out of #605, whose wording half shipped on its own (#678, #679).
Problem
App.axaml:5hard-locksRequestedThemeVariant="Dark".Theme/Tokens.axamlis one flatResourceDictionarywith noThemeDictionaries: 25Colors and 26 brushes.- Views hard-code hex colours instead of using the tokens.
Direct sun or glare in a vehicle calls for a light or high-contrast variant. Today that is not possible without touching every view.
Survey (main at 95a6845)
There are 114 hard-coded colour values in .axaml outside Tokens.axaml. That count excludes #123 issue references in comments.
| File | Count |
|---|---|
Theme/Styles.axaml |
39 |
Views/CoMessprotokollView.axaml |
15 |
Views/MasterDataEditorView.axaml |
12 |
Views/EtbView.axaml |
7 |
Views/RolesView.axaml |
6 |
Views/TasksView.axaml, Views/ForcesView.axaml |
4 each |
ScbaView, HomeView, FilesView |
3 each |
| 12 more views | 1–2 each |
The most common values:
| Value | Uses | Token with the same value? |
|---|---|---|
#0F141D |
25 | none (closest: AppBgColor2 #10141C) |
#0C1119 |
25 | none |
#241608 |
10 | AmberWashColor |
#F87171 |
8 | ErrorColor |
#FFFFFF |
7 | none |
#B3070A10 |
7 | none (scrim) |
#2A1013 |
3 | ErrorWashColor |
#FF0000, #92D050, #FFC000 |
3 / 3 / 1 | none (CO-Messprotokoll status colours) |
C# has hex colours only for the CO-Messprotokoll:
CoMessprotokollViewModel.csuses the status colours as string literals.Documents/Sections/CoMessprotokollSection.csduplicates the Amber, SignalHot and Signal tokens for the PDF. The PDF is not themed, so that part can stay.
Plan
- Tokens first, no visual change. Move every hard-coded colour into
Tokens.axaml, reusing the existing token where the value matches. Give#0F141D/#0C1119(panel and grid backgrounds) and the scrim their own tokens. A before/after render of every view should be pixel-identical. ThemeDictionaries. Move the tokens underDark, and switch views fromStaticResourcetoDynamicResourcewhere a variant has to swap at runtime.- A light or high-contrast variant, plus a setting to pick it. This needs a palette decision, ideally checked in a vehicle in daylight.
Each step can be its own PR.
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 3
- Merge medio
- 4h 34m
- PR unite (30g)
- 182
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeForFire/lagebuch
-
bug ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeForFire/lagebuch#714 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
CodeForFire/lagebuch#713 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CodeForFire/lagebuch#405 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CodeForFire/lagebuch#349 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CodeForFire/lagebuch#348 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di CodeForFire/lagebuch
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
KnifeLemon/Filee#363 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
area-Native untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
dotnet/machinelearning#7837 ·
I maintainer di solito rispondono entro 2 giorni