-
Notifications
You must be signed in to change notification settings - Fork 76
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 IME insets propagation and Scroll To Focused Node behaviour #1523
Conversation
compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/node/RootNodeOwner.skiko.kt
Outdated
Show resolved
Hide resolved
...e/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/ComposeSceneKeyboardOffsetManager.kt
Outdated
Show resolved
Hide resolved
a494e07
to
7a56156
Compare
@mazunin-v-jb , @MatkovIvan , I have significantly updated the keyboard animation implementation. Please take a look. @m-sasha , I added some changes to the iOS instrumented tests. You might want to take a look. |
...ose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/test/UIKitInstrumentedTest.kt
Outdated
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/platform/PlatformInsets.uikit.kt
Outdated
Show resolved
Hide resolved
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.
lgtm
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.
LGTM overall, just minor code/style cleanup requests
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Outdated
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Outdated
Show resolved
Hide resolved
## Proposed Changes Update IME insets handling and improve keyboard appearance animation synchronisation. Add to skikoMain code responsible for layer offset when element is focused. ## Testing Test: All 4 combinations with all possible values of `ComposeUIViewControllerConfiguration.onFocusBehavior` and `ComposeUIViewControllerConfiguration.platformLayers` should be verified in combination with TextField on the scene. Also, verify Matryoshka-like interop views containing TextField. ## Issues Fixed Fixes: https://youtrack.jetbrains.com/issue/CMP-5009/Offset-difference-in-IME-padding-between-iOS-and-Android Fixes: https://youtrack.jetbrains.com/issue/CMP-1501/Long-TestField-still-behaves-strange Fixes: https://youtrack.jetbrains.com/issue/CMP-3621/Issues-with-Keyboard-and-TextField-on-iOS. Fixes: https://youtrack.jetbrains.com/issue/CMP-4506/Incorrect-imePadding-and-high-cpu-usage-when-repeatedly-opening-and-closing-Keyboard-on-iOS Fixes: https://youtrack.jetbrains.com/issue/CMP-6635/iOS.-almostFullScreen.-Selection-handlers-in-wrong-positions
Added Release Notes |
Proposed Changes
Update IME insets handling and improve keyboard appearance animation synchronisation.
Add to skikoMain code responsible for layer offset when element is focused.
Testing
Test: All 4 combinations with all possible values of
ComposeUIViewControllerConfiguration.onFocusBehavior
andComposeUIViewControllerConfiguration.platformLayers
should be verified in combination with TextField on the scene.Also, verify Matryoshka-like interop views containing TextField.
Issues Fixed
Fixes: https://youtrack.jetbrains.com/issue/CMP-5009/Offset-difference-in-IME-padding-between-iOS-and-Android
Fixes: https://youtrack.jetbrains.com/issue/CMP-1501/Long-TestField-still-behaves-strange
Fixes: https://youtrack.jetbrains.com/issue/CMP-3621/Issues-with-Keyboard-and-TextField-on-iOS.
Fixes: https://youtrack.jetbrains.com/issue/CMP-4506/Incorrect-imePadding-and-high-cpu-usage-when-repeatedly-opening-and-closing-Keyboard-on-iOS
Fixes: https://youtrack.jetbrains.com/issue/CMP-6635/iOS.-almostFullScreen.-Selection-handlers-in-wrong-positions
Release Notes
Fixes - iOS
TextField
imePadding
and high cpu usage when repeatedly opening and closingKeyboard
on iOS"