Skip to content

Keep the Import Wallet Next button clear of the keyboard - #6161

Open
j0ntz wants to merge 2 commits into
developfrom
jon/import-wallet-keyboard
Open

Keep the Import Wallet Next button clear of the keyboard#6161
j0ntz wants to merge 2 commits into
developfrom
jon/import-wallet-keyboard

Conversation

@j0ntz

@j0ntz j0ntz commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Asana task

The Import Wallet scene rendered everything, including the Next button, inside a
scroll view that did not react to the keyboard. Opening the keyboard to type a
seed hid the button behind it, along with the per-asset Import Options inputs
(the Zcash / Pirate Chain birthday height). A wrapped 12- or 24-word phrase or a
short device made it worse.

The scene now shrinks to the space above the keyboard (SceneWrapper avoidKeyboard, the pattern ~20 other scenes already use, backed by
react-native-keyboard-controller) and its content lives in a real
ScrollView. Because the keyboard is part of the layout, the scroll viewport
ends above it, so the bottom of the scene is reachable; on the unchanged build
the viewport's bottom edge sits underneath the keyboard and no amount of
scrolling reveals Next.

Three style relationships decide the rest of the layout:

  • The scroll content is a flex container. SceneButtons lays itself out as
    flexGrow: 1 + justifyContent: 'flex-end', which only means anything inside
    a flex-sized parent. A scroll content container is content-sized by default,
    so that growth was being resolved against the scroll frame instead, and the
    content kept the height it had before the keyboard shrank the scene. Measured
    on an iPhone 16 Pro Max (440x956): the scroll viewport was 519pt tall and the
    scroll extent was 820pt, so scrolling to the end left 301pt of empty space
    between Next and the keyboard, exactly one keyboard height. contentContainerStyle
    with flexGrow: 1 ties the content height to the content instead of to the
    keyboard: the same measurement now reads a 479pt content in a 459pt viewport,
    and the only space below the button is the 3 rem scene clearance SceneButtons
    itself defines.
  • The logo spacing is the flexible piece. With the content container growing,
    the key logo's block is flexGrow: 1 / flexShrink: 0 over a marginVertical
    of 1 rem: it opens up when the scene has room to spare and closes back to the
    1 rem minimum as the keyboard takes it away. This is what the task asked for,
    and it works now that the content container is flex-sized.
  • The seed field never collapses. FilledTextInput hardcodes flexGrow: 1 /
    flexShrink: 1 on its containers when multiline, so the seed box would
    shrink to whatever room the keyboard leaves rather than sizing to its text. A
    plain non-shrinking View around the field in this scene stops that. No change
    to FilledTextInput itself, so TextInputModal's fullHeight multiline mode
    and SignMessageScene's numberOfLines={4} keep the fill behavior they want.

SceneButtons stays inside the scroll content rather than pinned as a sibling,
so showing the whole word phrase still takes priority over Next being visible
without scrolling.

The maestro import flows used to dismiss the keyboard before tapping Next. That
workaround is gone on iOS in both copies (maestro/common/import-wallets.yaml,
maestro/07-wallets/C000029a-migrate-wallets.yaml): Next is now reachable and
tappable with the keyboard up, which the evidence below shows. Android keeps its
hideKeyboard step, since this pass did not exercise Android.

Asana: https://app.asana.com/1/9976422036640/project/1213880789473005/task/1217525813318788

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

iOS, iPhone 16 Pro Max simulator: a real 24-word BIP39 phrase typed through the
keyboard, then Next tapped with the keyboard still up, driving the import
through to the Create Wallets completion scene ("BTC / My Bitcoin", green
check). Scrolling to the end of the scene with the keyboard up now lands the
button just above the keyboard instead of a keyboard-sized void. The latest
evidence comment carries those frames and supersedes the earlier ones.

Getting into the scene was scaffolded: this simulator would not deliver taps to
the Create Wallet scene's buttons, so a temporary uncommitted useEffect in
WalletListScene navigated straight to Import Wallet. It was reverted before
committing (git status clean). Everything from the scene onward in those
frames is the real app: real keyboard, real typing, real Next press, real
import.

iPhone 13 mini and the BTC + ZEC configuration were exercised on the earlier
revision of this branch, before the gap fix; their frames are in the older
evidence comment.

Android: not exercised in this pass. The change is shared JS and the manifest
already uses adjustResize.

Convert the component to the React.FC form the lint rule expects.
@j0ntz
j0ntz force-pushed the jon/import-wallet-keyboard branch from 003c75c to 7e779e8 Compare August 17, 2026 21:39
@j0ntz
j0ntz marked this pull request as ready for review August 17, 2026 21:39
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7e779e8. Configure here.

Comment thread src/components/scenes/CreateWalletImportScene.tsx
@j0ntz
j0ntz force-pushed the jon/import-wallet-keyboard branch 2 times, most recently from f5b6a1f to dbf030c Compare August 24, 2026 19:23
@j0ntz

j0ntz commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

📸🪓 Test evidence (followup: seed field must not collapse)

🪓 Hack-forced evidence: the two iPhone 13 mini frames were captured with the seed text pre-filled + autoFocus, and the scrolled one with a one-off scrollToEnd, because the maestro gate only drives this session's slot sim (16 Pro Max); the layout itself is unforced and the hacks were reverted. Temporary uncommitted edit, reverted before commit; the marked frames prove the rendering, not the trigger.

btc zec seed typed

btc zec seed typed

btc zec next scrolled

btc zec next scrolled

btc only seed typed

btc only seed typed

btc only next scrolled

btc only next scrolled

btc only imported

btc only imported

🪓 HACK-FORCED: mini btc seed

🪓 HACK-FORCED: mini btc seed

🪓 HACK-FORCED: mini btc next scrolled

🪓 HACK-FORCED: mini btc next scrolled

Captured by the agent's in-app test run (build-and-test).

@j0ntz

j0ntz commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence, iPhone 13 mini re-run (supersedes the earlier comment's mini frames)

mini btc seed typed

mini btc seed typed

mini btc next scrolled

mini btc next scrolled

Captured by the agent's in-app test run (build-and-test).

The scene rendered its content, including the Next button, inside a scroll
view that did not react to the keyboard, so opening the keyboard to type a
seed hid the button behind it. Shrink the scene to the space above the
keyboard, keep the button pinned below the scrolling content, and let the
key logo flex instead of holding a fixed 2 rem of margin.

Drop the keyboard-dismiss steps the maestro import flows needed to reach the
button.
@j0ntz
j0ntz force-pushed the jon/import-wallet-keyboard branch from dbf030c to e1f444b Compare August 28, 2026 04:13
@j0ntz

j0ntz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence: gap between Next and the keyboard (iPhone 16 Pro Max, iOS 18.6)

import keyboard open

import keyboard open

scrolled to end

scrolled to end

keyboard closed

keyboard closed

import success

import success

Captured by the agent's in-app test run (build-and-test).

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