Fix icons delay on iOS when switching tabs#61167
Closed
OlimpiaZurek wants to merge 1 commit into
Closed
Conversation
4ffcb29 to
f9d1c08
Compare
|
@rushatgabhane 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] |
f9d1c08 to
46cd950
Compare
Member
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
rushatgabhane
suggested changes
May 9, 2025
rushatgabhane
left a comment
Member
There was a problem hiding this comment.
@OlimpiaZurek i think you have pushed Mobile-Expensify commit by mistake
Member
|
@OlimpiaZurek could you also write simple test steps so that it is easier for QA, thank you!! |
05af300 to
fb8ee4f
Compare
fb8ee4f to
0e66034
Compare
Contributor
Author
|
Hey @rushatgabhane I ran into some issues while trying to revert the pushed Mobile-Expensify commit, so I created a new PR: #61773 with the correct changes. I’ll close this one if you don’t mind. |
Member
|
yeah of course. Please close this one, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Problem
When switching between bottom tabs on iOS, SVG icons rendered using the expo-image component often appear with a noticeable delay . This visual glitch occurs because of how iOS handles component unmounting and remounting during tab switching. In the current implementation, the ImageSVG component is fully unmounted when a tab is left, and then remounted when returning to the tab. Even if the image was previously loaded, iOS may delay rendering it—especially for SVGs that require decoding or layout computation—causing a flash or pop-in effect that feels jarring to the user.
Solution
To address this, apply two improvements to the ImageSVG component:
cachePolicy="memory-disk"- This enables both memory and disk caching of the image, reducing the likelihood of reprocessing the image after remount.These changes ensure that images are both efficiently cached for performance and visually transitioned for polish, resolving the flicker during tab switching.
Before:
before.mp4
After:
after.mp4
Fixed Issues
$ #60007
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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))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
MacOS: Desktop