-
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
prevent offline navigation on money request report deletion #34320
prevent offline navigation on money request report deletion #34320
Conversation
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.
Looks good, thank you for the fix!
@fedirjh can you complete the checklist as per #34320 (comment)? Then I'll merge. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2024-01-12.at.12.58.49.mp4Android: mWeb ChromeCleanShot.2024-01-12.at.14.11.30.mp4iOS: NativeCleanShot.2024-01-12.at.16.45.37.mp4iOS: mWeb SafariCleanShot.2024-01-12.at.16.06.28.mp4MacOS: Chrome / SafariCleanShot.2024-01-12.at.15.44.54.mp4MacOS: DesktopCleanShot.2024-01-12.at.16.50.00.mp4 |
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.
Looks good and tests well. left little feedbacks about code style.
src/libs/ReportUtils.ts
Outdated
if (isMoneyRequestReport(report)) { | ||
const parentReportAction = ReportActionsUtils.getReportAction(report?.parentReportID ?? '', report?.parentReportActionID ?? ''); | ||
if (parentReportAction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) { | ||
return false; | ||
return true; | ||
} | ||
} | ||
return false; | ||
} |
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.
Let's improve code readability :
function isMoneyRequestReportPendingDeletion(report: OnyxEntry<Report>): boolean {
if(!isMoneyRequestReport(report)){
return false;
}
const parentReportAction = ReportActionsUtils.getReportAction(report?.parentReportID ?? '', report?.parentReportActionID ?? '');
return parentReportAction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
}
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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 will make the changes and test this again.
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.
Wondering why I do not see Commit Suggestion for this code readability changes.
I couldn’t suggest the changes myself. It seems that option only works for the code that was changed.
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 couldn’t suggest the changes myself. It seems that option only works for the code that was changed.
Ah! That makes sense. Thanks
Co-authored-by: Fedi Rajhi <[email protected]>
@fedirjh |
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.
Looks good to me.
✋ 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/blimpich in version: 1.4.27-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.27-1 🚀
|
@fedirjh @blimpich
Details
We prevent the navigation to Money Request report in Report Screen when the Money Request report is marked for deletion.
Fixed Issues
$ #34263
PROPOSAL: #34263 (comment)
Tests
Steps
1 Go offline.
2 Go to 1:1 DM.
3 Create a money request.
4 Go to request details page.
5 Tap 3-dot menu > Delete request.
6 Delete the request.
7 Verify that the user navigates to main Chat Report
Offline tests
Same as the Steps for Tests Section.
QA Steps
Same as the Steps for Tests Section.
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
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 - Safari
34263-web-safari-01.mp4
Mobile Web - Safari
34263-ios-safari-01.mp4
Desktop
34263-desktop-01.mp4
iOS
34263-ios-native-01.mp4
Android
34263-android-native-01.mp4
Mobile Web - Chrome
34263-android-chrome-01.mp4