-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Display report preview using new reportAction data source #18423
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
# Conflicts: # src/libs/ReportActionsUtils.js # src/pages/home/report/ReportActionItem.js
What are we going to do with existing stale data? |
We have a BulkCQ ready to go: https://github.com/Expensify/Expensify/issues/282420 |
Julesssss
left a comment
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.
Approving @luacmartins's changes
Julesssss
left a comment
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.
Approving @luacmartins's changes
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeMy android chrome is stuck for last couple of days I need to figure out how to clear the stale data there |
Gonals
left a comment
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 tests pretty well! Besides the chaos that is the LHN, with all the threads, I like it!
|
@cristipaval Is the testing steps outdated or this is a bug? The IOUPreview is not shown in chat report it's only shown in iou report. |
mountiny
left a comment
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.
Great job everyone, tests well
|
@s77rt the IOU preview should be only in the IOU report. The report preview will be in the chat |
|
Can we hold merge for about 1h? I will take a quick look in the code 😁 |
@s77rt we're probably going to merge as it's super critical. But please still review, we can create new issues for any follow ups |
Display report preview using new reportAction data source (cherry picked from commit 8d650c6)
…-18423 🍒 Cherry pick PR #18423 to staging 🍒
s77rt
left a comment
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.
Overall code looks code. I have just few minor notes.
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.
Minor: We have an unnecessary mt4
| value: { | ||
| ...(isNewChatReport ? {[chatCreatedAction.reportActionID]: chatCreatedAction} : {}), | ||
| [reportPreviewAction.reportActionID]: { | ||
| ...(isNewReportPreviewAction ? reportPreviewAction : {created: DateUtils.getDBTime()}), |
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.
Hmm, I'm not sure about this. Does it align with the deign docs? We are updating the created value of the action. Can we update another timestamp field?
| [reportPreviewAction.reportActionID]: { | ||
| created: reportPreviewAction.created, | ||
| }, |
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 should be wrapped in a condition if !isNewReportPreviewAction.
| }; | ||
| } | ||
|
|
||
| function buildOptimisticReportPreview(reportID, iouReportID, payeeAccountID) { |
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.
Missing jsdoc. (Why lint is not failing here?)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.15-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.15-12 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
| } | ||
| : {}), | ||
| [reportPreviewAction.reportActionID]: { | ||
| created: reportPreviewAction.created, |
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 looks like this caused a regression fixed in this issue: #29954 - the errors property was missing.





Details
Deprecates the old usages of IOUPreview, and introduces the new ReportPreview component. We show this beneath IOUPreviews, and its position changes so that it's always beneath the most recent preview.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/278890
Tests
Note: Please test with new users, as stale data will likely cause bugs
1) Test report creation and new component
Additional Requests, and descriptions
Test settling up
Offline tests
Run above test, coming online to send and receive the rerquest/settle updates. We will likely handle any issues here as follow-up issues
QA Steps
Run above tests
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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android