-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix rendering TransactionListItemRow #42986
Fix rendering TransactionListItemRow #42986
Conversation
@allroundexperts 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] |
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.
Looks good 👍 and makes sense to me. I agree with @jnowakow that if we want Live updates to work then the components have to react to any prop changing, as a change of any prop can now come at anytime.
Also when I actually tested how often the TransactionItem
re-renders I noticed that they do NOT render on every scroll. There is quite a lot of re-renderes when new data is fetched via lazy loading - but that is expected.
To me removing memo for now makes sense. I don't think it makes that big of a difference
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.
Won't remove memo
and keyForList
re-introduce the performance issue we had with Search on native devices?
if |
I don't think it will as the I would go forward with this PR as it blocks the Onyx one. In the meantime I can check what causes the performance problems on Android |
Ah that makes sense! Thanks for clarifying. I agree this is not a blocker then. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|
@jnowakow @luacmartins Did you test with hundreds of row or any stress test? |
I tried it with ~200 rows |
Details
Recent PR wrapped all components used in
TransactionListItemRow
inmemo
. As onlykeyForList
was used inarePropsEqual
it prevented those rows to update when transaction changed. It seems thatmemo
isn't required at all in this case as those components aren't re-rendered frequently even during scroll.Fixed Issues
$ #42774
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as in Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
search-android.mov
Android: mWeb Chrome
See comment
iOS: Native
search-ios.mov
iOS: mWeb Safari
search-ios-web.mov
MacOS: Chrome / Safari
search-web.mov
MacOS: Desktop
search-desktop.mov