Skip to content

ADFA-5248 fix(books): legible selected chip and state band on covers - #470

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5248-books-chip-contrast
Aug 24, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5248-books-chip-contrast

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Fixes the two low-contrast spots on the Books "Get more" screen.

What changed

  • Selected filter chip: hardcoded white -> k2go_on_teal, so the text flips
    with the teal fill and reads in both light and dark.
  • State band ("In your books" / "Selected"): colored fill -> light cream pill
    with the semantic hue in the text, so it separates from same-hue covers
    instead of blending in.

Why
The chip's white read fine only in light mode; in dark mode the teal fill
becomes light aqua and white washed out. The band's green fill matched the
green covers and disappeared.

Files

  • redesign/BooksLandingFragment.java (chip(), band())
  • values/colors_k2go.xml (k2go_band_surface added; band tokens now used as
    text color)

Scope
Books only. Maps and Zim use their own chip treatments and read correctly in
both modes, so they are untouched. Band tokens are mode-independent (fixed
cover background), so no values-night twin.

Verification
Checked on device in light and dark mode.

The Books "Get more" screen had two low-contrast spots:

- The selected filter chip used hardcoded white on the teal fill. The fill
  flips to light aqua in dark mode, so white washed out. Use k2go_on_teal
  (the existing on-accent token), which flips with the same DayNight
  mechanism as the fill: light text on the dark-teal light-mode fill, dark
  text on the light-aqua dark-mode fill.

- The "In your books" / "Selected" band used a colored fill that matched the
  same-hue covers (green band on a green cover) and vanished. Make the band a
  light cream pill and move the semantic hue to the text, so it reads on any
  of the six covers.

Band tokens have no -night twin: the band sits on a fixed cover color, so it
is mode-independent.
Two low-contrast spots on the Books "Get more" screen.

Selected filter chip: chip() called setTextColor BEFORE setTextAppearance,
so the Material3 appearance's own colorOnSurface silently overwrote the chip
color. onSurface flips with the theme, so the selected chip rendered
dark-on-dark-teal in light mode and light-on-aqua in dark mode — exactly the
"dark gray on dark green / light gray on light aqua" the ticket reported;
neither the old white nor k2go_on_teal ever took effect. Apply the appearance
first, then the color, so k2go_on_teal sticks and flips against the teal fill.

State band ("In your books" / "Selected"): the colored fill matched the
same-hue covers (green band on a green cover) and vanished. Make the band a
light cream pill and move the semantic hue to the text, so it reads on any of
the six covers.

Band tokens have no -night twin: the band sits on a fixed cover color, so it
is mode-independent.
@luisguzman-adfa
luisguzman-adfa merged commit 5d90d76 into main Aug 24, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5248-books-chip-contrast branch August 24, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant