-
-
Notifications
You must be signed in to change notification settings - Fork 597
fix(Android, Stack): Fix FormSheet - SafeAreaView integration #3336
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
Draft
t0maboro
wants to merge
29
commits into
main
Choose a base branch
from
@t0maboro/form-sheet-flex-end
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+527
−26
Conversation
This file contains hidden or 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
2 tasks
bb6e584 to
76ef71f
Compare
2 tasks
kligarski
approved these changes
Nov 3, 2025
Contributor
kligarski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I have 2 questions:
- did you check older Android APIs as well?
- did you check how this behaves with changes from #3248?
android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetMetrics.kt
Show resolved
Hide resolved
Contributor
Author
Yes, I went down to 28
Yes |
kligarski
reviewed
Nov 3, 2025
android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetMetrics.kt
Outdated
Show resolved
Hide resolved
1f05c0c to
9c70d4b
Compare
Contributor
Author
|
Switching to draft, because the additional effort is needed after merging: #3248 |
t0maboro
added a commit
that referenced
this pull request
Nov 7, 2025
## Description When using 3 detents, the size of the `formSheet` is calculated based on the screen size and does not respect the detents. In this PR, I add a `maxHeight` to `SheetBehavior` when using 3 detents, ensuring the sheet respects the detent configuration. I also did a minor refactor of this variable for consistency. **Note:** In the example, I'm adding more TCs for better regression testing, but only 3 detents were broken **Note:** With this PR i noticed that the formsheet doesn't respect system bars, I started working on that issue separately: #3336 Fixes software-mansion/react-native-screens-labs#458 ## Changes - Added `maxHeight` for sheetBehavior with 3 detents ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before https://github.com/user-attachments/assets/cd800504-0e81-4334-9eeb-dee0baaf913e ### After https://github.com/user-attachments/assets/15068903-8102-4480-85c5-7147a5212378 ## Test code and steps to reproduce Added a new example for regression testing - with more examples than just the failing one, just in case. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Update the logic of returned insets for SAV component used with the
formSheetto define the available space on Android. From now on, the size of the formSheet is constrained by the maximum detent, and the content size equals the formSheet size with insets coming from systemBars or ime subtracted, depending on the test case.Fixes: https://github.com/software-mansion/react-native-screens-labs/issues/457
Changes
SheetDelegateSheetBehaviorfor 3 detents - constraining the size withmaxHeightScreenshots / GIFs
Here you can add screenshots / GIFs documenting your change.
You can add before / after section if you're changing some behavior.
Before
before.mov
After
after.mov
Test code and steps to reproduce
Added
Test3336for testing.Checklist