-
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
Simplify the RootNavigator structure #42582
Simplify the RootNavigator structure #42582
Conversation
src/libs/Navigation/linkTo.ts
Outdated
@@ -128,10 +129,10 @@ export default function linkTo(navigation: NavigationContainerRef<RootStackParam | |||
while ((current = root.getParent())) { | |||
root = current; | |||
} | |||
// debugger; |
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.
🧹
import React from 'react'; | ||
import getComponentDisplayName from '@libs/getComponentDisplayName'; | ||
import FreezeWrapper from '@libs/Navigation/FreezeWrapper'; | ||
|
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.
We probably need some comments here and in the other file about what preparing means for native and web.
@@ -284,20 +286,26 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, []); | |||
|
|||
const CentralPaneNameOptions = { |
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 am wondering if this name is good for this structure
Looks great to me 💪 Good job! |
@hoangzinh 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] |
running a build |
Hi @dominictb! The test you added recently is failing after our changes. I tested this case manually and it all looks fine. I am trying to figure out what is wrong but I can't figure it out. Could you please take a look? 🙏 |
@adamgrzybowski is it urgent? I'll need to wrap up other things before I get back to this. If it is urgent, I suggest you can temporarily skip the test and we can look into that later? |
It would be great to merge these changes to avoid more conflicts etc. But maybe we could tackle this test later. @mountiny What do you think? |
Confirmed that the fix in PR #42742 still work wells in this PR Screen.Recording.2024-06-21.at.22.25.04.mov |
@WojtekBoman @adamgrzybowski sorry there is more conflicts @dominictb it would be great to get this fixd before merging. |
@mountiny @WojtekBoman seems like my PR is reverted here: #44247. So I think you guys can merge this and I'll look into the test as a separate issue. Sorry for blocking you! |
@mountiny Conflicts solved and all checks passed :) |
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.
These pesky conflicts
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.
Going to merge this to hopefully prevent any other conflicts but lets be on a look out for regressions
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.2-0 🚀
|
We discovered a potential problem with this PR when it made some automated UI tests that we're adding in another PR start failing. Actions taken
Expected resultOpenReport is called once for report A and once for reportB Actual resultOpenReport is called twice for reportA and once for report B. note: This likely happens because |
This caused the regression here: #44422 (Discussion) |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
|
||
type Screens = Partial<Record<CentralPaneName, () => React.ComponentType>>; | ||
|
||
const CENTRAL_PANE_SCREENS = { |
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.
BugZero Checklist
These changes caused this issue
This issue was caused by invoking withPrepareCentralPaneScreen HOC multiple times in CENTRAL_PANE_SCREENS.tsx
Details
This PR refactors an approach of storing CentralPane screens in the navigation stack. In the old approach all screens displayed in CentralPane are wrapped by
CentralPaneNavigator
, in this PR this wrapper has been removed, screens are stored directly in the navigation stack.Fixed Issues
$ #42507
PROPOSAL:
Tests
Pages to test:
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 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-06-04.at.16.09.05.mov
Android: mWeb Chrome
Screen.Recording.2024-06-04.at.16.43.40.mov
iOS: Native
Screen.Recording.2024-06-04.at.16.35.18.mov
iOS: mWeb Safari
Screen.Recording.2024-06-04.at.16.01.39.mov
MacOS: Chrome / Safari
Screen.Recording.2024-06-04.at.14.55.10.mov
MacOS: Desktop
Screen.Recording.2024-06-04.at.15.57.29.mov