Skip to content

fix(login): match the iOS layout of the account switcher rows - #1637

Merged
bmc08gt merged 10 commits into
code/cashfrom
fix/switch-account-font-sizing
Sep 30, 2026
Merged

bmc08gt merged 10 commits into
code/cashfrom
fix/switch-account-font-sizing

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

The account rows on the switch account screen were set larger and tighter than iOS. This moves each line to the typography token with the iOS size, and the row spacing to the grid step with the iOS gap. Rows are now separated by a divider, and the balance sits on the name line, as on iOS.

Line Before After iOS
Account name textLarge (20sp) textMedium (16sp) appTextMedium (16pt)
Created date, owner address textSmall (14sp) caption (12sp) appTextHeading (12pt)
"Balance unavailable" textSmall (14sp) caption (12sp) none
"Not Found" textSmall (14sp), balance slot badge after the name badge after the name
Balance textMedium (16sp) unchanged appTextMedium (16pt)

Spacing uses CodeTheme.dimens.grid, which is a 5dp grid on NORMAL-width phones, the same scale as the iOS values:

Gap Before After iOS
Row vertical padding grid.x3 (15dp) grid.x4 (20dp) 20pt
Name to secondary lines grid.x1 (5dp) grid.x1 + grid.x1 (10dp) 4 + 5pt
Between secondary lines grid.x1 (5dp) unchanged 4pt
Check to text grid.x3 (15dp) unchanged 15pt

The divider is a 0.5dp HorizontalDivider in CodeTheme.colors.divider (White10), which is the color of iOS rowSeparator (white at 10%). It is drawn after every row but the last and spans the list's inset on both sides.

The balance slot, including its not-found, unavailable and loading states, now shares a bottom-aligned Row with the name, spaced by grid.x2 (10dp), matching the iOS HStack(alignment: .bottom, spacing: 10). The name takes the remaining width and ellipsizes.

"Not Found" is now a badge after the name, matching iOS Badge(decoration: .circle(.textError)): a 6dp dot in errorText (0xFFFF8383, the iOS textError value) and the label in textSmall, textSecondary. iOS spaces the dot 8pt from the label; this uses grid.x2 (10dp), the nearest grid step.

The balance now has its currency flag, matching iOS AmountText(flagSize: .small): FlagWithFiat from core-ui, as the activity and transaction screens use it, with a grid.x3 (15dp) flag.

The owner address is the full base58 key on one line with TextOverflow.MiddleEllipsis, as iOS sets it with .truncationMode(.middle). It was cut to the first and last four characters in the view model; truncateAddress and its tests are gone.

The screen title is "Select Account", as on iOS, rather than "Select an Account". title_selectAccount also titles the onboarding picker, and the two Maestro flows that assert on it are updated.

Weights still differ: iOS uses bold, and the Android tokens are SemiBold (caption is Medium). I kept the tokens rather than overriding weight per call site.

The account name used textLarge (20sp) and the secondary lines textSmall
(14sp); iOS sets them at 16pt (appTextMedium) and 12pt (appTextHeading).
Move the name to textMedium and the created date, owner address and
balance-status lines to caption.
iOS pads each row 20pt and sets the name line 9pt above the secondary
lines. On the 5dp grid that is grid.x4 of vertical padding and an extra
grid.x1 under the name, for 10dp.
@bmc08gt bmc08gt changed the title fix(login): match iOS text sizes on the account switcher rows fix(login): match iOS text sizes and spacing on the account switcher rows Sep 30, 2026
iOS draws a rowSeparator hairline (white at 10%) between the rows. Draw
a 0.5dp HorizontalDivider in CodeTheme.colors.divider, which is the same
White10, above every row but the first.
@bmc08gt bmc08gt changed the title fix(login): match iOS text sizes and spacing on the account switcher rows fix(login): match iOS text, spacing and dividers on the account switcher rows Sep 30, 2026
iOS sets the name and balance in one bottom-aligned HStack, 10pt apart,
with the secondary lines below. Move the balance slot, including its
not-found, unavailable and loading states, into a Row with the name,
spaced by grid.x2.
Draw it below every row but the last, keyed on lastIndex, rather than
above every row but the first.
@bmc08gt bmc08gt changed the title fix(login): match iOS text, spacing and dividers on the account switcher rows fix(login): match the iOS layout of the account switcher rows Sep 30, 2026
iOS marks an unknown account with Badge(decoration: .circle(.textError)):
a 6pt dot in textError and the label in appTextSmall, textSecondary,
set directly after the name. Draw the same with errorText (0xFFFF8383,
the iOS textError value) and textSmall, and let the name wrap its width
so the badge follows it.
The view model cut the owner address to its first and last four
characters. iOS shows the full base58 key on one line and truncates the
middle only when it does not fit. Pass the full key through, set it on
one line with TextOverflow.MiddleEllipsis, and drop truncateAddress and
its tests.
iOS draws the balance with AmountText(flagSize: .small), a 15pt flag
beside the amount. Draw it with PriceWithFlag at grid.x3 (15dp). That
component hides the amount when there is no flag, so fall back to the
plain amount in that case.
iOS titles the screen "Select Account"; Android read "Select an
Account". Update title_selectAccount, which both the in-app switcher
and the onboarding picker use, and the two Maestro flows that assert
on it.
@github-actions github-actions Bot added the area: ui Compose UI, theme, components, resources label Sep 30, 2026
FlagWithFiat is the core-ui component the activity and transaction
screens use for a Fiat with its flag. It looks the flag up itself and
keeps the amount when there is none, so the PriceWithFlag fallback goes.
@bmc08gt
bmc08gt merged commit 455c911 into code/cash Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding area: ui Compose UI, theme, components, resources type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant