Migrate the next steps to client side#34450
Conversation
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
allroundexperts
left a comment
There was a problem hiding this comment.
Testing well. Thanks for resolving the conflicts!
…ture/28771-migrate-next-steps-to-client
mountiny
left a comment
There was a problem hiding this comment.
will try to review tomorrow
mountiny
left a comment
There was a problem hiding this comment.
will try to review tomorrow
…ture/28771-migrate-next-steps-to-client
| // Another owner | ||
| if (!isOwner) { | ||
| optimisticNextStep.title = 'Finished!'; | ||
| optimisticNextStep.message = [ | ||
| { | ||
| text: 'No further action required!', | ||
| }, | ||
| ]; | ||
| } |
There was a problem hiding this comment.
An approver could also be an admin who still needs to reimburse I think, how would this work in this case? It would show them they are done but they still need to pay it, right?
There was a problem hiding this comment.
An approver could also be an admin...
Yes, could be. I think it is always an admin, it is not?
Based on a message that we get from the backend, it should be "No further action....". So, looks like it works properly.
Approved.mov
There was a problem hiding this comment.
Ok lets go with this and see if some issues will be reported!
|
@mountiny, please take a look. I've applied the suggestions. |
|
@allroundexperts was this a comment for wrong PR? 😄 |
mountiny
left a comment
There was a problem hiding this comment.
Great work @rezkiy37 really appreciate it!
@allroundexperts thank you for testing!
| // Another owner | ||
| if (!isOwner) { | ||
| optimisticNextStep.title = 'Finished!'; | ||
| optimisticNextStep.message = [ | ||
| { | ||
| text: 'No further action required!', | ||
| }, | ||
| ]; | ||
| } |
There was a problem hiding this comment.
Ok lets go with this and see if some issues will be reported!
|
✋ 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.4.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.40-5 🚀
|
Details
Generates an optimistic
nextStepbased on a current report status and other properties. Includes unit-tests that cover 100% of a main function -buildNextStep.Fixed Issues
$ #28771
PROPOSAL: N/A
Tests
Note: we migrate next step prediction as much as possible. However, the app cannot predict all violations or some other complex states. So, the backend can respond with a little bit detailed next step or even another message like an error or warning. I describe all possible cases that we calculate on the client side in "Tests". Also, since we test how optimistic data works, I recommend to enable slow Internet or offline mode.
Pre requirements:
1. Generates an optimistic
nextSteponce a report has been OPENED1. Self review
2. Scheduled submit enabled
Daily: "These expenses are scheduled to automatically submit later today! No further action required!";Weekly: "These expenses are scheduled to automatically submit on Sunday! No further action required!";Twicea month: "These expenses are scheduled to automatically submit on the 1st and 16th of each month! No further action required!";Monthly: "These expenses are scheduled to automatically submit on the [Selected report submission date] of each month! No further action required!";Trip: "These expenses are scheduled to automatically submit at the end of your trip! No further action required!";Manual: "Waiting for you to submit these expenses.";3. Self submitting prevented
2. Generates an optimistic
nextSteponce a report has been SUBMITTED1. Self review
2. Another reviewer
3. Another owner
3. Generates an optimistic
nextSteponce a report has been APPROVED1. Self review
2. Another owner
4. Generates an optimistic
nextSteponce a report has been PAID1. Paid with wallet
2. Paid outside of Expensify
Offline tests
Same as "Tests".
QA Steps
Same as "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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.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
Android: Native
Android.1.1.mp4
Android.1.2.Last.business.day.mp4
Android.1.3.mp4
Android: mWeb Chrome
Android.Chrome.1.1.mp4
Android.Chrome.1.2.Trip.mov
Android.Chrome.1.3.mp4
iOS: Native
IOS.1.1.mov
IOS.1.2.Last.business.day.mp4
IOS.1.3.mov
iOS: mWeb Safari
IOS.Safari.1.1.mov
IOS.Safari.1.2.Trip.mov
IOS.Safari.1.3.mov
MacOS: Chrome / Safari
Chrome.1.1.mp4
Chrome.1.2.Daily.mp4
Chrome.1.2.Monthly.3rd.mp4
Chrome.1.3.mov
Chrome.2.1.mov
Chrome.2.2.mov
Chrome.2.3.mov
MacOS: Desktop
Desktop.1.1.mp4
Desktop.1.2.Twice.a.month.mov
Desktop.1.3.mov