Skip to content
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

Merged
merged 9 commits into from
Sep 11, 2024

Conversation

ASalavei
Copy link
Collaborator

@ASalavei ASalavei commented Sep 2, 2024

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

Release Notes

Fixes - iOS

  • Fix offset issues with keyboard and TextField
  • Fix "Incorrect imePadding and high cpu usage when repeatedly opening and closing Keyboard on iOS"
  • Fix "Selection handlers in wrong positions in a fullscreen TextField"

@ASalavei ASalavei force-pushed the andrei.salavei/ime-insets-fix branch from a494e07 to 7a56156 Compare September 4, 2024 15:19
@ASalavei ASalavei changed the title Fix IME insets propagation and Scroll To Focused Node behaviour [SIP] Fix IME insets propagation and Scroll To Focused Node behaviour Sep 4, 2024
@ASalavei ASalavei changed the title [SIP] Fix IME insets propagation and Scroll To Focused Node behaviour [WIP] Fix IME insets propagation and Scroll To Focused Node behaviour Sep 4, 2024
@ASalavei ASalavei changed the title [WIP] Fix IME insets propagation and Scroll To Focused Node behaviour Fix IME insets propagation and Scroll To Focused Node behaviour Sep 9, 2024
@ASalavei
Copy link
Collaborator Author

ASalavei commented Sep 9, 2024

@mazunin-v-jb , @MatkovIvan , I have significantly updated the keyboard animation implementation. Please take a look.
As there is a plan to deprecate canvas layers on iOS, the keyboard interaction specifics in this mode remain untouched.

@m-sasha , I added some changes to the iOS instrumented tests. You might want to take a look.

Copy link

@mazunin-v-jb mazunin-v-jb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@MatkovIvan MatkovIvan left a 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

@ASalavei ASalavei merged commit 62e4ca1 into jb-main Sep 11, 2024
6 checks passed
@ASalavei ASalavei deleted the andrei.salavei/ime-insets-fix branch September 11, 2024 10:53
ASalavei added a commit that referenced this pull request Sep 11, 2024
## 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
@igordmn
Copy link
Collaborator

igordmn commented Sep 19, 2024

Added Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants