-
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 navs #101
base: main
Are you sure you want to change the base?
Poc/split navs #101
Conversation
d5a8d96
to
0283fa5
Compare
…adjust getAdaptedState
…k button on member list
…m a link and going back
…pted-state-fixes Poc/split navs adapted state fixes
Poc/freeze perf
@@ -43,7 +43,7 @@ index 7558eb3..b7bb75e 100644 | |||
}) : STATE_TRANSITIONING_OR_BELOW_TOP; | |||
} | |||
+ | |||
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Workspace_Initial') && isScreenActive !== STATE_ON_TOP; | |||
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Workspace_Initial' || route.name === 'Home' || route.name === 'Search_Bottom_Tab' || route.name === 'Settings_Root' || route.name === 'ReportsSplitNavigator' || route.name === 'Search_Central_Pane') && isScreenActive !== STATE_ON_TOP; |
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.
Remember to remove unused pages/navigators before merging
import type ChildrenProps from '@src/types/utils/ChildrenProps'; | ||
|
||
function ActiveWorkspaceContextProvider({children}: ChildrenProps) { | ||
const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(undefined); | ||
|
||
const lastPolicyRoute = useNavigationState((state) => |
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.
Maybe add a comment explaining why we only check NAVIGATORS.REPORTS_SPLIT_NAVIGATOR
and SCREENS.SEARCH.CENTRAL_PANE
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.
Or maybe we should use isFullScreenName?
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 can, but not all full screens store the policy ID, so it may be a bit confusing, but it will also work
<View style={styles.rootNavigatorContainerStyles(shouldUseNarrowLayout)}> | ||
<RootStack.Navigator | ||
screenOptions={screenOptions.centralPaneNavigator} | ||
isSmallScreenWidth={isSmallScreenWidth} | ||
> | ||
{/* This have to be the first navigator in auth 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.
{/* This have to be the first navigator in auth screens. */} | |
{/* This has to be the first navigator in auth screens. */} |
return; | ||
} | ||
|
||
if (queryFromRouteParam) { |
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.
Check whether this if statement can be written in a more readable way
@@ -264,6 +244,26 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie | |||
isInitialRender.current = false; | |||
} | |||
|
|||
// Animation is disabled when navigating to the sidebar screen | |||
const getSplitNavigatorOptions = (route: RouteProp<AuthScreensParamList>) => { |
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.
Maybe pass the screen as a parameter instead of the route
@@ -89,7 +89,8 @@ function WorkspaceInviteMessagePage({policy, route, currentUserPersonalDetails}: | |||
if (isEmptyObject(policy)) { | |||
return; | |||
} | |||
Navigation.goBack(ROUTES.WORKSPACE_INVITE.getRoute(route.params.policyID), true); | |||
// @TODO: Check if this method works the same as on the main branch |
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.
@TODO
comment
@@ -45,7 +45,9 @@ function WorkspaceJoinUserPage({route, policy}: WorkspaceJoinUserPageProps) { | |||
} | |||
if (!isEmptyObject(policy) && !policy?.isJoinRequestPending && !PolicyUtils.isPendingDeletePolicy(policy)) { | |||
Navigation.isNavigationReady().then(() => { | |||
Navigation.goBack(undefined, false, true); | |||
// @TODO: Check if this method works the same as on the main branch |
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.
@TODO
comment
return screen; | ||
} | ||
|
||
// @TODO: Fix types here |
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.
@TODO
comment
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.
Remove comments in this file
|
||
// @TODO: Make sure that everything works fine without compareAndAdaptState function. Probably with getMatchingFullScreenRoute. |
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.
@TODO
comment
…screen-blurred Adjust getIsScreenBlurred to native platforms
…ge-url-fix Make ReportsSplitNavigator public
…avigation.navigate
Poc/split cleanup
Details
Fixed Issues
$
PROPOSAL:
Tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop