Skip to content

Commit

Permalink
feat: refactor navigation infra (#10977)
Browse files Browse the repository at this point in the history
* chore: add feature flag

* feat: prepare main stack

* feat: add tabs stack

* feat: hook up the different screens

* feat: update other navigate methods to support new navigation infra

* chore: add hides back button to tabs

* feat: update tabs styling

* chore: remove console.log

* chore: update live sale logic

* chore: remove unused prop

* feat: remove tab screens from shared routes

* chore: remove comment

* chore: update screen wrapper props

* feat: add tab screens to the individual tabs

* chore: add todo comment

* fix: imports on Tabs.tsx

* fix: ts

* fix: borken types for tabs

* feat: support switchTab

* fix: add missing isNavigationReady to deep linking 💣🚨

* chore: hide relay logs when metaflag is disabled

* chore: better types (thanks Carlos)

* feat/fix: register native module

* chore: improve presentation of dev settings

* feat: default navigation header and other UI fixes

* chore(side-quest): improve OTP UX

* feat: add new patterns example on dev menu

* chore: better directories

* fix: more UX fixes

* chore: better DX

* feat: add staging indicator

* fix: more UI fixes for headers

* chore: better bottom tabs hiding logic

* fix: more UI issues

* fix: consignment inquiry UI issues

* chore: decouple fetch profile

* fix: more broken paddings

* fix: patch broken react-native-screens

* fix: more screen header issues

* fix: more navigation issues

* fix: UI issues on the Inbox

* chore: extract spinner

* feat: better bottom tabs

* chore: bring back tab button count

* fix: broken tests

* fix: more broken UI

* fix: more tests

* fix: skip migrations test TODO: To be fixed later

* fix: more fixes to the dev menu

* chore: align staging indicator

* fix: broken tests

* chore: minor UI fixes

* chore: refactor - make routes a variable instead of a function

* fix: old navigation headers logic

* chore: remove hack

* chore: self review [round 1]

* fix: more broken tests

* chore: better nav stack logic

* fix: remove patch

* fix: city guide missing back button

* fix: remove post-install

* chore: address review comments

* fix: make inbox full bleed

* feat: support replace

* feat: support only show in tab name

* fix: minor tweaks

* chore: bring back state change instrumentation

* chore: bring back tap on search to focus

* fix: align simple page with header with current designs

* fix: align text title on android

* Revert "fix: align simple page with header with current designs"

This reverts commit 4cb2960.

* fix: align (again) simple page with header with current designs

* fix: annoying spinner on add artwork to my collection

* feat: introduce new modal stack

* fix: auction bidding modal

* fix: make sure privacy and terms are displayed in modals

* fix: typescript

* fix: broken test

* fix: address review comments

* fix: skip not needed broken test

* fix: bring back old presentation of screens in app registry
  • Loading branch information
MounirDhahri authored Nov 8, 2024
1 parent a417403 commit 5fcfa7d
Show file tree
Hide file tree
Showing 110 changed files with 2,451 additions and 1,420 deletions.
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ PODS:
- RCT-Folly (= 2022.05.16.00)
- React-Core
- ReactCommon/turbomodule/core
- RNScreens (3.34.0):
- RNScreens (3.35.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -2187,7 +2187,7 @@ SPEC CHECKSUMS:
RNPermissions: 23abdfa77d3cd3700b181a2d47f29939c6878ce6
RNReactNativeHapticFeedback: b83bfb4b537bdd78eb4f6ffe63c6884f7b049ead
RNReanimated: 8a4d86eb951a4a99d8e86266dc71d7735c0c30a9
RNScreens: 29418ceffb585b8f0ebd363de304288c3dce8323
RNScreens: 69850d4519d95b9359cec15a67bb5f9d0bd75262
RNSentry: 3feba366b62cbf306d9f8be629beb516ed811f65
RNShare: 859ff710211285676b0bcedd156c12437ea1d564
RNSVG: ba3e7232f45e34b7b47e74472386cf4e1a676d0a
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"react-native-reanimated-zoom": "0.3.3",
"react-native-render-html": "6.3.4",
"react-native-safe-area-context": "3.4.0",
"react-native-screens": "3.34.0",
"react-native-screens": "3.35.0",
"react-native-shake": "5.5.2",
"react-native-share": "10.0.2",
"react-native-svg": "14.1.0",
Expand Down
26 changes: 17 additions & 9 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GoogleSignin } from "@react-native-google-signin/google-signin"
import * as Sentry from "@sentry/react-native"
import { Navigation } from "app/Navigation/Navigation"
import { GlobalStore, unsafe__getEnvironment, unsafe_getDevToggle } from "app/store/GlobalStore"
import { codePushOptions } from "app/system/codepush"
import { AsyncStorageDevtools } from "app/system/devTools/AsyncStorageDevTools"
Expand All @@ -10,6 +11,7 @@ import { setupSentry } from "app/system/errorReporting/setupSentry"
import { ModalStack } from "app/system/navigation/ModalStack"
import { usePurgeCacheOnAppUpdate } from "app/system/relay/usePurgeCacheOnAppUpdate"
import { useDevToggle } from "app/utils/hooks/useDevToggle"
import { useFeatureFlag } from "app/utils/hooks/useFeatureFlag"
import { addTrackingProvider } from "app/utils/track"
import {
SEGMENT_TRACKING_PROVIDER,
Expand Down Expand Up @@ -93,6 +95,7 @@ const Main = () => {
)

const fpsCounter = useDevToggle("DTFPSCounter")
const useNewNavigation = useFeatureFlag("AREnableNewNavigation")

useStripeConfig()
useSiftConfig()
Expand Down Expand Up @@ -127,6 +130,9 @@ const Main = () => {
return <ForceUpdate forceUpdateMessage={forceUpdateMessage} />
}

if (useNewNavigation) {
return <Navigation />
}
if (!isLoggedIn || onboardingState === "incomplete") {
return <Onboarding />
}
Expand All @@ -139,17 +145,19 @@ const Main = () => {
)
}

const InnerApp = () => (
<Providers>
<AsyncStorageDevtools />
const InnerApp = () => {
return (
<Providers>
<AsyncStorageDevtools />

<DevMenuWrapper>
<Main />
</DevMenuWrapper>
<DevMenuWrapper>
<Main />
</DevMenuWrapper>

<DynamicIslandStagingIndicator />
</Providers>
)
<DynamicIslandStagingIndicator />
</Providers>
)
}

const SentryApp = !__DEV__ ? Sentry.wrap(InnerApp) : InnerApp
export const App = codePush(codePushOptions)(SentryApp)
Loading

0 comments on commit 5fcfa7d

Please sign in to comment.