Skip to content

K2GO-385 refactor(ui): extract shared K2GoChip and migrate the duplicated outlined chips - #538

Merged
luisguzman-adfa merged 1 commit into
mainfrom
feat/K2GO-385-shared-status-pill
Sep 4, 2026
Merged

K2GO-385 refactor(ui): extract shared K2GoChip and migrate the duplicated outlined chips#538
luisguzman-adfa merged 1 commit into
mainfrom
feat/K2GO-385-shared-status-pill

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Extracts the app's outlined status/meta chip into one shared component so a fix lands once instead of in each copy.

What changes

  • Add redesign/K2GoChip: create(ctx, text, colorRes) builds a row chip, style(TextView, text, colorRes) recolors one in place (for the live status pill). Same M3 Label Medium, transparent fill, 1.4dp coloured outline — exact dp preserved.
  • Migrate DashboardDetailFragment and ModuleDetailFragment off their duplicated private chip()/styleChip() onto it; drop the copies and now-orphaned imports.

Net: −53 lines across the two fragments; no visual change.

Out of scope

  • Home card dot+label (single-owner state rule) and ModuleHubFragment.statePill (a distinct, overloaded pill) stay as-is. Follow-up is the status/action/metadata role split — design decision recorded on K2GO-385.

Verification

  • Built (assembleDebug) and installed on device; Dashboard-detail and Module-detail chips render identically to the pre-change build; no crash.

…ated outlined chips

The outlined status/meta chip (transparent fill, colored 1.4dp stroke, M3 LabelMedium)
was copy-pasted: DashboardDetailFragment built it via chip()/styleChip() and
ModuleDetailFragment via an identical chip(), so a fix to one silently missed the other.

Add redesign/K2GoChip with create(ctx, text, colorRes) to build a row chip and
style(TextView, text, colorRes) to recolor one in place (for the live status pill),
preserving the exact dp/appearance/outline. Migrate both fragments onto it and drop
their private helpers (and now-orphaned imports).

The card home dot+label is a different form with a single-owner state rule and stays out;
a survey of the other GradientDrawable sites found no further instance of this chip
(ModuleHubFragment.statePill is a distinct, overloaded full-radius pill, left as-is).
@luisguzman-adfa
luisguzman-adfa merged commit e98cac0 into main Sep 4, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-385-shared-status-pill branch September 4, 2026 14:11
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