-
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
[navigation-refactor] Fix browser history for complex navigation actions #24165
[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! |
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.
Tests well
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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
web.mov
Mobile Web - Chrome
webAndroid.mov
Mobile Web - Safari
webiOS.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov