-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix details page crash without route params #16438
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
Conversation
|
@marcochavezf @mananjadhav One of you needs to 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] |
| // If we have a reportID param this means that we | ||
| // arrived here via the ParticipantsPage and should be allowed to navigate back to it | ||
| const shouldShowBackButton = Boolean(this.props.route.params.reportID); | ||
| const shouldShowBackButton = Boolean(reportID); |
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.
Why did we need update this line?
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.
It will cause crash too when we go to staging.new.expensify.com/details because the params is undefined.
mananjadhav
left a comment
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.
2 minor comments, otherwise code looks good.
Reviewer Checklist
Screenshots/VideosThis works well, Thanks for the quick PR @bernhardoj. @marcochavezf All yours. Few points:
|
Looking at the other pages, all of them show the back button.
Yes, I think that's a good idea. Updated! |
In theory it should go to the previous page, but if the user is navigating to a wrong route directly in the browser I think it doesn't make sense to show the back button. Where are we navigating the user when the back button is pressed? |
At the moment it goes to the Chat page. |
@marcochavezf It could also be the case that the user did hit the correct URL with the params, but removed the params and hit Enter. In that case we should allow going Back. I think we should keep this as of now, and ensure that it doesn't come as a regression later on. |
|
Both back and close button will call |
|
✋ 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/marcochavezf in version: 1.2.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.91-1 🚀
|






Details
The app crash when we access details page without login params staging.new.expensify.com/details.
Fixed Issues
$ #15486
PROPOSAL: #15486 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
staging.new.expensify.com/detailslink to the chatPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-03-23.at.00.00.50.mov
Mobile Web - Chrome
WhatsApp.Video.2023-03-23.at.16.21.57.1.mp4
Mobile Web - Safari
Screen.Recording.2023-03-23.at.01.40.04.mov
Desktop
Screen.Recording.2023-03-23.at.00.11.05.mov
iOS
Screen.Recording.2023-03-23.at.01.42.38.mov
Android
WhatsApp.Video.2023-03-23.at.16.21.54.mp4