[BTAPP-31] Smooth bottom sheet animation with spring entry and fast exit #45

Merged
chris merged 4 commits from feature/BTAPP-31 into main 2026-06-25 08:09:32 -06:00
Owner

Ticket

BTAPP-31 Investigate smoother slide-up animation for bottom sheet

Investigation findings

The jankiness had two root causes:

  1. Animated.timing with the default ease-in-out curve doesn't match the "arrives quickly then settles" feel of a native bottom sheet — spring physics does this naturally
  2. Entry and exit used the same duration and curve; native sheets exit noticeably faster than they enter

Options evaluated: spring physics tuning (chosen), custom Easing curves, react-native-reanimated worklets (no meaningful advantage over useNativeDriver in RN 0.79), and @gorhom/bottom-sheet (heavy dependency for marginal gain here)

Summary

  • Entry animation (visible=true): switches from Animated.timing to Animated.spring on translateY with tension: 65, friction: 11 — arrives decisively then settles without the linear "shudder"; scrim opacity stays timing
  • Exit animation (visible=false): Animated.timing with Easing.in(Easing.quad) at 120 ms (vs 150 ms entry) — accelerates away, snaps off screen like platform conventions expect
  • Adds DISMISS_DURATION = 120 to lib/animations.ts alongside the existing SLIDE_DURATION
  • Adds the first tests for the Sheet component: children are accessible, dismiss button fires onClose
## Ticket [BTAPP-31](http://192.168.2.100:7123/home/browse/BTAPP-31/) Investigate smoother slide-up animation for bottom sheet ## Investigation findings The jankiness had two root causes: 1. `Animated.timing` with the default ease-in-out curve doesn't match the "arrives quickly then settles" feel of a native bottom sheet — spring physics does this naturally 2. Entry and exit used the same duration and curve; native sheets exit noticeably faster than they enter Options evaluated: spring physics tuning (chosen), custom Easing curves, `react-native-reanimated` worklets (no meaningful advantage over `useNativeDriver` in RN 0.79), and `@gorhom/bottom-sheet` (heavy dependency for marginal gain here) ## Summary - Entry animation (`visible=true`): switches from `Animated.timing` to `Animated.spring` on `translateY` with `tension: 65, friction: 11` — arrives decisively then settles without the linear "shudder"; scrim opacity stays timing - Exit animation (`visible=false`): `Animated.timing` with `Easing.in(Easing.quad)` at 120 ms (vs 150 ms entry) — accelerates away, snaps off screen like platform conventions expect - Adds `DISMISS_DURATION = 120` to `lib/animations.ts` alongside the existing `SLIDE_DURATION` - Adds the first tests for the `Sheet` component: children are accessible, dismiss button fires `onClose`
[BTAPP-31] Smooth bottom sheet animation with spring entry and fast exit.
All checks were successful
app / check (pull_request) Successful in 19s
93730a16b3
Merge branch 'main' into feature/BTAPP-31
All checks were successful
app / check (pull_request) Successful in 18s
3aa366f0cc
[BTAPP-31] Apply prettier formatting to sheet components.
All checks were successful
app / check (pull_request) Successful in 22s
plane-sync / sync (pull_request) Successful in 1s
b42eabadf5
chris merged commit 8fe4ef85cb into main 2026-06-25 08:09:32 -06:00
chris deleted branch feature/BTAPP-31 2026-06-25 08:09:32 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris/budget-tracker!45
No description provided.