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] |
| import platformSetup from './platformSetup'; | ||
|
|
||
| function initializeLastVisitedPath(): string | undefined { | ||
| if (!(getPlatform() === CONST.PLATFORM.ANDROID || getPlatform() === CONST.PLATFORM.IOS)) { |
There was a problem hiding this comment.
@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 🚀 |
|
✋ 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
lastVisitedPathFixed 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 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.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
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