[navigation-refactor] Fix browser history for complex navigation actions#24165
Conversation
|
@eVoloshchak 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] |
|
I will add videos for iOS and android later. I have some problems with my setup and builds but these changes should only affect browsers (except small changes on leave room) |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-08-08.at.23.48.25.movMobile Web - Chromevideo_2023-08-09_00-12-06.mp4Mobile Web - SafariScreen.Recording.2023-08-08.at.23.55.14.movDesktopScreen.Recording.2023-08-08.at.23.52.42.moviOSScreen.Recording.2023-08-08.at.23.59.42.movAndroidvideo_2023-08-09_00-12-01.mp4 |
|
BUG:
Screen.Recording.2023-08-08.at.13.14.14.mov |
|
Hey @eVoloshchak I pushed some changes that should fix that. I tested it but could you please check that again? Thanks! |
|
@mountiny Getting your attention! This PR is important to continue fixing other flows. |
|
@adamgrzybowski, there's still a similar bug, but now you're navigated to the wrong chat after selecting "Leave thread". The bug isn't 100% reproducible, but it happens most of the times https://drive.google.com/file/d/10QFuHo6aM8mrdilyCwFCtgJ9_QhwOrhL/view?usp=sharing |
|
@eVoloshchak is this the firefox? EDIT: EDIT v2: Have you reinstalled your node modules? |
|
@eVoloshchak Okay we found an edge case and fixed it. Now this should work fine 🤞 Thanks for finding it! |
mountiny
left a comment
There was a problem hiding this comment.
Sorry for late response, was ooo, this is a major improvement, thank you!
|
✋ 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/mountiny in version: 1.3.55-0 🚀
|
|
@adamgrzybowski Seems this also causes the issue https://expensify.slack.com/archives/C049HHMV9SM/p1692600279076409 |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.56-0 🚀
|
Yeah I need to find a better way to fix the problem |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
| // If the content was shown but it's not anymore that means the report was deleted and we are probably navigating out of this screen. | ||
| // Return null for this case to avoid rendering FullScreenLoadingIndicator or NotFoundPage when animating transition. | ||
| if (shouldShowNotFoundPage && contentShown.current) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
@adamgrzybowski Could please help me understand which use case this code has fixed? I would assume it fixed the Leaving thread from the RHP modal?
we are probably navigating out of this screen.
FWIW This code caused this bug #28183 where an empty view is displayed inside the report details page without navigating out of that screen.
The leave thread action was moved from that screen, so if you could confirm that this is the only use case it addressed, can we remove it?
There was a problem hiding this comment.
if the user leaves the thread, the not found page will appear briefly in closing RHP. This is supposed to fix it. But it has some problems. If I remember correctly it was the only use case
Details
IMPORTANT
Make sure to reinstall
node_modules.Fixed Issues
$ #20908
$ #21356
$ #23796
It's possible that this PR fixes some other issues that I can't find right now.
Tests
Offline tests
QA Steps
All tests are for browsers
Leaving threads
Assigning
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)/** 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
web.mov
Mobile Web - Chrome
webAndroid.mov
Mobile Web - Safari
webiOS.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov