refactor(ux/F2): zentrale Farb-Tokens als Single Source of Truth#20
Merged
Conversation
- src/theme/tokens.ts als Single Source of Truth fuer Farben (Brand-Greens/ Orange, Text, Surface, Neutral, Accent-Blau/Indigo, Status; Werte 1:1) - App.tsx: MUI-Theme-Palette/Typography und Inline-Farben auf Tokens umgestellt
Saemtliche hardcodierten Hex-Farben in src/components auf tokens aus src/theme/tokens.ts umgestellt (styled-components via Interpolation, sx/inline als JS-Ausdruck). Kein rohes Hex-Literal mehr in TS/TSX. Offen als kleiner Folgeschritt: rgba(...)-Werte mit Brand-Gruen (z. B. rgba(0,159,100,...)) ueber einen Alpha-Helfer ebenfalls aus Tokens ableiten.
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.
Farben werden nicht mehr verstreut hardcodiert, sondern zentral in einem Token-Modul gepflegt.
Kernlogik
src/theme/tokens.tsals Single Source of Truth für alle Farben (Brand-Greens/Orange, Text, Surface, Neutral, Accent-Blau/Indigo, Status).App.tsx(Palette + Typography) wird aus den Tokens gebaut → Theme und freie Styles können nicht mehr auseinanderlaufen.src/componentsauf Tokens umgestellt: styled-components via${tokens.…}-Interpolation,sx/inline als JS-Ausdruck.Scope / Folgeschritte
rgba(...)-Werte mit Brand-Grün (z. B.rgba(0,159,100,…)) künftig über einen Alpha-Helfer aus Tokens ableiten.Test
npm run build→ erfolgreich, keine TS-Fehler.npm test→ grün (118 passed).npm start): Farben/Branding unverändert gegenübermain(Buttons grün, Sekundär orange, Hierarchie-Farbcodierung, Dialoge).Labels
Refactoring
🤖 https://claude.ai/code/session_01D2Pc4cAexeqUFrM1YonaJL
Generated by Claude Code