Skip to content

feat(ui): add USDF "$" watermark to the Dollars token card - #1250

Merged
bmc08gt merged 2 commits into
code/cashfrom
feat/usdf-card-watermark
Aug 19, 2026
Merged

feat(ui): add USDF "$" watermark to the Dollars token card#1250
bmc08gt merged 2 commits into
code/cashfrom
feat/usdf-card-watermark

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the oversized $ watermark to the gold USDF / Dollars token card.

A bold white $ glyph bleeds off the top-right of the card, drawn with mix-blend overlay at 30% opacity so it reads as an emboss on the gradient rather than a solid mark.

Details

  • USDF-gated — only cards where token.address == Mint.usdf get the mark; all other tokens are unchanged.
  • Glyph is pre-measured with a TextMeasurer; font size is expressed in dp (via toSp) so it scales with the card height and ignores the user's font scale.
  • Rendered in a drawWithContent layer that sits above the gradient, is clipped to the card's rounded shape, and ignores the content padding.
  • Sizing constants (WatermarkFontScale, WatermarkAlpha, top bleed / right inset) are proportional to the card height, matching the Figma proportions (~213px glyph on a ~214px card).

Testing

Adds TokenCardWatermarkScreenshotTest — a render-only Robolectric harness (native graphics) that captures the card to build/screenshots/ so the mark can be eyeballed without an emulator. It's not an assertion test.

Verified visually: the gold Dollars card shows the $; a non-USDF (USDC) card renders with no watermark.

Draw an oversized bold "$" glyph bleeding off the top-right of the gold
USDF/Dollars card, using mix-blend "overlay" at 30% so it reads as an
emboss on the gradient rather than a solid mark (Figma 9120:15335).

Gated to USDF (token.address == Mint.usdf); other tokens are unchanged.
The glyph is pre-measured with a TextMeasurer and its font size is
expressed in dp (via toSp) so it scales with the card height and ignores
the user font scale. It's drawn in a drawWithContent layer that sits
above the gradient, is clipped to the card's rounded shape, and ignores
the content padding.

Adds a render-only Robolectric harness (TokenCardWatermarkScreenshotTest)
that captures the card to build/screenshots/ for eyeballing the mark
without an emulator.
@github-actions github-actions Bot added the type: feature New functionality label Aug 19, 2026
Replace the hardcoded 16.dp top-bleed / right-inset constants with
CodeTheme.dimens.inset so the watermark tracks the card's content inset
and flips to 16dp automatically on the 4pt-grid switch.
@bmc08gt
bmc08gt merged commit 8203b34 into code/cash Aug 19, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/usdf-card-watermark branch August 19, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant