-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expo image #30905
Expo image #30905
Conversation
✋ 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/roryabraham in version: 1.4.17-0 🚀
|
@@ -99,9 +99,12 @@ | |||
"dom-serializer": "^0.2.2", | |||
"domhandler": "^4.3.0", | |||
"expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#398bf7c6a6d37f229a41d92bd7a4324c0fd32849", | |||
"expo": "^49.0.0", | |||
"expo-image": "1.8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason for 1.8.1 not 1.9.0?
cc @mountiny
iconFill = undefined, | ||
iconFill = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WojtekBoman, what was the reason for this update? I'm working on the TS migration of this file and want to be sure I haven't missed something.
@@ -34,15 +34,15 @@ function Image(props) { | |||
} | |||
|
|||
return ( | |||
<RNFastImage | |||
<ImageComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment for reference
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.17-8 🚀
|
Looks like it was a bit rocky and we have a bit of cleanup to do, but this is on prod now |
fill={fill} | ||
hovered={this.props.hovered?.toString()} | ||
pressed={this.props.pressed?.toString()} | ||
fill={this.props.fill} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR caused a regression in ReceiptEmptyState.js #33591
This PR caused a tiny regression. |
@@ -249,6 +249,7 @@ function AddPlaidBankAccount({ | |||
height={iconSize} | |||
width={iconSize} | |||
additionalStyles={iconStyles} | |||
fill={theme.icon} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This created a regression due to expo #33664
Details
This PR improves the way of displaying images on mobile platforms. The most relevant changes are the removal of react-native-svg-transformer and the use expo-image to display images in the app. Previously all icons in .svg format were imported as a React components, what in result has negative influence on app's performance. Thanks to the usage of expo-image, we no longer need to transform svg icons and can use them directly by passing them to the source property of the Image component from 'expo-image' library.
Comparison of the bundle app sizes with and without expo-image:
In case of the iOS Platform were compared compressed archives of development releases.
Fixed Issues
Reduced number of rendered elements in the component tree and better rendering times.
Rendering SignInPage with react-native-svg on Android
Rendering SignInPage with expo-image on Android
There are not issues associated with this PR.
$
PROPOSAL: #29067 (comment)
Original Problem/Solution was posted here: https://expensify.slack.com/archives/C01GTK53T8Q/p1695892593681869
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2023-11-06.at.12.37.12.mov
Android: mWeb Chrome
Screen.Recording.2023-11-06.at.11.29.16.mov
iOS: Native
Screen.Recording.2023-11-03.at.15.23.51.mov
iOS: mWeb Safari
Screen.Recording.2023-11-03.at.15.37.54.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-03.at.15.05.11.mov
MacOS: Desktop
Screen.Recording.2023-11-03.at.14.58.11.mov