-
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
refactor(28902): [FlashList migration] PaymentMethodList #29095
refactor(28902): [FlashList migration] PaymentMethodList #29095
Conversation
921e05d
to
4e12783
Compare
8fdbad8
to
9238d80
Compare
Hey @burczu, can I please ask for your review in here? I've rebased this over the latest |
Hey @adhorodyski! Sorry for the delay, I was quite overloaded with tasks recently. I should move things forward here today. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-17.at.12.12.40.movMobile Web - ChromeScreen.Recording.2023-10-17.at.12.25.06.movMobile Web - SafariScreen.Recording.2023-10-17.at.12.21.52.movDesktopScreen.Recording.2023-10-17.at.12.14.23.moviOSScreen.Recording.2023-10-17.at.12.16.51.movAndroidScreen.Recording.2023-10-17.at.12.15.37.mov |
@adhorodyski Did you notice that on native devices we get such warning while opening page with the FlashList - can we get rid of it? |
I don't recall having it at the later stage of development (I've seen this at the start though) - let me handle this and get back to you, thanks! |
fa4a2ff
to
188326e
Compare
I'm currently getting other errors after rebasing over |
…ment fail at initial render
@burczu looks like setting the |
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.
Confirmed that the warning does not show up anymore.
LGTM then.
@mountiny from my end it's ready to be merged, please let me know if there's anything I can add in here :) |
Thanks Adam, I will leave this review and final approve to @roryabraham |
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.
Just some minor code style comments, overall no major concerns. Great job 👍🏼
@roryabraham updated the PR according to your comments, thank you so much for taking the time :) |
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@@ -152,6 +152,7 @@ export default { | |||
anonymousReportFooterBreakpoint: 650, | |||
dropDownButtonDividerHeight: 28, | |||
addPaymentMethodLeftSpacing: 2, | |||
paymentMethodHeight: 64, |
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.
@adhorodyski I just realized we already had a const for this optionRowHeight
– in your next PR can you please get rid of this paymentMethodHeight
and instead use optionRowHeight
?
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.
Sure thing, will update in the morning! 🙂
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.
Please see my follow up PR #30486 :)
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.92-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.92-4 🚀
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.93-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.93-1 🚀
|
scrollEnabled={shouldEnableScroll} | ||
style={style} | ||
/> | ||
<View style={[style, {minHeight: variables.paymentMethodHeight}]}> |
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.
Details
This PR introduces FlashList as a new dependency and refactors PaymentMethodList component to use it instead of react-native's FlatList.
Before
Native Android, debug build with dev js bundle turned off, 100 items:
https://github.com/Expensify/App/assets/42047036/f7b51a2a-ef84-4038-875c-809a01afd2e0
Some really visible blank areas.
Native Android, adhoc release build, 1000 items:
https://github.com/Expensify/App/assets/42047036/f4bc8bc4-bce0-43b2-affc-1f36fee982dc
Visible blank areas, even though the FPS is around 55-60, content is mostly invisible when fast scrolling.
Native Android, adhoc release build 1000 items heavy usage results from Flashlight:
After
Native Android, debug build with dev js bundle turned off, 100 items:
https://github.com/Expensify/App/assets/42047036/12b8ed72-49f5-4826-95a3-ab4b1b3c440d
Little to no visible blank areas, definitely better than before.
Native Android, adhoc release build, 1000 items:
https://github.com/Expensify/App/assets/42047036/be38b6ea-135f-4793-a56f-1acdd5af9be5
Little to no visible blank areas.
Native Android, adhoc release build 1000 items heavy usage results from Flashlight:
Summary
Migrating to Flashlist resulted in a lower memory and CPU consumption, FPS stayed at the high level and it has eliminated blank areas especially when fast scrolling.
As per the numerous Slack discussions, the underlying components on the renderItem such as MenuItem with PressableWithSecondaryInteraction inside can be improved as a separate effort.
Fixed Issues
$ #28902
PROPOSAL: N/A
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
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)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
android_flashlist.mp4
Android: mWeb Chrome
mweb_chrome_flashlist.mp4
iOS: Native
ios_flashlist.mp4
iOS: mWeb Safari
mweb_safari_flashlist.mp4
MacOS: Chrome / Safari
web_flashlist.mov
MacOS: Desktop
desktop_flashlist.mov