Repository navigation
K2GO-529 refactor(ui): single type-scale owner (K2GoText) + build guard - #718
Merged
Merged
Conversation
Five Settings-area screens each re-stated the K2Go text scale and drifted. Add K2GoText as the one code-side owner, route those screens through it, unify their header chrome (pinned back glyph plus HeadlineMedium title), and add a Gradle guard (baseline) that fails the build on raw Material3 styles, non-remapped attrs, literal text sizes or hardcoded colors in app UI.
The Settings-area pinned header (back glyph plus title) was hand-repeated in five
layouts and one code-built screen. Extract it to K2GoHeaderView (one owner): the back
glyph gains a contentDescription ("Back") and a 48dp touch target and dispatches Back
through the host OnBackPressedDispatcher, defined once instead of six times. Regenerate
the type-scale baseline, so the six glyph-size entries collapse to the single one in
K2GoHeaderView.
Add ui-type-scale-guard.gradle as a task input, so a change to the rules re-runs the check instead of staying UP-TO-DATE when only the scanned sources are unchanged.
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
Add
K2GoText(org.appdevforall.k2go.ui) as the single owner of the K2Go textscale for code-built UI, and route the Settings-area screens through it. Add a
Gradle guard (
ui-type-scale-guard.gradle) with a baseline that fails the buildon raw Material3 styles, non-remapped theme attrs, literal text sizes, or
hardcoded colors in app UI. Unify the sub-screen chrome (pinned back glyph plus
HeadlineMedium title) across Help, Send feedback, Content manager and Add modules.
Why
Five Settings-area screens each re-stated the scale-to-style mapping and drifted
(UI audit, 2026-10-31). One owner plus a build-time guard make the clean path the
only path; the baseline grandfathers legacy and shrinks as screens migrate
(267 -> 251). Contract:
controller/docs/ADR-ui-type-scale-and-guard.md.UI changes
k2go_mod_hub_sub: replaced the em-dash with a colon ("Runs on the device:no internet needed."); wording otherwise unchanged; applied in all locales.
manager and Add modules; no wording changed on those screens.
Verification
compileStandardDebugandverifyUiTypeScalepass. Installed on both phones;walked Settings, Language, Help, Send feedback, Add modules, Content manager and
Backup & restore in light and dark: no regressions.