-
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
Display report preview using new reportAction data source #18423
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 |
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
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 |
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. |
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 🍒
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
.
@@ -1427,6 +1427,29 @@ function buildOptimisticIOUReportAction(type, amount, currency, comment, partici | |||
}; | |||
} | |||
|
|||
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 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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android