-
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
Fix - display the home route when the app restarts on mobile platforms #36637
Fix - display the home route when the app restarts on mobile platforms #36637
Conversation
…e-when-the-app-restarts-on-mobile-platforms
@rushatgabhane 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] |
src/setup/index.ts
Outdated
@@ -8,6 +9,13 @@ import CONST from '@src/CONST'; | |||
import ONYXKEYS from '@src/ONYXKEYS'; | |||
import platformSetup from './platformSetup'; | |||
|
|||
function initializeLastVisitedPath(): string | undefined { | |||
if (!(getPlatform() === CONST.PLATFORM.ANDROID || getPlatform() === CONST.PLATFORM.IOS)) { |
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.
@HezekielT please use platform specific files for this function.
Nothing wrong with inline platform checks, but we want to be consistent with the codestyle
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-16.at.20.19.11.movAndroid: mWeb ChromeScreen.Recording.2024-02-16.at.20.00.57.moviOS: NativeScreen.Recording.2024-02-16.at.19.54.54.moviOS: mWeb SafariScreen.Recording.2024-02-16.at.20.01.44.movMacOS: Chrome / SafariScreen.Recording.2024-02-16.at.19.50.16.movMacOS: DesktopScreen.Recording.2024-02-16.at.20.21.53.mov |
@hayata-suenaga @HezekielT this works as expected on native, web and desktop. But for me on mWeb, the app always restarts at home screen. I tried clearing cache and did a clean login. I think we should merge 👍 |
@rushatgabhane You're right about the app always starting on home screen for mweb but the issue is also happening on the latest main. It seems a recent PR has broken the I haven't tested production but this could be a deploy blocker. |
Staging: staging.mov |
@HezekielT Does this issue only happen on mweb? |
@hayata-suenaga Yes, it's reproducible only on mobile chrome. |
Nice find! it's unrelated to the PR. So let's do nothing? |
@HezekielT @rushatgabhane I filed a bug report I suggest we hold this PR until the bug is identified and fixed. |
@hayata-suenaga should we hold on merging? because this PR is needed for e2e tests to run. And the bug is unrelated, it's about correctly setting the lastVisitedPath before the app is closed. What do you think? |
by the way, QA codes for Ad Hoc builds will be posted on this PR soon because I was planning to test the issue with mweb. But as we now know that the issue is already present on staging, please ignore the ad hoc builds 🙇 |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
you made a good point, especially on the broken E2E tests. I was trying to be cautious about merging before we can test this fully on all platforms, but I can see the argument that the discovered bug is not related to this PR. I'd say... let's merge 🚀 |
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 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/hayata-suenaga in version: 1.4.43-0 🚀
|
@HezekielT Bug6385905_1708447709787.BRYO7003.mp4 |
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀
|
Details
Opens the home route on app startup for native platforms by clearing the
lastVisitedPath
Fixed Issues
$ #35927
PROPOSAL: #35927 (comment)
Tests
For IOS native and Android native
For Other platforms( Web, mobile chrome, safari, desktop)
Offline tests
QA Steps
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
restartFromHomeRoute.mov
Android: mWeb Chrome
mweb_RestartFromHomeRoute.mov
iOS: Native
ios_restartFromHomeRoute.mov
iOS: mWeb Safari
safari_restartFromHomeroute.mov
MacOS: Chrome / Safari
Web_RestartFromHomeRoute.mov
MacOS: Desktop
desktop_RestartFromHomeRoute.mov