Skip to content

fix(transactions): draw View in Chat as a card, not the primary action - #739

Merged
bmc08gt merged 1 commit into
mainfrom
fix/view-in-chat-button-style
Sep 8, 2026
Merged

fix(transactions): draw View in Chat as a card, not the primary action#739
bmc08gt merged 1 commit into
mainfrom
fix/view-in-chat-button-style

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Two fidelity fixes on Transaction Details, both measured against Figma node 9708:105260.

The button was the primary-action style

"View in Chat" used .filled — solid white background, black text, the style reserved for a screen's primary action. Figma node 9708:118123 fills it with rgba(255,255,255,0.05) and white text: the same tint the receipt and ID cards directly above it carry, so it reads as a fourth card in the stack rather than the loudest thing on the screen. Android draws it the same way, via ButtonState.Filled10.

FilledButtonStyle gains .filled05, following the existing .filled20 pattern. Metrics.buttonRadius (6) and buttonHeight (60) already match the node.

The cards sat too far apart

The two cards and the button were spaced at 16pt, one value for the whole screen. Figma node 9708:118142 puts 8pt between them, with a much wider gap above separating them from the header — they read as one stacked group, not four evenly spaced items.

They now sit in their own 8pt stack, with the header left on the outer stack's 16pt. The button also drops its .padding(.top, 4), which had held a prominent primary button off the cards.

Where Figma and Android disagree

Figma Android This PR
Button fill white 5% white 10% (White10 = 0x1AFFFFFF) 5%
Card → card 8pt 10dp (grid.x2 at NORMAL width) 8pt
Header → first card 43pt 10dp unchanged at 16pt

The first two follow Figma, which is also what Color.backgroundRow and the adjacent cards already use. The header gap is left alone: Figma and Android are far apart there, and that is worth settling before either platform moves. Matching the Android side to its own cards is filed separately.

The button used `.filled` — solid white on black text, the style reserved
for a screen's primary action. Figma node 9708:118123 fills it with
rgba(255,255,255,0.05) and white text, the same tint the receipt and ID
cards above it already carry, so it reads as a fourth card in the stack
rather than the loudest thing on the screen. Android draws it the same
way, via `ButtonState.Filled10`.

Adds `.filled05` alongside the existing `.filled20`, and drops the
button's extra 4pt top padding: that gap held a prominent button off the
cards, and a card-shaped button belongs on the stack's own 16pt spacing.

Android's `Filled10` is white at 10%, where Figma is 5%. This follows
Figma, which is also what `Color.backgroundRow` and the adjacent cards
use; the Android side is filed separately.
@bmc08gt bmc08gt self-assigned this Sep 8, 2026
@bmc08gt
bmc08gt merged commit 58a4d79 into main Sep 8, 2026
1 check passed
bmc08gt added a commit to code-payments/code-android-app that referenced this pull request Sep 8, 2026
)

* fix(txn-details): match "View in Chat" to the cards it sits under

The button used ButtonState.Filled10, i.e. White10 (0x1AFFFFFF), while the
receipt and ID cards directly above it use White05 (0x0CFFFFFF) via
DetailsCard. Figma 9708:118123 gives the button rgba(255,255,255,0.05) — the
card fill — so it reads as a fourth card in the stack rather than as a
separate control. The two cards were already correct; only the button drifted.

CodeButton takes its background solely from ButtonState.colors(), with no
per-call override, so expressing the card fill needs a new state. Filled05 is
added alongside Filled10, which Callout still uses and which is unchanged.

Mirrors the iOS .filled05 added in code-payments/code-ios-app#739.

* fix(txn-details): match "View in Chat" corners to the cards too

CodeButton defaults to CodeTheme.shapes.small (8dp); DetailsCard uses
extraSmall (6dp). Figma 9708:118142 gives all three siblings — receipt card,
ID card, button — rounded-[6px], so the button was the odd one out on corners
as well as fill.
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