Skip to content

Commit

Permalink
Merge branch 'main' into chore/simplify-navigate-method
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri authored Nov 25, 2024
2 parents 338476a + d5ea9a9 commit 5d1787e
Show file tree
Hide file tree
Showing 10 changed files with 896 additions and 564 deletions.
1,355 changes: 870 additions & 485 deletions src/app/AppRegistry.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/app/Navigation/AuthenticatedRoutes/StackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const registerScreen: React.FC<StackNavigatorScreenProps> = ({ name, modu
const isFullBleed =
module.options.fullBleed ??
// when no header is visible, we want to make sure we are bound by the insets
module.options.screenOptions?.headerShown ??
isHeaderShown(module)

const hidesBottomTabs = module.options.hidesBottomTabs || isModalScreen(module)
Expand Down
3 changes: 1 addition & 2 deletions src/app/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
AuthenticatedRoutes,
AuthenticatedRoutesParams,
} from "app/Navigation/AuthenticatedRoutes/Tabs"
import { UnauthenticatedRoutesParams } from "app/Navigation/UnauthenticatedRoutes"
import { OnboardingWelcomeScreens } from "app/Scenes/Onboarding/Onboarding"
import { GlobalStore } from "app/store/GlobalStore"
import { routingInstrumentation } from "app/system/errorReporting/setupSentry"
Expand All @@ -23,7 +22,7 @@ import SiftReactNative from "sift-react-native"

export const internal_navigationRef = { current: null as NavigationContainerRef<any> | null }

export type NavigationRoutesParams = UnauthenticatedRoutesParams & AuthenticatedRoutesParams
export type NavigationRoutesParams = AuthenticatedRoutesParams

export const MainStackNavigator = createNativeStackNavigator<NavigationRoutesParams>()

Expand Down
22 changes: 0 additions & 22 deletions src/app/Navigation/UnauthenticatedRoutes.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/app/Navigation/_TO_BE_DELETED_Screens/LoginScreen.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/app/Navigation/_TO_BE_DELETED_Screens/SignUpScreen.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/Scenes/HomeView/Sections/HomeViewSectionTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const HomeViewSectionTasksPlaceholder: React.FC<FlexProps> = (flexProps) => {
}

const homeViewSectionTasksQuery = graphql`
query HomeViewSectionTasksQuery($id: String!) @cacheable {
query HomeViewSectionTasksQuery($id: String!) {
homeView {
section(id: $id) {
...HomeViewSectionTasks_section
Expand Down
2 changes: 1 addition & 1 deletion src/app/routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { parse } from "url"
import { AppModule } from "app/AppRegistry"
import { ArtsyWebViewConfig } from "app/Components/ArtsyWebView"
import { __unsafe_mainModalStackRef } from "app/NativeModules/ARScreenPresenterModule"
Expand All @@ -7,7 +8,6 @@ import { compact } from "lodash"
import { parse as parseQueryString } from "query-string"
import { Platform } from "react-native"
import { GraphQLTaggedNode } from "relay-runtime"
import { parse } from "url"

export function matchRoute(
url: string
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/config/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const features = {
},
AREnableNewSaveAndFollowOnArtworkCard: {
description: "Redesign Save CTA and Add Follow CTA on Artwork Grid/Rail",
readyForRelease: false,
readyForRelease: true,
showInDevMenu: true,
echoFlagKey: "AREnableNewSaveAndFollowOnArtworkCard",
},
Expand Down
28 changes: 21 additions & 7 deletions src/app/system/navigation/navigate.tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ describe(navigate, () => {
[
"home",
{
"hidesBackButton": true,
"hidesBottomTabs": true,
"moduleName": "Artwork",
"props": {
"artworkID": "josef-albers-homage-to-the-square",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand All @@ -83,13 +85,15 @@ describe(navigate, () => {
"home",
{
"fullBleed": true,
"hidesBackButton": true,
"moduleName": "Artist",
"props": {
"artistID": "banksy",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand Down Expand Up @@ -137,14 +141,16 @@ describe(navigate, () => {
"home",
{
"fullBleed": true,
"hidesBackButton": true,
"moduleName": "Artist",
"props": {
"artistID": "banksy",
"someAdditionalKey": "value",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand All @@ -171,13 +177,15 @@ describe(navigate, () => {
"home",
{
"fullBleed": true,
"hidesBackButton": true,
"moduleName": "Artist",
"props": {
"artistID": "kaws",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand All @@ -194,14 +202,16 @@ describe(navigate, () => {
[
{
"alwaysPresentModally": true,
"hasOwnModalCloseButton": true,
"modalPresentationStyle": "fullScreen",
"moduleName": "LiveAuction",
"props": {
"slug": "blah",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand Down Expand Up @@ -246,14 +256,16 @@ describe(navigate, () => {
[
"inbox",
{
"hidesBackButton": true,
"moduleName": "Conversation",
"onlyShowInTabName": "inbox",
"props": {
"conversationID": "234",
},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand All @@ -277,11 +289,13 @@ describe(navigate, () => {
"profile",
{
"fullBleed": true,
"hidesBackButton": true,
"moduleName": "SavedSearchAlertsList",
"props": {},
"replaceActiveModal": false,
"replaceActiveScreen": false,
"screenOptions": {
"headerShown": false,
},
"type": "react",
},
]
Expand Down

0 comments on commit 5d1787e

Please sign in to comment.