-
Notifications
You must be signed in to change notification settings - Fork 3.4k
refactor: LHN dataflow rework #30242
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
Conversation
9ff38ba to
d249d24
Compare
|
@mountiny just updated the description, feel free to invite any1 interested for the review - I see the pipeline parts failing so definitely will need to update it shortly (eg. tests), but I was able to play around with this branch locally just fine. Also, please see the Reassure logs yourself - we have -23 on different render count metric, but I will have to fix these tests as the ~45% increase in duration seems like a bug. |
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.
Thanks @adhorodyski in general this makes sense to me and seems like clean approach too
Curious for review from others before we move onto completing this PR
|
@tgolen I'll definitely make sure to address all of your comments, thanks for taking the time! At the same time I think at this stage it's equally important to run this branch locally as we want to gather feedback on the list's responsiveness and the perceived performance (apart from raw numbers which have improved slightly). |
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.
Approach makes sense to me. Thanks for working on this!
d249d24 to
2bab716
Compare
de4209d to
efda8d0
Compare
|
@roryabraham thanks, all comments are addressed now 👍 also removed the |
96a571f to
f525c48
Compare
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.
LGTM, thanks for all the work here.
edfa13d to
d64a812
Compare
|
@narefyev91 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] |
d64a812 to
80fee18
Compare
|
unit tests should be green now. @adhorodyski we're still missing iOS native and macOS Chrome videos, could you add them? |
This reverts commit f525c48e68416f30c6dc62cd5076ca9cb4544d61.
80fee18 to
9f7b886
Compare
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid-web.movMobile Web - Safariios-web.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
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.
LGTM!
🎀 👀 🎀 C+ reviewed
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 looks very good!
|
✋ 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/tgolen in version: 1.3.96-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.97-7 🚀
|
| ({item: reportID}) => { | ||
| const itemFullReport = reports[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`] || {}; | ||
| const itemReportActions = reportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`]; | ||
| const itemParentReportActions = reportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${itemFullReport.parentReportID}`]; |
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.
As we know already, there was crash after this refactor. itemParentReportActions was expected to be object but there's case of null.
| '', | ||
| )}`; | ||
| const itemComment = draftComments[`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`] || ''; | ||
| const participantPersonalDetailList = _.values(OptionsListUtils.getPersonalDetailsForAccountIDs(itemFullReport.participantAccountIDs, personalDetails)); |
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 misses an edge case where a user sent a last message in a room and then they leave the room. Then the report participant accountIDs do not include this user accountID and the user's email instead of their username is displayed in LHN. Issue #35477
| viewMode={optionMode} | ||
| isFocused={!shouldDisableFocusOptions && reportID === currentReportID} | ||
| onSelectRow={onSelectRow} | ||
| preferredLocale={preferredLocale} |
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.
After adding preferredLocale to renderItem we should have added it to the FlatList's extraData too otherwise the list won't re-render
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.
Probably a false positive, the above is true for FlashList only. For FlatList the change in renderItem itself seems enough
This PR refactors a dataflow for the LHNOptionsList component to be top-down - all data is being fetched on the top level (list), processed and passed down to the
renderItemvia props - instead of passing a string ofreportIDand reading for all the collections' keys from Onyx per item.This effort is an enabler for the Flashlist migration happening as part of this issue: #28902
Details
Fixed Issues
$ #28902 partially
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
To be added.
Android: Native
ANDROID.mov
Android: mWeb Chrome
ANDROID_WEB.mov
iOS: Native
iOS: mWeb Safari
ios-web.mp4
MacOS: Chrome / Safari
MacOS: Desktop
desktop.mp4