refactor(28902): [FlashList migration] PaymentMethodList#29095
refactor(28902): [FlashList migration] PaymentMethodList#29095roryabraham merged 15 commits intoExpensify:mainfrom
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 |
burczu
left a comment
There was a problem hiding this comment.
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 |
roryabraham
left a comment
There was a problem hiding this comment.
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. |
| anonymousReportFooterBreakpoint: 650, | ||
| dropDownButtonDividerHeight: 28, | ||
| addPaymentMethodLeftSpacing: 2, | ||
| paymentMethodHeight: 64, |
There was a problem hiding this comment.
@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.
Sure thing, will update in the morning! 🙂
|
🚀 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}]}> |

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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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_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