Skip to content

fix(android): draw native sheets in the app's own type - #93

Merged
gf5901 merged 1 commit into
mainfrom
fix/android-sheet-type
Nov 16, 2026
Merged

gf5901 merged 1 commit into
mainfrom
fix/android-sheet-type

Conversation

@gf5901

@gf5901 gf5901 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What and why

The native secret sheets (restore, recovery phrase, viewing key, pay confirmation, and saving a contact) were asking Android for Expo’s JavaScript font names, such as Fraunces_400Regular. Typeface.create does not see those names, and this library does not compile against React Native’s font registry, so the sheets drew with the system font.

Gradle now copies the same five files React Native loads (Fraunces_400Regular, Figtree_400Regular, Figtree_500Medium, Figtree_600SemiBold, IBMPlexMono_400Regular) into the module’s assets at build time. The sheets load them with Typeface.createFromAsset, at the same sizes as the React Native text, buttons, and pill tabs. A selected tab is a raised pill with the word in the text colour. Gold stays on the link, not on the selected word. Buttons are 52dp capsules in Figtree SemiBold 17.

The font binaries stay out of git. They already ship with @expo-google-fonts.

Rules the code keeps

See CONTRIBUTING.md. Tick each box, or
explain below why it doesn't apply.

  • The recovery phrase and keys stay in native code; no JS function takes
    or returns them.
  • Every read of the phrase still needs Face ID, Touch ID, a fingerprint
    or the device passcode.
  • Every send still goes through the native confirmation sheet, drawn from
    the engine's proposal, and ends in the biometric prompt.
  • One network per build: nothing lets a build reach the other network.
  • The wallet database still holds viewing keys only, and no Sapling
    parameters were added.
  • New data kept on the phone stays out of OS backups (or the design says
    otherwise).
  • Nothing here is a recovery phrase (even testnet), a key, a signing file,
    google-services.json or a deployment detail.

Privacy and dependencies

  • This doesn't change what Wizard sends, to which server, or what it
    stores. If it does, say what below: the
    privacy policy has to change in step.
  • No new dependency, or it's explained below (why, who maintains it,
    cargo deny check passes, npm version pinned).
  • The spec or design guide is updated in this PR if behaviour or the look
    changed.

The look of the native sheets changes so it follows the type already in the design guide. The guide itself is not edited.

Testing

Release arm64 build, installed on the Galaxy A16 (version 0.1.0, build 6, 2026-11-16 09:19). The APK contains the five font files under assets/fonts/. Opening the viewing-key sheet did not log a font load failure.

That sheet was opened from Me → Test network → Add a wallet, because this phone already has a wallet, so “I have a wallet” will not open. The title, the explanation, the uview1… field, Paste, Scan, and “Where do I find it?” were on one row. The help line opened under that row. Cancel left the wallet as it was. The text dump cannot show the typeface.

Phrase word entry, the date step, the pay confirmation sheet, and the contact sheet were not opened. scripts/check.sh was not run. It does not compile Kotlin.

Typeface.create cannot see Expo's JavaScript font names, and this
library does not compile against React Native's font registry, so the
secret sheets drew with the system font. Copy the same font files into
the module's assets and load them with Typeface.createFromAsset, at the
same sizes as the React Native text, buttons, and pill tabs.
@gf5901
gf5901 merged commit d8b853c into main Nov 16, 2026
4 checks passed
@gf5901
gf5901 deleted the fix/android-sheet-type branch November 16, 2026 20:27
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