Grey out report preview and IOU report's header when paying request offline#35456
Grey out report preview and IOU report's header when paying request offline#35456iwiznia merged 3 commits intoExpensify:mainfrom
Conversation
|
@cubuspl42 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] |
|
|
||
| /** | ||
| * Return the pendingAction and the errors we have when creating a chat or a workspace room offline | ||
| * Return the pendingAction and the errors we have when creating a chat or a workspace room offline or pay the request |
There was a problem hiding this comment.
/**
* Return the pendingAction and the errors resulting from either...
*
* - creating a workspace room
* - starting a chat
* - paying the money request
*
* ...while being offline
**/
There was a problem hiding this comment.
I updated this comment.
| */ | ||
| function getReportOfflinePendingActionAndErrors(report: OnyxEntry<Report>): ReportOfflinePendingActionAndErrors { | ||
| // We are either adding a workspace room, or we're creating a chat, it isn't possible for both of these to be pending, or to have errors for the same report at the same time, so | ||
| // We are either adding a workspace room, or we're creating a chat, or we're paying request money, it isn't possible for both of these to be pending, or to have errors for the same report at the same time, so |
There was a problem hiding this comment.
// It shouldn't be possible for all of these actions to be pending (or to have errors) for the same report at the same time, so just take the first that exists
There was a problem hiding this comment.
I just suggest to improve the language here. An important part is that you kept the word "both", while we add a third case. I suggest to drop the "both" and shorten the comment, making it more generic.
Another thing is whether this statement is actually true (especially, after our changes). To be honest, it isn't completely clear to me why these actions cannot be pending at the same time.
| const addWorkspaceRoomOrChatPendingAction = report?.pendingFields?.addWorkspaceRoom ?? report?.pendingFields?.createChat ?? report?.pendingFields?.reimbursed; | ||
|
|
||
| const addWorkspaceRoomOrChatErrors = getAddWorkspaceRoomOrChatReportErrors(report); | ||
| return {addWorkspaceRoomOrChatPendingAction, addWorkspaceRoomOrChatErrors}; |
There was a problem hiding this comment.
At least some of these names got outdated. Please figure this out.
There was a problem hiding this comment.
Updated the name of the variable.
Reviewer Checklist
Screenshots/VideosAndroid: Nativegray-out-iou-android-compressed.mp4Android: mWeb Chromegray-out-iou-android-web-compressed.mp4iOS: Nativegray-out-iou-ios-compressed.mp4iOS: mWeb Safarigray-out-iou-ios-web-compressed.mp4MacOS: Chrome / Safarigray-out-iou-web-converted.mp4MacOS: Desktop |
|
✋ 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/iwiznia in version: 1.4.39-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.39-8 🚀
|
| const addWorkspaceRoomOrChatErrors = getAddWorkspaceRoomOrChatReportErrors(report); | ||
| return {addWorkspaceRoomOrChatPendingAction, addWorkspaceRoomOrChatErrors}; | ||
| // It shouldn't be possible for all of these actions to be pending (or to have errors) for the same report at the same time, so just take the first that exists | ||
| const reportPendingAction = report?.pendingFields?.addWorkspaceRoom ?? report?.pendingFields?.createChat ?? report?.pendingFields?.reimbursed; |
There was a problem hiding this comment.
Coming from #76323, we shouldn't grey out the entire report when reimbursed is pending update
Details
Grey out report preview and IOU report's header when paying request offline
Fixed Issues
$ #34819
PROPOSAL: #34819 (comment)
Tests
Precondition: As an employee of a workspace, create a request money in the workspace chat
Offline tests
Same as above
QA Steps
Precondition: As an employee of a workspace, create a request money in the workspace chat
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
Screen.Recording.2024-01-31.at.14.58.22.mov
Android: mWeb Chrome
Screen.Recording.2024-01-31.at.14.52.22.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-01-31.at.14.42.26.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-31.at.14.38.41.mov
MacOS: Desktop
Screen.Recording.2024-01-31.at.15.03.57.mov