-
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 opening FullScreenNavigator from the Home page #38734
Fix opening FullScreenNavigator from the Home page #38734
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
LGTM 🎸
@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 |
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 review, small changes. LGTM!
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.ROOT
andSETTINGS.WORKSPACES
pages 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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
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