Skip to content

Conversation

@Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Nov 8, 2025

image

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)


Note

Introduce a docked action bar via SceneWrapper and KavButtons, replace the old keyboard-accessory button, and update swap/ramp screens to show Cancel/Next during amount entry.

  • UI/Infrastructure:
    • SceneWrapper: Add dockProps to render a docked, keyboard-aware action bar with smooth iOS/Android handling.
    • Buttons: New KavButtons component for primary/tertiary actions; remove legacy KavButton and dependency on react-native-keyboard-accessory.
  • Scenes Updated:
    • SwapCreateScene: Use docked KavButtons (shows Cancel + Next when editing amounts), add SceneButtons when keyboard closed; minor layout/padding adjustments.
    • RampCreateScene, RampKycFormScene, FiatPluginEnterAmountScene: Migrate to docked KavButtons for Next actions.
  • Components:
    • SwapInput: Simplify API (remove returnKey handling; rely on onNext).
  • Tests/Docs:
    • Update SwapCreateScene snapshots for layout changes.
    • CHANGELOG: Note Cancel/Next in SwapCreateScene during amount edits.
  • Dependencies:
    • Remove react-native-keyboard-accessory.

Written by Cursor Bugbot for commit 4b97df8. This will update automatically on new commits. Configure here.

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

A few cleanups, and an optional refactor.

Comment on lines 205 to 204
useEffect(() => {
const showListener = Keyboard.addListener(
isIos ? 'keyboardWillShow' : 'keyboardDidShow',
() => {
isClosingSv.value = false
}
)
const hideListener = Keyboard.addListener(
isIos ? 'keyboardWillHide' : 'keyboardDidHide',
() => {
isClosingSv.value = true
}
)
return () => {
showListener.remove()
hideListener.remove()
}
}, [isIos, isClosingSv])
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like one effect could update both the boolean and the shared value?

Comment on lines +295 to +294
const collapsedInsetBottom = useMemo(
() =>
safeAreaInsets.bottom +
(hasNotifications ? notificationHeight : 0) +
(hasTabs ? MAX_TAB_BAR_HEIGHT : 0) +
footerHeight,
[
footerHeight,
hasNotifications,
hasTabs,
notificationHeight,
safeAreaInsets.bottom
]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: The library https://github.com/kirillzyusko/react-native-keyboard-controller has a lot of this stuff baked in, including useKeyboardAnimation which gives a shared value linked to the height, and the good news is that we already use this library in our app. They also have keyboard-avoiding views, but I don't know if we can use those as-is because of the scene wrapper integration needs. Worth looking in to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These lines compute app insets (safe area bottom + notifications + tab bar + footer) which the react-native-keyboard-controller doesn't know about

@Jon-edge
Copy link
Collaborator Author

Re: #5837 (comment)

According to the react-native-keyboard-controller docs, we’re already using useReanimatedKeyboardAnimation() here to drive the bottom positioning and clamp during close. We kept a small bit of custom logic for scene-wrapper integration (tab bar/footer/notifications insets and close-direction clamping) that the stock avoiding views don’t cover out of the box. If you want, I can explore replacing more of this with their avoiding view, but I expect we’d still need the clamp behavior for our tab/footer stack.

Jon-edge added a commit that referenced this pull request Nov 13, 2025
Quote: I don't know if  is an awesome name. I would call it  or something like that.\nURL: #5837 (comment)
Jon-edge added a commit that referenced this pull request Nov 13, 2025
Quote: Seems like one effect could update both the boolean and the shared value?\nURL: #5837 (comment)
@Jon-edge Jon-edge force-pushed the jon/kav-updates branch 2 times, most recently from d262852 to ebe58d5 Compare November 13, 2025 22:43
@Jon-edge Jon-edge force-pushed the jon/kav-updates branch 2 times, most recently from f5d7adb to 31412c1 Compare November 13, 2025 23:01
- Avoids duplicate inset logic and having to set a sibling component at the callsite.
- Also make it more generic in preparation for other button layouts.
@Jon-edge Jon-edge merged commit 62776a6 into develop Nov 15, 2025
3 checks passed
@Jon-edge Jon-edge deleted the jon/kav-updates branch November 15, 2025 00:40
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.

3 participants