-
Notifications
You must be signed in to change notification settings - Fork 3k
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 incorrect navigation when update Report welcome message after visit by direct link #25543
Conversation
@situchan when I test the "Test case 2". There is a regression bug if we add fallback route, it's loop navigation if we tap on the arrow back on the top bard on native devices Screen.Recording.2023-08-22.at.05.57.22.movI think we can revert the change for this "Test case 2" and leave as it's. What do you think? |
Agree, revert this change as it works as expected already So you fixed 2 pages so far - workspace invite message, welcome message. |
This reverts commit 10de61c.
I tried to search Navigation.goBack() occurrences through the codebase and found 2 places above. Other places seem expectations with empty fallback route like pop current route out of history. App/src/pages/workspace/WorkspaceInviteMessagePage.js Lines 124 to 126 in 4f412db
|
@hoangzinh we should fix all possible cases even though |
@situchan I tried to add more places that I think it's missing fallback route. Regarding the bug that you mentioned #22887. I think we can't fix it by filling the fallback route. In that bug, we're in the user profile, refresh the page, we wouldn't know what is the previous page that we visited. We might need to fix that issue by suggestion here https://expensify.slack.com/archives/C01GTK53T8Q/p1691912177038759, the |
@situchan bump for code review. Are we good with PR so far? |
src/pages/ReportParticipantsPage.js
Outdated
<FullPageNotFoundView | ||
shouldShow={_.isEmpty(props.report) || ReportUtils.isArchivedRoom(props.report)} | ||
onBackButtonPress={() => Navigation.goBack(ROUTES.getReportRoute(props.report.reportID))} | ||
> | ||
<HeaderWithBackButton | ||
title={props.translate( |
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.
There are still missing cases.
i.e. Header back button should go to Report Details page
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.
Screen.Recording.2023-08-31.at.19.40.39.mov
If we fallback to navigate to report details page, it will cause regression in group report case.
Please request review when all feedback is addressed.
I clearly stated that we should find & fix all occurrences of HeaderWithBackButton. Btw, I am not able to review this sooner so gonna ask another C+ for help |
@situchan just wanna clear that, if some cases that I think we should leave Navigation.goBack as it is, I should call with Navigation.goBack(ROUTES.HOME) |
hi @situchan, I listed remaining pages that missing
|
bump @situchan ^ |
Still inclined to hold this for now. And see how #24291 goes. |
@situchan Updated with latest main. Could you help to review this PR + my comment here #25543 (comment). Thanks |
I am good with #25543 (comment). |
@@ -63,6 +69,7 @@ function EnableStep(props) { | |||
subtitle={props.policyName} | |||
shouldShowGetAssistanceButton | |||
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT} | |||
onBackButtonPress={() => Navigation.navigate(ROUTES.WORKSPACE_REIMBURSE.getRoute(props.policyID))} |
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.
This should be handled in parent component (ReimbursementAccountPage)
onBackButtonPress={() => Navigation.navigate(ROUTES.WORKSPACE_REIMBURSE.getRoute(props.policyID))} | |
onBackButtonPress={props.onBackButtonPress} |
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.
Thanks for the suggestion. Updated 4dbdfe2
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
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.
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!
✋ 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/Beamanator in version: 1.3.80-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.80-3 🚀
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 1.3.81-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
2 similar comments
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
Details
Fixed Issues
$ #22041
PROPOSAL: #22041 (comment)
Tests
Test case 1: Report welcome message page
Pre-step: Go to any room that you have permission to update welcome message => Go to Room welcome message paste => Copy the URL => Paste to any chat report
Test case 2: Workspace invite message page
Pre-step: Go to any Workspace, invite any users => On invite message paste => Copy the URL => Paste to any chat report
Offline tests
Not affected by network
QA Steps
Same as Tests
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
Screen.Recording.2023-08-20.at.22.53.04.-.web.mp4
Test ReimbursementAccount - Enabled page
Screen.Recording.2023-10-02.at.06.24.10.-.web.mov
Mobile Web - Chrome
Screen.Recording.2023-08-23.at.17.51.05.-.android.chrome.mov
Mobile Web - Safari
Screen.Recording.2023-08-23.at.17.53.37.-.ios.safari.mov
Desktop
Screen.Recording.2023-08-20.at.23.01.21.-.desktop.mp4
iOS
Screen.Recording.2023-08-23.at.17.54.24.-.ios.mov
Android
Screen.Recording.2023-08-23.at.17.52.20.-.android.mov