fix: App blinks when Attachment error modal shows up#87848
fix: App blinks when Attachment error modal shows up#87848nkdengineer wants to merge 4 commits intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@dukenv0307 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] |
|
@nkdengineer pls fix the issues above. Thanks |
|
@dukenv0307 I updated. |
|
Should we clearTimeout in useEffect cleanup function? |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ 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". |
|
@dukenv0307 I updated. |
|
|
||
| loaderTimeoutRef.current = setTimeout(() => { | ||
| hideLoaderAndHandleNext(); | ||
| }, MIN_LOADER_VISIBLE_DURATION_MS - elapsedTime); |
There was a problem hiding this comment.
@dangrous can you please confirm if the value of 200 for MIN_LOADER_VISIBLE_DURATION_MS is enough?
Screen.Recording.2026-04-16.at.16.44.35.mov
|
I defer to @Expensify/design on this one, to me I think maybe a little longer might be better, even 500 ms? But they'll have a good eye for it. Basically we're artificially lengthening the loader when an image is too large to be processed, so it doesn't "flash" really quickly which looks worse than a longer load. |
|
I think the videos in the issue description seem fine to me. cc @Expensify/design for more thoughts. But if we know the image is too big, why do we even show the loader at all? Couldn't we just pop the modal straight away? |
|
@dannymcclain The dimensions is checking in the resize process so we don't know about this before and always show the loading before process the resize logic. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-22.at.23.42.05.movAndroid: mWeb ChromeScreen.Recording.2026-04-22.at.23.31.42.moviOS: HybridAppScreen.Recording.2026-04-22.at.23.36.47.moviOS: mWeb SafariScreen.Recording.2026-04-22.at.23.29.41.movMacOS: Chrome / SafariScreen.Recording.2026-04-22.at.23.27.34.mov |
|
@dannymcclain can you please check my videos above to confirm they're correct? Thanks |
|
Feels pretty good to me 👍 cc @Expensify/design too |
|
Yeah feeling better for sure 👍 |
Explanation of Change
fix: App blinks when Attachment error modal shows up
Fixed Issues
$ #87605
PROPOSAL: #87605 (comment)
Tests
Offline tests
Same
QA Steps
Same as test
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
Screen.Recording.2026-04-14.at.15.52.21.mov
Android: mWeb Chrome
Screen.Recording.2026-04-14.at.15.52.57.mov
iOS: Native
Screen.Recording.2026-04-14.at.15.49.51.mov
iOS: mWeb Safari
Screen.Recording.2026-04-14.at.15.51.45.mov
MacOS: Chrome / Safari
Screen.Recording.2026-04-14.at.15.48.15.mov