Skip to content

One Address component for every address on screen - #106

Merged
gf5901 merged 7 commits into
mainfrom
feat/address-component
Nov 17, 2026
Merged

gf5901 merged 7 commits into
mainfrom
feat/address-component

Conversation

@gf5901

@gf5901 gf5901 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

Addresses were drawn four different ways: CopyText + grouped(), a raw mono T, shortAddress() in the body face, and a hand-styled mono span in the transaction title. About half the short forms were in Figtree rather than Plex Mono, so the same address looked different from screen to screen. That cuts against the design guide's "show the address small, in monospace" (§3.1, §5).

What

Address in mobile/src/components/address.tsx, exported with the other shared pieces:

Form Looks like Used for
<Address value /> (short) utest1abcd…456789, mono 15, one line In a name's place: Pay's list, the amount chip, Add a contact's "People you've paid", the contact edit card
<Address value detail /> mono 13, Muted The line under a name, when there's no .zcash name to show instead (Pay's list, Contacts)
<Address value form="full" /> groups of 4 in lines of as many as fit (8/6/4/2, always even), standing in columns: odd columns Text, even Muted Add a contact
<Address value form="full" copy label? /> the same, tap anywhere to copy, label says "Copied" Receive, exchange address, contact page, Technical details
<AddressInline value /> mono 15 in Muted inside a sentence, so the words scan first "You paid …" (Activity rows, transaction title), the .zcash drift choice, Contacts' "Add … as a contact" / "Pay …"

UX decisions

  • Two forms only. Short wherever the address stands in for a name. Full wherever someone checks or copies it. Both use the truncation and grouping the guide already set (first 10…last 6, groups of 4).
  • Nothing dimmed or highlighted. I considered brightening the first and last characters so they match the short form, and decided against it. Address poisoning works by making an address with the same ends, so emphasis would teach people to check only the ends. The full form asks for every group to be read.
  • Columns in the full form. A full address is about 36 groups over five to seven lines. It's laid out in lines of an even number of groups that share one left edge, so the groups stand in columns, and each column keeps one colour (Text, Muted, Text…). That helps people keep their place, across and down, when comparing with another screen. Larger text gets fewer columns, never a wrapped line. Every column gets the same weight, so this doesn't favour the ends. The spaces stay, so colour is never the only separator. Muted passes AA on every ground (Night 8.3:1 and 7.4:1, Vellum 6.6:1 and 7.2:1), and Text vs Muted is about 2:1. The short form stays one colour.
  • Screen readers. A short address used to be read as letters plus "ellipsis". It is now "address ending 4 5 6 7 8 9" (spokenAddress in wallet-native/src/format.ts): the same 6 characters the short form ends with, so they can be compared by ear. This applies to Activity rows' spoken sentence too. The full form is still read group by group.
  • Pay's list model: PayPerson.detail (a string that could be a name or an address) became zcashName, so the row can draw an address in mono and a .zcash name in the text face.
  • Native sheets match. The confirmation and contact sheets now draw AddressText (Kit.swift) and Kit.address (Kit.kt): the same columns (iOS picks the widest layout with ViewThatFits; Android re-lines its TextView once it knows its width), mono and selectable.

New theme token size.monoName (15). Design guide §5 documents the component and its rules.

Checks

  • Swift typecheck (Kit, ConfirmSheet, ContactSheet) and Kotlin compileDebugKotlin
  • tsc, biome, vitest (mobile 133, wallet-native 162; new tests for spokenAddress and Activity's bare-address title and spoken text)
  • Sim look, iOS "Wizard UI" (iPhone 17 Pro, iOS 26.5), Night and Vellum, on 12b466b: Receive and the exchange address (centred column block, buttons visible), review sheet (columns 8·8·8·2, stripes aligned), contact page, Add a contact, Save contact sheet, Technical details (tap to copy), Pay list (bare recent in mono, muted detail line), amount chip, Activity row (an address title takes two lines, so its last 6 stay visible), Contacts search offers and Sent (inline address in Muted)
  • Receive and the exchange address after 4th commit: "Copied" fills a kept label line instead of pushing the address down (not re-shot)
  • Android emulator look (the Kotlin compiles; not run)
  • VoiceOver / TalkBack on an Activity row and a Pay list row for a bare address

Fixed along the way: on Receive the centred copy block shrank to its content, so the columns measured themselves down to two per line (CopyText now stretches); Activity rows cut an address's last characters; Sent drew the address in sans.

🤖 Generated with Claude Code

Addresses were drawn four ways: CopyText with grouped(), raw mono T,
shortAddress() in the body face, and a hand-styled mono span in the
transaction title. Half the short forms were in Figtree, not Plex Mono.

Address has two forms. Short (first 10…last 6, mono 15) stands in for a
name; with `detail` it is mono 13 in Muted under a name. Full (groups of
4, mono 13) is for checking and copying; `copy` makes it tap-to-copy.
AddressInline puts a short address inside a sentence.

Screen readers hear a short address as "address ending" plus its last 6
characters (spokenAddress), not letters and an ellipsis. No part of an
address is dimmed or highlighted, because address poisoning copies the
ends. The rule is now in design guide §5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gf5901 gf5901 added accessibility Barrier affecting people with disabilities enhancement A new feature or a change to how something behaves P2 Soon: plan into an upcoming milestone area: app The apps: mobile/ (Wizard) and plain/ labels Nov 16, 2026
gf5901 and others added 6 commits November 16, 2026 15:25
A full address is ~36 groups over 5-7 lines. Alternating Text and Muted
helps someone keep their place while comparing it group by group. Every
group weighs the same, so it doesn't favour the ends the way a
highlight would. Spaces stay, so colour is never the only separator.
Muted passes AA on every ground (6.6-8.3:1).

The same in the native confirm and contact sheets (AddressText in
Kit.swift, Kit.address in Kit.kt). The short form stays one colour.
Also drops imports and formatting left over from the first commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alternating per group checkerboarded once text wrapped wherever it ran
out of room, and centred lines shifted sideways. Now a full address is
laid out in lines of as many groups as fit (8, 6, 4 or 2: always even),
sharing one left edge, so the groups stand in columns: odd ones in Text,
even ones in Muted. Larger text gets fewer columns, never a wrapped line.

RN measures its width (groupsPerRow, addressRows in format.ts), iOS
picks the widest layout with ViewThatFits, and Android re-lines its
TextView once laid out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irst

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… address's end

On Receive the centred copy block shrank to its content, so the columns
measured themselves and spiralled down to two (14 lines, buttons off
screen). CopyText now stretches when centred.

An Activity row whose title holds an address may take two lines, so the
last characters, the ones people compare, aren't cut. Sent shows the
address inline in mono instead of a pre-shortened name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'t move it

On Receive and the exchange address, "Copied" appeared above the address
and pushed it down about 20 pt. The line now stays, empty until copied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gf5901
gf5901 merged commit 0733d03 into main Nov 17, 2026
4 checks passed
@gf5901
gf5901 deleted the feat/address-component branch November 17, 2026 00:28
@gf5901 gf5901 mentioned this pull request Nov 17, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Barrier affecting people with disabilities area: app The apps: mobile/ (Wizard) and plain/ enhancement A new feature or a change to how something behaves P2 Soon: plan into an upcoming milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant