-
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
[NoQA] Feat: Add submit action #28947
[NoQA] Feat: Add submit action #28947
Conversation
@waterim As I see this change actually does nothing right now, am I right? That's the reason there is no tests steps and screenshots/videos? |
@burczu Yes, this is just an action with no need in screenshots or test steps(discussed already with Vit) |
Reviewer Checklist
Screenshots/VideosWebn/a Mobile Web - Chromen/a Mobile Web - Safarin/a Desktopn/a iOSn/a Androidn/a |
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
src/libs/actions/IOU.js
Outdated
}, | ||
]; | ||
|
||
API.write('SubmitReport', {reportID: expenseReport.reportID, submittedReportActionID: optimisticSubmittedReportAction.reportActionID}, {optimisticData, successData, failureData}); |
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.
Lets just name the param reportActionID
and also add the managerEmail
. Lets also included the managerID
param, which is not yet supported though
API.write('SubmitReport', {reportID: expenseReport.reportID, submittedReportActionID: optimisticSubmittedReportAction.reportActionID}, {optimisticData, successData, failureData}); | |
API.write('SubmitReport', {reportID: expenseReport.reportID, managerEmail: expenseReport.managerEmail, managerAccountID: expenseReport.managerID, reportActionID: optimisticSubmittedReportAction.reportActionID}, {optimisticData, successData, failureData}); |
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 need to add a support for this in the backend though
@mountiny Updated, waiting for your comments regarding backend changes and PROCESSING/SUBMITTED |
Actions are unhappy @waterim |
@mountiny Ah, there were few conflicts, now its okay |
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.
Thank you!
That happens when you push new code after my approval, nw |
✋ 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/mountiny in version: 1.3.80-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.80-3 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.81-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
2 similar comments
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
onyxMethod: Onyx.METHOD.MERGE, | ||
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${expenseReport.reportID}`, | ||
value: { | ||
[expenseReport.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.
Hi @waterim @Beamanator @burczu @mountiny, should the reportId for failureData should have been the optimistic id optimisticSubmittedReportAction.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.
Ah yes correct this should have been optimisticSubmittedReportAction.reportActionID
You have forgot to check the copy mechanism for whisper message, that created #32285 bug. |
@@ -2202,6 +2202,9 @@ function getIOUReportActionMessage(iouReportID, type, total, comment, currency, | |||
case CONST.REPORT.ACTIONS.TYPE.APPROVED: | |||
iouMessage = `approved ${amount}`; | |||
break; | |||
case CONST.REPORT.ACTIONS.TYPE.SUBMITTED: | |||
iouMessage = `submitted ${amount}`; |
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 line introduced bug here: #38579
where the optimistic data from the client differs from what is returned by the backend.
Details
This PR is only to add a submit action
Fixed Issues
$ #28763
PROPOSAL: #28763 (comment)
Tests
N/A
Offline tests
Same as tests
QA Steps
N/A
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.