Skip to content

K2GO-529 refactor(ui): single type-scale owner (K2GoText) + build guard - #718

Merged
luisguzman-adfa merged 3 commits into
mainfrom
refactor/K2GO-529-type-scale-guard
Nov 2, 2026
Merged

luisguzman-adfa merged 3 commits into
mainfrom
refactor/K2GO-529-type-scale-guard

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What

Add K2GoText (org.appdevforall.k2go.ui) as the single owner of the K2Go text
scale 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 build
on 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.
  • Unified pinned header (back glyph plus title) on Help, Send feedback, Content
    manager and Add modules; no wording changed on those screens.
  • Light and dark verified on device (OnePlus and Samsung).

Verification

compileStandardDebug and verifyUiTypeScale pass. Installed on both phones;
walked Settings, Language, Help, Send feedback, Add modules, Content manager and
Backup & restore in light and dark: no regressions.

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.
@luisguzman-adfa luisguzman-adfa added the ui change or edit to UI label Nov 2, 2026
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.
@luisguzman-adfa
luisguzman-adfa merged commit 1234b8e into main Nov 2, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the refactor/K2GO-529-type-scale-guard branch November 3, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui change or edit to UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant