Add optimistic created action for iou report and create created action for chat report#38197
Conversation
…n for chat report
|
@paultsimura Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
paultsimura
left a comment
There was a problem hiding this comment.
In general looks good, just minor optimisation suggestion.
| [optimisticCreatedActionForIOUReport.reportActionID]: { | ||
| ...(optimisticCreatedActionForIOUReport as OnyxTypes.ReportAction), | ||
| }, |
There was a problem hiding this comment.
Let's swap these 2 actions to keep them in the correct order. Also, I think we can use just:
[optimisticCreatedActionForIOUReport.reportActionID]: optimisticCreatedActionForIOUReport,| true, | ||
| ); | ||
|
|
||
| const optimisticCreatedActionForChatReport = ReportUtils.buildOptimisticCreatedReportAction(recipientEmail); |
There was a problem hiding this comment.
With this change, now in every place where we call ReportUtils.buildOptimisticMoneyRequestEntities(), we build an optimistic CREATED action for the Chat Report.
Let's move this action creation inside the ReportUtils.buildOptimisticMoneyRequestEntities and reuse it in all 4 places.
|
@paultsimura I updated buildOptimisticMoneyRequestEntities function. |
paultsimura
left a comment
There was a problem hiding this comment.
Thanks, the changes look good. Just one minor change request and we can hold for the BE changes.
Co-authored-by: Pavlo Tsimura <paultsimura@gmail.com>
|
The changes look good, we'll hold for the BE changes now. |
|
@nkdengineer could you please update the logic to pass the param based on this comment? #38141 (comment) |
|
@paultsimura I updated. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid09.10.mp4Android: mWeb Chromechrome09.10.mp4iOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-18.at.09.04.3309.05.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-18.at.09.01.5009.05.mp4MacOS: Chrome / SafariScreen.Recording.2024-03-22.at.22.23.3622.24.mp4MacOS: DesktopScreen.Recording.2024-03-18.at.08.56.5608.57.mp4 |
|
Thanks, looks good – need to wait for the BE PR to hit production, I'll retest 1 case and we'll be good to go ✔️ |
|
@rlinoz any updates on the BE PR? |
|
Got deployed to staging yesterday |
|
@rlinoz I tested against the Staging server – works well. Feel free to check and merge after the BE PR is in production. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
HOLD https://github.com/Expensify/Web-Expensify/pull/41299Details
Add optimistic created action for iou report and create created action for chat report
Fixed Issues
$ #38141
PROPOSAL: #38141 (comment)
Tests
Offline tests
Same as above
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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
Screen.Recording.2024-03-13.at.11.07.22.mov
Android: mWeb Chrome
Screen.Recording.2024-03-13.at.11.00.08.mov
iOS: Native
Uploading Screen Recording 2024-03-13 at 11.22.43.mov…
iOS: mWeb Safari
Screen.Recording.2024-03-13.at.10.57.14.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-13.at.10.51.45.mov
MacOS: Desktop
Screen.Recording.2024-03-13.at.11.18.43.mov