Repository navigation
feat: add Dewfall's theme built from the design tokens - #140
Merged
Merged
Conversation
- DewfallTheme in :core:designsystem sets the light and dark color schemes with all 48 roles, the Manrope type scale and the shapes from tokens.json, and DewfallSpacing holds the spacing, so screens read every value from the theme. - Dynamic color replaces the palette on Android 12 and later, as the design brief asks, and older phones get Dewfall's own palette. - Bundle Manrope 4.505 as one variable font, with its OFL license text in the APK's assets, since the license asks every copy to carry it. - Load each weight through a font XML that sets the weight axis, because Compose's Font(resId, weight) left every weight at the file's ExtraLight default on the API 29 and 36 emulators. 700 and 800 are there for Android's Bold text setting. - Expose Material 3 as an api dependency, because screens use its components and MaterialTheme. - Mark .ttf files as binary, so Git never changes the font's bytes. - DesignTokensTest compares the theme with tokens.json and ManropeTest guards the font XMLs. Both files are test inputs, so a cached result never hides a change. kotlinx-serialization-json reads the tokens in tests only.
- Replace Material 3's default color schemes in DewfallApp with DewfallTheme, so the placeholder shows Dewfall's palette or dynamic color, and Manrope. - Drop the KDoc sentence that said the default colors stayed until #26, since it no longer holds.
- Add The theme to architecture.md: where the values come from, dynamic color, the font and its license, the font XML workaround, the token checks and how to open the previews on a phone. - Note under Network access that the font is bundled rather than downloaded, since downloadable fonts would ask Google Play services for it. - Correct the module table and the sentences that said #26 would add the theme, now that it has. - List the theme check among the fast tests in testing.md. - Say in the README that the bundled font is under the OFL, with a link to its license file, since the repository now ships more than GPLv3 code.
- Bundled fonts may use the SIL Open Font License 1.1 and must ship with their copyright notice and license text, since the app now bundles Manrope and the rule only listed code licenses. - Apply the same sentence in AGENTS.md, CONTRIBUTING.md, openspec/config.yaml and ADR 0003, with a note in the ADR that the decision itself is unchanged.
- Add matching the launch window to Dewfall's colors to Phase 4, because the window theme's background shows before the first frame and doesn't match the theme (#138). - Add an open-source licenses section in settings to Phase 9, after the debug info button, so the font's and the libraries' licenses can be read inside the app (#139).
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.
Closes #26.
What changed and why
This builds Dewfall's Material 3 theme in
:core:designsystemfrom the design system's tokens, and switches the app to it.The theme (
core/designsystem/src/main/kotlin/io/github/dewfallapp/core/designsystem/theme/):DewfallThemeis the entry point. On Android 12 and later it takes the colors from the wallpaper, as the design brief asks. Older phones get Dewfall's own light and dark palettes. There's no setting to turn dynamic color off, because the brief has none. ThedynamicColorparameter is there for previews.tokens.json, the fixed roles included. Then the type scale in Manrope, the shape scale, andDewfallSpacing. The values are copied from the export's tokens.json and compose-theme.md, anddocs/design/is unchanged.MaterialTheme. Material 3 is anapidependency of the module.scrimbehind itself at 32%. Compose dialogs dim through Android's dialog window instead, so the first dialog needs a check against the design system's 32%.Manrope. Version 4.505 of the variable font
Manrope[wght].ttf, from googlefonts/manrope at commit 468c0db, isres/font/manrope.ttf(164,700 bytes). Its SIL Open Font License 1.1 text, which starts with the copyright notice, ships in the APK asassets/licenses/Manrope-OFL.txt. No screen shows it yet. #139 tracks that, and stays open.One change from the plan: Compose's
Font(R.font.manrope, weight)sets the weight axis only after the font loads. On the API 29 and API 36 emulators that had no effect, and every style drew at the file's default weight, 200 (ExtraLight). So each weight loads through a font XML, such asmanrope_regular.xml, whoseandroid:fontVariationSettingssets the axis while the font loads. The family has 400, 500 and 600 for the type scale, plus 700 and 800 for Android's Bold text setting, as you decided.The app.
DewfallAppusesDewfallThemeinstead of Material 3's default color schemes. Nothing else in:appchanged.Tests.
DesignTokensTestcompares every color, text style, shape and spacing value withtokens.json, and fails when a token group gains or loses a token.ManropeTestchecks that each Manrope font loads one of the font XMLs, and that each XML sets the weight it declares.tokens.jsonand the font folder are test inputs, so the build cache never hides a change.Docs. A new "The theme" section and a fonts paragraph under Network access in
docs/architecture.md, one line indocs/testing.md, and a sentence about the font's license in the README. The license rule now says that bundled fonts may use the SIL Open Font License 1.1 and must ship with their copyright notice and license text. The sentence is in AGENTS.md, CONTRIBUTING.md, openspec/config.yaml and ADR 0003, with a note in the ADR. The roadmap has two new tasks: matching the launch window to Dewfall's colors in Phase 4 (#138), and an open-source licenses section in settings in Phase 9 (#139). Both issues are on the board and stay open.Checks run locally:
:core:designsystem:testDebugUnitTestruns 6 tests with 0 failures.R.font.manrope, and when one XML had the wrong weight. All of these were reverted.#F5FBF2in light and#101411in dark. On the API 36 emulator it's dynamic color:#FAF8FFin light and#121318in dark. The type scale shows 400, 500 and 600 on both. With Bold text on, on API 36, body text draws at 700 and titles at 800.:app's debug and release runtime classpaths are unchanged.New dependencies
No new Gradle plugins. Licenses are taken from each POM, and from the font's OFL.txt.
res/font/manrope.ttf-jvm)-jvm):core:designsystemkotlinx-serialization 1.12.0 was published on 2026-10-19, one day before this work, so this uses 1.11.0. Test libraries never ship, so they fall under the build tool rule in AGENTS.md.
Checklist
Reviewer
Final verdict: Ready
The reviewer ran three rounds. Round one was Ready, with six should-fix items, all done: the emulator finding worded as an emulator finding, sources for two numbers, the dialog dim claim narrowed, "every color role" corrected, and a new test for the font XMLs. Round two was Ready, with one comment to reflow. Round three, on the committed branch, was Ready with nothing to change. You answered its three questions: the Bold text weights and the README sentence are in this pull request, and the launch window is #138.
🤖 Generated with Claude Code