-
Notifications
You must be signed in to change notification settings - Fork 0
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
Poc/split adjust to native stack #149
Conversation
// const bottomTabRoute = getTopmostBottomTabRoute(stateCopy); | ||
// if (bottomTabRoute?.params && 'policyID' in bottomTabRoute.params) { | ||
// delete bottomTabRoute.params.policyID; | ||
// } |
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.
What about this part?
@@ -1,50 +0,0 @@ | |||
import type {NavigationAction, NavigationState} from '@react-navigation/native'; |
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.
Let's dig a deep hole for this function :D
|
||
// Animation is disabled when navigating to the sidebar screen | ||
const getSplitNavigatorOptions = (route: RouteProp<AuthScreensParamList>) => { | ||
if (!shouldUseNarrowLayout || !route?.params) { | ||
return rootNavigatorOptions.fullScreen; | ||
} | ||
|
||
const screenName = 'screen' in route.params ? route.params.screen : undefined; | ||
|
||
if (!screenName) { | ||
return rootNavigatorOptions.fullScreen; | ||
} | ||
|
||
const animationEnabled = !Object.keys(SIDEBAR_TO_SPLIT).includes(screenName); | ||
|
||
return { | ||
...rootNavigatorOptions.fullScreen, | ||
animation: animationEnabled ? Animations.SLIDE_FROM_RIGHT : Animations.NONE, | ||
}; | ||
}; |
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.
Probably extract this one
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'll handle it in other PR where I put all nav functions into NavigationUtils
import type ReactComponentModule from '@src/types/utils/ReactComponentModule'; | ||
|
||
const loadCustomRouter = require<ReactComponentModule>('@libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter').default; | ||
import CustomRouter from './CustomRouter'; | ||
|
||
function useCustomRouterState({state}: CustomStateHookProps) { |
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.
Let's remember to rename this whole navigator and related functions to root navigator or something else instead of custom stack
Explanation of Change
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop