Fix opening FullScreenNavigator from the Home page#38734
Fix opening FullScreenNavigator from the Home page#38734mountiny merged 4 commits intoExpensify:mainfrom
Conversation
src/libs/Navigation/linkTo.ts
Outdated
| @@ -182,12 +180,11 @@ export default function linkTo(navigation: NavigationContainerRef<RootStackParam | |||
| action.type = CONST.NAVIGATION.ACTION_TYPE.REPLACE; | |||
|
|
|||
| // If this action is navigating to the ModalNavigator and the last route on the root navigator is not already opened ModalNavigator then push | |||
There was a problem hiding this comment.
I think we need to adjust this comment as well. And probably can move action.type = CONST.NAVIGATION.ACTION_TYPE.PUSH; after the return in the line 199. It's only for Modal navigators
|
@alitoshmatov 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeworkspace-android.movAndroid: mWeb Chromeworkspace-mweb.moviOS: Nativehttps://github.com/Expensify/App/assets/59907218/ef8d25c3-1500-4d15-a573-838996d0f455iOS: mWeb Safariworkspace-safari.mp4MacOS: Chrome / Safariworkspace-web.movMacOS: Desktopworkspace-desktop.mov |
alitoshmatov
left a comment
There was a problem hiding this comment.
Sorry for late review, small changes. LGTM!
mountiny
left a comment
There was a problem hiding this comment.
thank you @WojtekBoman @adamgrzybowski @alitoshmatov
|
Rerunning the tests |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
| // If this action is navigating to the ModalNavigator and the last route on the root navigator is not already opened ModalNavigator then push | ||
| } else if (isModalNavigator(action.payload.name) && !isTargetNavigatorOnTop) { | ||
| // If this action is navigating to ModalNavigator or FullScreenNavigator and the last route on the root navigator is not already opened Navigator then push | ||
| } else if ((action.payload.name === NAVIGATORS.FULL_SCREEN_NAVIGATOR || isModalNavigator(action.payload.name)) && !isTargetNavigatorOnTop) { |
There was a problem hiding this comment.
Hi, after this change, I can't open the workspace page on native and mWeb.
Screen.Recording.2024-03-28.at.13.57.46.mov
There was a problem hiding this comment.
Hi! Thanks for noticing that. I see that 2 days ago this PR was merged #38977. It has introduced some changes to the navigation logic. When I was working on this PR, these changes weren't merged yet. I'll try to adjust my fix :)
There was a problem hiding this comment.
Came here to point out the same issue
|
@mountiny I've prepared the PR with a quick fix to this problem, but it's a more complex topic than I initially thought. This PR fixed the issue with navigating between screens, but introduced an inconsistency in the navigation state:
Screen.Recording.2024-03-28.at.11.35.46.mov
Screen.Recording.2024-03-28.at.11.36.27.movSo, I believe we should quickly fix the bug with navigating to the workspace settings on small screens, and then consider how to fix these issues mentioned above. The change that caused these problems may also affect other places. cc: @adamgrzybowski |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.58-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
Details
This PR fixes the flow of opening FullScreenNavigator from the Home page. Now when FullScreenNavigator is opened,
SETTINGS.ROOTandSETTINGS.WORKSPACESpages will be pushed to the navigation state if they haven't been added yet.Fixed Issues
$ #38420
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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
Screen.Recording.2024-03-21.at.10.28.43.mov
Android: mWeb Chrome
Screen.Recording.2024-03-21.at.12.00.09.mov
iOS: Native
Screen.Recording.2024-03-21.at.11.49.10.mov
iOS: mWeb Safari
Screen.Recording.2024-03-21.at.11.51.20.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-21.at.11.54.01.mov
MacOS: Desktop
Screen.Recording.2024-03-21.at.11.52.08.mov