-
Notifications
You must be signed in to change notification settings - Fork 136
[Android SDK update] Bottom sheet fixes #13285
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
[Android SDK update] Bottom sheet fixes #13285
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
…oid-sdk-update-min-sdk-to-35-bottomsheet-fixes
…oid-sdk-update-min-sdk-to-35-bottomsheet-fixes
…oid-sdk-update-min-sdk-to-35-bottomsheet-fixes
…oid-sdk-update-min-sdk-to-35-bottomsheet-fixes
kidinov
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.
@JorgeMucientes huge thanks for your work here!
I noticed a weird glitch on Android 33 emulator. I can pull up the keyboard just by scrolling up. It doesn't happen on a real Android 35 device
Also, notice that the top toolbar padding is off. It's white for some reason too
01-14--16-29.mp4
...rce/src/main/kotlin/com/woocommerce/android/ui/compose/component/WCModalBottomSheetLayout.kt
Outdated
Show resolved
Hide resolved
|
@JorgeMucientes the scrolling part seems to be due to usage of |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 13269-android-sdk-update-min-sdk-to-35 #13285 +/- ##
============================================================================
- Coverage 41.09% 41.09% -0.01%
Complexity 6420 6420
============================================================================
Files 1321 1320 -1
Lines 77184 77193 +9
Branches 10645 10644 -1
============================================================================
Hits 31721 31721
- Misses 42653 42662 +9
Partials 2810 2810 ☔ View full report in Codecov by Sentry. |
...rce/src/main/kotlin/com/woocommerce/android/ui/compose/component/WCModalBottomSheetLayout.kt
Outdated
Show resolved
Hide resolved
Great catch @kidinov! The purpose of it was to hide the keyboard when a bottomsheet is opened and swiped down. But the downside was the bug that you reported. To get better idea:
withImeScroll.mp4
notImenestedScrol.mp4I ended up adding the |
kidinov
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.
Thanks @JorgeMucientes LGTM!
27cd51f
into
13269-android-sdk-update-min-sdk-to-35
Part of: #13285
Description
This PR fixes several issues related to
ModalBottomSheetLayoutcomposable.We had a custom
ModalBottomSheetLayoutcomponent with a workaround to apply the darker background overlay when a bottom sheet is opened over theStatusBar. In Android 15 some APIs that this workaround relies on, have been deprecated. The aim of this PR is to stop using the deprecated APIs on Android 15 onwards. For that the following changes have been applied:ModalStatusBarBottomSheetLayouthas been renamed toModalBottomSheetLayoutWithStatusBarWorkAroundto make it clearer what is different from the regularModalBottomSheetLayout. The class has also been made private to avoid accidental usages.WCModalBottomSheetLayoutinstead ofModalBottomSheetLayoutor any other variant.WCModalBottomSheetLayoutwill use regularModalBottomSheetLayoutfor Android 15 and beyond, andModalBottomSheetLayoutWithStatusBarWorkAroundbelow Android 15.Testing information
Test in Android 14 or below
Test in Android 15 targeting API 35
Set the
targetSdk = 35and compile the app. Check bottom sheet darker background overlays the status bar.NOTE: When targeting API 35 and running the app on Android 15 (API 35) then the content becomes edge to edge by default and we'll need to manually deal with window insets ourselves. Otherwise the nav bar will overlay the status bar as you'll see in the screen recording below.
tagetSdk35.mp4
NOTE: If we release the app only changing the
compileSdk = 35but nottargetSdk=35the status bar won't be overlayed by bottom sheet dark background in Android 15. It is not a big deal, but just a heads up on that.The tests that have been performed
The above.
Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: