Repository navigation
fix: keep modal content mounted during close animation to prevent content flash - #90511
abzokhattab wants to merge 1 commit into
Conversation
|
@mkhutornyi @roryabraham One of you needs to 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] |
…tent flash When isVisible becomes false, isTransitioning is true until the exit animation completes. Rendering containerView with modalVisibility (isVisible || isTransitioning) instead of isVisible alone ensures the content stays mounted through the full fade-out, matching the previous isVisibleState behavior that was removed in Expensify#90358. Fixes Expensify#90510
50633d1 to
2d3f9ec
Compare
|
let me verify all others i fixed most of them |
|
🚧 @Beamanator has triggered a test Expensify/App build. You can view the workflow run here. |
|
Do I need to review as I got assigned first here? |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
i am not sure if we need c+ review, as these are regressions for a PR we worked on |
|
I think better to revert since offending PR is just a refactor. I can confirm all linked blockers are not reproducible in revert. |
|
#90438 is still reproducible on this branch. App freezes this time, even worse. Screen.Recording.2026-05-13.at.3.10.15.PM.mov |
agree yes i think it didnt fix all of them |
|
created a revert here #90522 |
Explanation of Change
When PR #90358 refactored
ReanimatedModal, it replacedisVisibleState(a one-render-lagged state mirror of theisVisibleprop) with direct references toisVisible. This introduced a timing gap during the close animation:isVisibleprop becomesfalse(parent signals close)isContainerOpenis stilltrue(exit animation hasn't completed yet)isTransitioning = isVisible !== isContainerOpen = true→modalVisibility = true— the RN<Modal>wrapper stays mounted correctly{isVisible && containerView}renders nothing — content vanishes immediately while the transparent modal wrapper is still open, making the chat list visible through it as a flashFix: Replace
{isVisible && containerView}with{modalVisibility && containerView}in both theavoidKeyboardandFocusTrapForModalbranches.modalVisibilityis alreadyisVisible || isTransitioning, so content stays mounted for the full duration of the exit animation and unmounts cleanly onceonCloseCallBackfires.Fixed Issues
$ #90510
$ #90438
$ #90463
$ #90442
Tests
Offline tests
Not applicable — modal open/close behavior is not network-dependent.
QA Steps
#90438 — Distance RHP animates correctly after changing distance rate:
6. Go to Workspace Settings > Distance Rates
7. Tap Settings > Unit and select a different rate
8. Verify the RHP animates in and out correctly (no freeze or missing animation)
#90442 — Delete actions work immediately after closing a modal (Android):
9. Open any expense report and tap More > Delete > Delete
10. Verify the delete confirmation modal appears without delay and the expense is removed
11. Repeat for other delete flows: saved search, category, tag, distance rate — all should respond immediately
#90463 — Import spreadsheet modal appears after dismissing an upgrade modal (Android):
12. Go to Workspace Settings > Tags, enable tags, add one
13. Tap More > Import spreadsheet > Multi-level of tags > Upgrade > Got it Thanks
14. Tap Switch Tag Levels
15. Verify the Import spreadsheet modal appears correctly with a Choose file button
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari