Remove onDismiss, trigger onModalHide on Android; fix early-unmount setReadyToFocus#77104
Conversation
…cus after it fully closes
| // When the modal becomes not visible, run dismiss logic to setReadyToFocus after it fully closes. | ||
| if (!(isVisible || !wasVisible)) { | ||
| handleDismissModal(); | ||
| } |
There was a problem hiding this comment.
In your proposal, ComposerFocusManager.setReadyToFocus(uniqueModalId) is called on unmount
() => () => {}
Didn't it work?
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
More so a design-focused PR, though testing steps look good and approved by product.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb Chromemchrome.moviOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movweb2.mov |
situchan
left a comment
There was a problem hiding this comment.
Confirmed all 4 old issues are not reproducible.
| onModalHide(); | ||
| if (getPlatform() !== CONST.PLATFORM.ANDROID) { | ||
| onModalHide(); | ||
| } |
There was a problem hiding this comment.
Confirmed changes in this file is straight revert of #71637
dangrous
left a comment
There was a problem hiding this comment.
One change, otherwise looks good.
Can we also add the QA steps for those 4 existing closed issues into this PR description please, so they can test as well?
Thanks!
|
@dangrous it's done |
…erlap-after-emoji
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.2.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.78-8 🚀
|
Explanation of Change
Removes the unreliable onDismiss callback and manually triggers onModalHide on Android. Also ensures setReadyToFocus is called when the modal unmounts before handleDismissModal runs, preventing stuck focus promises.
Fixed Issues
$ #72648
PROPOSAL: #72648 (comment)
Tests
Same QA step
Offline tests
QA Steps
#70912
#71177
#71760
#71938
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2025-12-09.at.09.32.01.mp4
Android: mWeb Chrome
Screen.Recording.2025-12-09.at.09.32.41.mp4
iOS: Native
Screen.Recording.2025-12-09.at.09.34.46.mp4
iOS: mWeb Safari
Screen.Recording.2025-12-09.at.09.35.12.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-12-09.at.09.30.22.mp4
Double-check the issue: #70912
Android: Native
Screen.Recording.2025-12-09.at.10.21.23.mp4
Android: mWeb Chrome
Screen.Recording.2025-12-09.at.10.23.11.mp4
iOS: Native
Screen.Recording.2025-12-09.at.10.25.26.mp4
iOS: mWeb Safari
Screen.Recording.2025-12-09.at.10.26.14.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-12-09.at.10.22.13.mp4
Double-check the issue: #71177
Android: Native
Screen.Recording.2025-12-09.at.10.33.49.mp4
Android: mWeb Chrome
Screen.Recording.2025-12-09.at.10.34.49.mp4
iOS: Native
Screen.Recording.2025-12-09.at.10.36.28.mp4
iOS: mWeb Safari
Screen.Recording.2025-12-09.at.10.37.39.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-12-09.at.10.29.45.mp4
Double-check the issue: #71760
Android: Native
Screen.Recording.2025-12-09.at.10.42.54.mov
Android: mWeb Chrome
Screen.Recording.2025-12-09.at.10.42.17.mov
iOS: Native
Screen.Recording.2025-12-09.at.10.44.31.mov
iOS: mWeb Safari
Screen.Recording.2025-12-09.at.10.45.09.mov
MacOS: Chrome / Safari
Screen.Recording.2025-12-09.at.10.43.29.mov
Double-check the issue: #71938
Android: Native
Screen.Recording.2025-12-09.at.10.48.26.mov
Android: mWeb Chrome
Screen.Recording.2025-12-09.at.10.49.18.mov
iOS: Native
Screen.Recording.2025-12-09.at.10.46.59.mov
iOS: mWeb Safari
Screen.Recording.2025-12-09.at.10.46.34.mov
MacOS: Chrome / Safari
Screen.Recording.2025-12-09.at.10.47.24.mov