-
-
Notifications
You must be signed in to change notification settings - Fork 595
fix(Android, Stack): Fix flex-end positioning in formSheet #3346
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
Conversation
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 good.
2ec13af to
1b0b681
Compare
kkafar
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.
I don't have any functional remarks. Good job on that front. But some stylistic nitpicks here 👇🏻 When we get this cleaned up, we can proceed.
Will be nitpicking here hard, but I see some code refactored & inconsistencies introduced.
Btw. if we have a small data structure for the detents we could solve this cleaner.
android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt
Outdated
Show resolved
Hide resolved
I remember about that, but unfortunately I haven't a capacity to focus on it yet https://github.com/software-mansion/react-native-screens-labs/issues/536 |
kkafar
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 good now. Great job. Thanks! ✅
Description
When using 3 detents, the size of the
formSheetis calculated based on the screen size and does not respect the detents. In this PR, I add amaxHeighttoSheetBehaviorwhen 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 https://github.com/software-mansion/react-native-screens-labs/issues/458
Changes
maxHeightfor sheetBehavior with 3 detentsScreenshots / 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 a new example for regression testing - with more examples than just the failing one, just in case.
Checklist