Skip to content

feat: Add sheet translation Y (position) with Reanimated hook #2902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

lodev09
Copy link

@lodev09 lodev09 commented May 5, 2025

Description

This PR introduces new Event for tracking the translation Y value of the sheet when being dragged or presented. This is particularly useful on some use-cases where we want to animate separate views based on the sheet's position e.g. Apple Maps app.

Also added support for Footer on IOS.

Changes

  • Added support for translation Y (position) value event. Includes Reanimated hook.
  • Implement Footer on IOS.
  • Added sheetDismissible prop -- or can we reuse gestureEnabled?

TODO:

  • New Arc (IOS): fix footer visual glitches :/
  • New Arc (Android): fix correct translation Y value.

Test code and steps to reproduce

WIP

IOS

Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-05-06.at.01.19.31.mp4

Android

Screen_recording_20250506_013500.webm

Checklist

@lodev09 lodev09 marked this pull request as draft May 5, 2025 17:42
@lodev09 lodev09 changed the title WIP feat: Add sheet translation Y (position) that with Reanimated hook WIP feat: Add sheet translation Y (position) with Reanimated hook May 6, 2025
@kkafar
Copy link
Member

kkafar commented May 7, 2025

Thanks, I'll look into it by the end of the week

@SimpleCreations
Copy link

Will this work without Reanimated (with the vanilla Animated API)?

@lodev09
Copy link
Author

lodev09 commented May 7, 2025

Will this work without Reanimated (with the vanilla Animated API)?

@SimpleCreations haven't tried but it should -- it's the same logic as the transition animation.

@lodev09
Copy link
Author

lodev09 commented May 7, 2025

Thanks, I'll look into it by the end of the week

Thank you!

Also, let me know if I should remove the footer implementation on IOS -- you guys might have better solution for it. Or feel free to modify/improve.

@lodev09 lodev09 marked this pull request as ready for review May 23, 2025 20:57
@lodev09 lodev09 changed the title WIP feat: Add sheet translation Y (position) with Reanimated hook feat: Add sheet translation Y (position) with Reanimated hook May 27, 2025
@erickreutz
Copy link

@kkafar any interest in getting this merged?

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.

4 participants