Repository navigation
One style kit per platform for the native screens - #94
Merged
Merged
Conversation
Kit.swift and Kit.kt hold the native screens' text kinds, buttons (primary, secondary, quiet, danger), link, chip, word choice, pill tabs, detail row, Testnet badge, field, switch and sheet ground, named after the React Native components. The pay confirmation, contact, recovery phrase, viewing key and restore screens on both platforms now use them and set no fonts, sizes, radii or colours of their own. theme.ts gains the sizes the kits and RN components shared as literals (dust, monoLarge, button, tab, badge, space.button, space.pillInset), and the RN components use them. The plugin's theme gains faint (placeholders) and onAccent (the Testnet badge's words). native-kit.test.ts fails when either kit or app.json stops matching theme.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- iOS Face.mono is 13 and Face.monoLarge 16, the same as Size and TextKind. - Every iOS kit control fades when disabled (in PressedFade), not only KitButton: chips, link, word choices and tabs while restoring. - Pill tabs count the track's inset as part of each 48-point target, as React Native's hitSlop does; a tap on the chosen tab does nothing. - Drop the unused Radius.card from both kits. - The drift test checks each iOS face's full PostScript name. - Android: build the older-funds note with its text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The raised pill stays inset (InsetDrawable); the track's inset is part of each tab's target, as on iOS and in React Native. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The native screens (pay confirmation, saving a contact, recovery phrase, backup check, viewing key, restore) each set their own fonts, sizes, corners and colours. #92 and #93 fixed the type, but every file still had its own
text(),field(),row(), tab and chip code, so changing the look meant editing a dozen places on each platform.This adds one kit per platform, named after the React Native components:
ios/Kit.swift)android/.../Kit.kt)Text(…).kit(.body)Kit.text(a, …, TextKind.BODY)TKitButton(…, .primary / .secondary / .quiet, danger:, busy:)Kit.button(a, …, ButtonKind.…)ButtonLinkButtonKit.linkHeaderLinkPillTabsKit.pillTabsTabs variant="pill"TestnetBadgeKit.testnetBadgeTestnetBadge.kitField()Kit.fieldTextFieldDetailRow,Chip,WordChoice,KitToggle,KitPage,.kitCard()detail,chip,wordChoice,switch,bottomSheetThe screens on both platforms now use only the kit and set no fonts, sizes, radii or colours of their own. On Android,
KitButtondims to 0.8 while pressed and fades to 0.45 when disabled, like the RN button. Before, Android showed neither. On iOS every kit control now fades when disabled (before, only the main buttons did), so the restore screen's chips, link and tabs fade while it restores. Pill tabs on both platforms count the track's inset as part of the 48-point target, as RN'shitSlopdoes.Keeping it in step with RN.
theme.tsgains the sizes the RN components and the native screens both wrote out as literals (size.dust,monoLarge,button,tab,badge,space.button,space.pillInset), and the RN components now use them. The kits copysize,radiusandspaceunder the same names. The plugin's theme gainsfaint(placeholders) andonAccent(the Testnet badge's words). The newmobile/src/native-kit.test.tsfails when:Kit.swiftorKit.ktdiffers fromtheme.ts, or the two kits stop having the same names;app.json's nativetheme/themeLightdiffers from Night / Vellum intheme.ts;The native fallback colours were already checked against
app.jsonbyplugin/options.test.ts, so the chain is theme.ts → app.json → native fallbacks.wallet-native/README.mdhas a new section on how to change the look.Small visible changes, all toward the RN look:
radius.sheetTop).faint, notmuted.onAccent, and its vertical padding is 2 (RN), not 3.radius.field), body type.Rules the code keeps
See CONTRIBUTING.md. Tick each box, or
explain below why it doesn't apply.
or returns them.
or the device passcode.
the engine's proposal, and ends in the biometric prompt.
parameters were added.
otherwise).
google-services.jsonor a deployment detail.FLAG_SECURE,
privacySensitive(), the capture watch and the confirmation sheet's content are unchanged; only how they are drawn moved.Privacy and dependencies
stores. If it does, say what below: the
privacy policy has to change in step.
cargo deny checkpasses, npm version pinned).changed.
The design guide is not edited. The native screens now follow the tokens it already describes, and the README documents the kits.
Testing
biome check,tsc --noEmitandvitestformobile(133 tests) andwallet-native(161 tests) pass. The new drift test was checked by changingRadius.fieldinKit.ktto 12: it failed and named the value.expo prebuild+./gradlew --offline :wizard-wallet-native:compileDebugKotlin: BUILD SUCCESSFUL.swiftc -typecheckagainst the iOS simulator SDK at the podspec's 16.4 target, forKit.swift, the three screen files,WalletSettings.swiftand the current UniFFI bindings (stubs for the rest of the module): no errors. No full xcodebuild.scripts/check.sh's Rust steps not run.🤖 Generated with Claude Code