No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!258
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "254-255-keyboard-form-ux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two related form-UX fixes on the universal client, bundled because they
sweep the same set of screens.
react-native-keyboard-controller(pinned to
1.21.10), mounts<KeyboardProvider>inapp/_layout.tsx, and swaps each form-bearing screen's outer scrollcontainer for
KeyboardAwareScrollView. On focus the lib auto-scrollsthe field into view above the soft keyboard. The library ships a
no-op web shim (its
bindings.tsresolves all native modules toplain Views and
addListenerreturns a no-op subscription), so PWAbehaviour is unchanged.
fields get
returnKeyType="next"+blurOnSubmit={false}+onSubmitEditing={() => nextRef.current?.focus()}, and the terminalfield calls the submit handler under
returnKeyType="go"or"done". Single-field forms (skills add/rename, PAT create, serverURL) submit directly on Enter. Multiline fields keep Enter as a
newline — save remains on the explicit button.
Library choice (#254)
Picked
react-native-keyboard-controllerover the olderreact-native-keyboard-aware-scroll-view: modern, activelymaintained, single-call API, and the autoscroll behaviour is the
load-bearing UX gap. Its peerDeps (
react-native-reanimated >=3.0.0)are already satisfied by the existing
4.3.1install.Screens touched
apps/client/app/login.tsxapps/client/app/register.tsxapps/client/app/server-setup.tsxapps/client/app/(app)/profile.tsx(Basics card, contacts add row,contacts edit row)
apps/client/app/(app)/notes.tsx(create + edit forms; the innerFlatListcollapses to a.map()so theKeyboardAwareScrollViewowner can measure focused-input position)apps/client/app/(app)/skills.tsx(add-section, add-skill, rename)apps/client/app/(app)/experience.tsx(Education / Job / Positionforms; Contribution form is all-multiline so it stays on the
explicit submit button)
apps/client/app/(app)/account.tsx(PAT create)Two commits so each fix is independently reviewable.
Test plan
pnpm install --frozen-lockfilepnpm -F @carol/api typecheck/lintpnpm -F @carol/api-client typecheck/lint/test/checkpnpm -F @carol/client typecheck/lint/test/export:webTextInputon eachform-bearing screen, confirm the field stays visible above the
keyboard. Could not run on a physical device from this worktree;
flagging for follow-up smoke.
to password, Enter on password submits. Same chain on
register.tsx,server-setup.tsx, and every multi-field editform. Could not run on a device; flagging for follow-up smoke.
Notes / surprises
react-native-keyboard-controller's web shim is a clean no-op:bindings.ts(the default, non-.nativeentry) returns plainViews for every native component and no-opaddListeners forevery event emitter.
KeyboardAwareScrollViewstill wraps a realReanimated
ScrollViewon web, so layout is unchanged.FlatListfor note rows; thatnested-virtualisation defeats
KeyboardAwareScrollView'sfocused-input measurement. Inlined the rows as a flat
.map()—acceptable since per-user notes lists are short.
onSubmitEditingon RN-Web maps to the browser's Enter key, so theexplicit wiring covers both platforms and there's no
<form>element to lean on for native Enter-submit. Verified the typed
ref<TextInput>pattern compiles under the RN-WebTextInputtype.
returnKeyType="go"renders as "Go" on iOS, "↵" on Android, and"Enter" on the web.
"done"renders as the locale's done-buttonglyph on native and Enter on the web. Both submit on Enter.
Closes #254.
Closes #255.
📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.