-
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
Fix: Money request skeleton is shown when delete IOU in offline mode #27753
Conversation
@0xmiroslav 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] |
@@ -239,7 +239,7 @@ function MoneyRequestPreview(props) { | |||
isHovered={isScanning} | |||
/> | |||
)} | |||
{_.isEmpty(props.transaction) ? ( | |||
{_.isEmpty(props.transaction) && props.action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? ( |
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.
{_.isEmpty(props.transaction) && props.action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? ( | |
{_.isEmpty(props.transaction) && lodashGet(props.action, 'pendingAction') !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? ( |
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.
Updated!
Current main is very buggy at the moment. After delete offline, money request preview disappears. And instead when online, it shows broken preview instead of disappearing after refresh app. Screen.Recording.2023-09-20.at.11.31.26.PM.mov |
Above are existing bugs on main, not related to PR so can be out of scope |
Reviewer Checklist
Screenshots/VideosWebiou request: iou.movexpense request: Screen.Recording.2023-09-20.at.11.41.01.PM.movScreen.Recording.2023-09-20.at.11.41.59.PM.movMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
@tienifr are you able to reproduce this? #27753 (comment) |
I'm checking it. |
@eVoloshchak Updated the condition to include pending |
@tienifr please test both cases and share videos for web in new comment |
@@ -239,7 +239,8 @@ function MoneyRequestPreview(props) { | |||
isHovered={isScanning} | |||
/> | |||
)} | |||
{_.isEmpty(props.transaction) ? ( | |||
{_.isEmpty(props.transaction) && | |||
!_.contains([CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE], lodashGet(props.action, 'pendingAction')) ? ( |
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 was thinking message.isDeletedParentAction || pendingAction === 'delete'
This comment was marked as resolved.
This comment was marked as resolved.
1 similar comment
@0xmiroslav In case of update-pending-action-compressed.mov |
I don't have clear repro step but I also don't want to make regression because of this. So adding that condition works for me and is no harm. |
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!
I think $0 issue (due to empty transaction after delete) is out of scope for this PR
@tienifr @0xmiroslav it looks like we're missing videos/screenshots for some platforms, can you add them? |
Miroslav combined them all in Web section. I'm adding the Android now. |
I've updated the screenshots @cead22 |
I see only 3 and all for web, but I think that's ok if you tested in all platforms as the reviewer |
✋ 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/cead22 in version: 1.3.73-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.73-1 🚀
|
🚀 Deployed to staging by https://github.com/cead22 in version: 1.3.74-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.74-3 🚀
|
Details
Money request skeleton is shown when delete IOU in offline mode. This PR fixes that.
Fixed Issues
$ #26939
PROPOSAL: #26939 (comment)
Tests
Offline tests
Same above
QA Steps
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
skeleton-compressed.mov
Mobile Web - Chrome
skeleton-chrome-compressed.mov
Mobile Web - Safari
skelton-safari-compressed.mov
Desktop
skeleton-desktop-compressed.mov
iOS
skeleton-ios-compressed.mov
Android
Screen.Recording.2023-09-22.at.13.43.28.mov