-
Notifications
You must be signed in to change notification settings - Fork 486
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
fix(mobile): couldn’t properly scroll in sheet #5025
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Branch preview✅ Deploy successful! Storybook: |
Coverage (35%)
|
clovisdasilvaneto
approved these changes
Feb 19, 2025
When the list of safes was big one was not able to scroll inside of it.
7a7d5f7
to
7007d76
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it solves
When the list of safes was big one was not able to scroll inside of it.
Resolves #
fixes #4972
How this PR fixes it
🪄
There were a couple of gotchas. The Sheet doesn't automatically account for safe areas. So we had to apply an inset on the top, because previously we were behind the notch. We tried to go around this by using the snap point and setting the laste one at 90%, but this doesn't work with dynamic resizing. There is a bug in bottom-sheet in combination with react-native-animated. Bottom sheet is ignoring the max snap point. So, by setting the correct inset we can expand the sheet to 100% and the content will still be visible. Then we had to take the inset bottom in account. By relying on some random padding we were making the layout unpredictable. According to the docs of bottom shett it should auto account for the height of the footer, but it didn't seem to be the case. I had to calculate the height of the footer content and apply a marginbottom on the scrollview inside of it. This way the safes were visible.
How to test it
Add a lot of safes and try to scroll in the list and select the ones that were previously behind the bottom footer.
Screenshots
Checklist