fix(theme): make all text readable on dark surfaces#96
Merged
Conversation
ThemeData.copyWith replaces the text theme wholesale rather than merging with the base typography, so any slot _textTheme left undefined (headlineSmall, headlineMedium, bodySmall, labelSmall) or defined without a color (displayLarge/Medium/Small, headlineLarge) fell back to the framework's near-black default and was unreadable on the dark surfaces — most visibly the "Daccord" welcome title (headlineSmall). Define all 15 text styles with explicit high-emphasis or muted colors, keeping the original tight metrics (no inherited line-height) so layouts like the welcome feature cards don't overflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Rewrites
_textThemeinlib/theme/app_theme.dartso everyTextThemeslot is defined with an explicit color.Why
buildAppThemeapplies the custom text styles viabase.copyWith(textTheme: _textTheme(palette)).ThemeData.copyWithreplaces the text theme wholesale — it does not merge with the base typography (confirmed in the Flutter SDK:copyWithdoestextTheme ?? this.textTheme, whereas the merge only happens in the mainThemeData(...)constructor).As a result, any text style that
_textThemeleft:headlineSmall,headlineMedium,bodySmall,labelSmall, orcolor—displayLarge/displayMedium/displaySmall,headlineLarge…fell through to the framework's near-black default and was effectively invisible on the app's dark surfaces. The most visible victim was the "Daccord" welcome title, which uses
headlineSmall.Change
dirtyWhite) for headings/body, muted (gray) for labels.height) to match the original layout — an earlier attempt that seeded from the platformTextThemevia.apply()pulled in Material's taller default line-heights and caused the welcome feature cards to overflow ("BOTTOM OVERFLOWED BY 16 PIXELS"). This version avoids that.Notes for reviewer
lib/theme/app_theme.dart. Regenerated*.g.dartfiles and a downgradedpubspec.lockin the working tree were not included — they were byproducts of building under the stable Flutter SDK (the repo pinsbetavia.fvmrc, whose Dart VM requires macOS 14 and can't run on the dev machine here).-d chrome) build is still recommended: confirm the "Daccord" title is light/readable and the welcome feature cards show no overflow stripes.🤖 Generated with Claude Code