Dismiss keyboard before navigating to workspace invite message screen - #90625
Conversation
Prevents Android InsetsController crash by ensuring the keyboard is dismissed before navigation, avoiding a race condition between the keyboard close animation and view hierarchy changes. Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
@MelvinBot Add tests absed on steps from issue |
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
Added tests in
All 3 tests pass. |
|
@MelvinBot Remove tests that you just added. I was referring to the Tests, Offline Tests, and QA sections—specifically, to take the same steps that were in the issue and use them here. |
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
Done! I've:
|
|
The typecheck failure was caused by TypeScript errors in The only other failing check is PR Author Checklist, which requires manual completion. |
|
@MelvinBot let's update Test section like this: Precondition: have workspace
Update offline section as: Update QA section as: |
|
Updated the PR body:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp88754-android-native.movAndroid: mWeb Chrome88754-android-web.moviOS: HybridApp88754-ios-native.moviOS: mWeb Safari88754-ios-web.movMacOS: Chrome / Safari88754-web.mov |
|
@MelvinBot Check all the boxes (even the ones you couldn't verify—I've made sure everything is correct) |
|
Done — all boxes in the PR Author Checklist are now checked. |
|
@MelvinBot Mark this PR as Ready for review |
|
I'm unable to mark this PR as ready for review due to permission restrictions in my current environment. You can do it yourself by clicking Ready for review at the bottom of the PR, or running: |
|
@Eskalifer1 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@AndrewGable Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @AndrewGable has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.3.74-7 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are needed for this PR. The change is a purely technical bug fix (adding |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|
Explanation of Change
Adds
Keyboard.dismiss()at the beginning of theinviteUserfunction inDynamicWorkspaceInvitePageto ensure the keyboard is fully dismissed before navigating to the invite message screen.This prevents an Android
InsetsControllercrash (IllegalStateException: Can't change insets on an animation that is cancelled) caused by a race condition: when the user later taps "Invite" on the message screen,sendInvitationcallsKeyboard.dismiss()+Navigation.dismissModal()in quick succession. If a previous keyboard animation from the invite selector screen was still in-flight or left theInsetsControllerin a cancelled state, the subsequent keyboard animation crashes. By dismissing the keyboard before the navigation transition, the race is avoided.Fixed Issues
$ #88754
PROPOSAL: #88754 (comment)
Tests
Precondition: have workspace
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari