-
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
Implement get all ancestor of the thread #34640
Conversation
Screen.Recording.2024-01-19.at.23.11.34.mp4
Screen.Recording.2024-01-19.at.23.14.07.mp4 |
canEvict: false, | ||
allReports: { | ||
key: ONYXKEYS.COLLECTION.REPORT, | ||
selector: reportSelector, |
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.
Why do we need to make a selection here even though the props are not used?
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.
@mollfpr The reason to make a selection here is to decrease re-render of this component. We have another solution which is to use memo
to only compare the ancestors. What do you think?
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.
I think using memo
will be ideal. We already use it for several components, which fits what we are trying to do here.
Fixed these cases. |
@dukenv0307 Friendly bump on to update using |
Thanks I will update in the early morning tomorrow. |
@mollfpr I updated. Please help to review again. |
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.
Mark unread the ancestor is randomly mark unread the message in other reports.
Screen.Recording.2024-01-25.at.23.58.27.mp4
@mollfpr As I see the mark as unread work correct. when we mark as unread an ancestor, the current report of this action will be marked as unread in LHN. Correct me if I missed something. |
@dukenv0307 You're right! My bad; I should have paid more attention to which parent action and the report. I'll finish the testing and recording then! |
@dukenv0307 Could you check the failing performance test? |
@mollfpr Passed test after merge newest main |
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.
Almost looks good. One more things to clean up the warning.
onClose={() => Report.navigateToConciergeChatAndDeleteReport(ancestor.report.reportID)} | ||
> | ||
<ReportActionItem | ||
key={ancestor.reportAction.reportActionID} |
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.
It's still showing the warning. We might move it to the above component to clear the warning.
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.
@mollfpr I updated.
Reviewer Checklist
Screenshots/VideosAndroid: Native34640.Android.mp4Android: mWeb Chrome34640.mWeb-Chrome.mp4iOS: Native34640.iOS.moviOS: mWeb Safari34640.mWeb-Safari.movMacOS: Chrome / Safari34640.Web.mp4MacOS: Desktop34640.Desktop.mp4 |
Thanks for the changes @dukenv0307. Went through and resolved a bunch of comments. I believe most of my remaining comments are minor. But we're still failing the "Reassure Performance Tests". I'll try to re-run them now. |
@dukenv0307 We need to merge |
@marcaaron Merged main and the test is passed now. |
Co-authored-by: Luthfi <luthfi.ufi14@gmail.com>
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.
Updated test recordings
It feels a bit slow on the Android when navigating through the thread, but it also does the same when I run on the main
.
Screenshots/Videos
Android: Native
34640.Android.mov
Android: mWeb Chrome
34640.mWeb-Chrome.mov
iOS: Native
34640.iOS.mov
iOS: mWeb Safari
34640.mWeb-Safari.mov
MacOS: Chrome / Safari
34640.Web.mp4
MacOS: Desktop
34640.Desktop.mp4
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 for the changes and your fast work here!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 1.4.36-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
1 similar comment
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 1.4.36-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
This PR is failing because of issue #35914 The issue is reproducible in: Android, IOS Bug6369468_1707233930280.Stpc4893.1.mp4 |
Just noting that the linked issue was demoted from being a blocker, so I'm not going to hold the release on this |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.37-7 🚀
|
onyxSubscribe({ | ||
key: `${ONYXKEYS.COLLECTION.REPORT}${ancestorReportID}`, | ||
callback: () => { | ||
setAllAncestors(ReportUtils.getAllAncestorReportActions(report, shouldHideThreadDividerLine)); | ||
}, | ||
}), |
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 does not follow our Onyx practices. Components should use withOnyx and not Onyx.connect
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.
Could possibly have been a performance optimization? If we can explore getting rid of it that would be 👍
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.
Components should use withOnyx and not Onyx.connect
Or useOnyx
is a good option too now.
@@ -4663,6 +4675,78 @@ function shouldDisableThread(reportAction: OnyxEntry<ReportAction>, reportID: st | |||
); | |||
} | |||
|
|||
function getAllAncestorReportActions(report: Report | null | undefined, shouldHideThreadDividerLine: boolean): Ancestor[] { |
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 an issue - #41519
Detailed root cause here - #41519 (comment)
Details
Implement get all ancestor of the thread
Fixed Issues
$ #32618
PROPOSAL: #32618 (comment)
Tests
Offline tests
Same as above
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
Screen.Recording.2024-01-17.at.17.57.44.mov
Android: mWeb Chrome
Screen.Recording.2024-01-17.at.17.53.57.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-01-17.at.17.47.08.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-17.at.17.45.02.mov
MacOS: Desktop
Screen.Recording.2024-01-17.at.18.07.28.mov