Skip to content
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

feat: refactor navigation infra #10977

Merged
merged 85 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
51de304
chore: add feature flag
MounirDhahri Oct 18, 2024
6f5ab1d
feat: prepare main stack
MounirDhahri Oct 18, 2024
c9919ce
feat: add tabs stack
MounirDhahri Oct 18, 2024
356284c
feat: hook up the different screens
MounirDhahri Oct 18, 2024
fbd6049
feat: update other navigate methods to support new navigation infra
MounirDhahri Oct 22, 2024
7a30028
chore: add hides back button to tabs
MounirDhahri Oct 22, 2024
2bd3d73
feat: update tabs styling
MounirDhahri Oct 22, 2024
0b2c983
chore: remove console.log
MounirDhahri Oct 22, 2024
55a927d
chore: update live sale logic
MounirDhahri Oct 22, 2024
a44176f
chore: remove unused prop
MounirDhahri Oct 22, 2024
58220e8
feat: remove tab screens from shared routes
MounirDhahri Oct 22, 2024
b7166d4
chore: remove comment
MounirDhahri Oct 22, 2024
4e0e226
chore: update screen wrapper props
MounirDhahri Oct 22, 2024
d03ce95
feat: add tab screens to the individual tabs
MounirDhahri Oct 22, 2024
147123c
chore: add todo comment
MounirDhahri Oct 22, 2024
c93bb39
fix: imports on Tabs.tsx
MounirDhahri Oct 22, 2024
b263762
fix: ts
MounirDhahri Oct 22, 2024
afef924
fix: borken types for tabs
MounirDhahri Oct 22, 2024
5e07a05
feat: support switchTab
MounirDhahri Oct 22, 2024
b4f77b2
fix: add missing isNavigationReady to deep linking 💣🚨
MounirDhahri Oct 23, 2024
335a19e
chore: hide relay logs when metaflag is disabled
MounirDhahri Oct 23, 2024
12db5c5
chore: better types (thanks Carlos)
MounirDhahri Oct 23, 2024
05dd8f3
feat/fix: register native module
MounirDhahri Oct 23, 2024
9d01c7b
chore: improve presentation of dev settings
MounirDhahri Oct 23, 2024
976df6d
feat: default navigation header and other UI fixes
MounirDhahri Oct 23, 2024
98978f7
chore(side-quest): improve OTP UX
MounirDhahri Oct 23, 2024
72da53a
feat: add new patterns example on dev menu
MounirDhahri Oct 23, 2024
a83a51f
chore: better directories
MounirDhahri Oct 23, 2024
46ff305
fix: more UX fixes
MounirDhahri Oct 23, 2024
d7d7061
chore: better DX
MounirDhahri Oct 23, 2024
28b0701
feat: add staging indicator
MounirDhahri Oct 23, 2024
e5a458a
fix: more UI fixes for headers
MounirDhahri Oct 23, 2024
ebd04a7
chore: better bottom tabs hiding logic
MounirDhahri Oct 24, 2024
4d2c215
fix: more UI issues
MounirDhahri Oct 24, 2024
8d0debf
fix: consignment inquiry UI issues
MounirDhahri Oct 24, 2024
62d4d92
chore: decouple fetch profile
MounirDhahri Oct 24, 2024
002d1a5
fix: more broken paddings
MounirDhahri Oct 24, 2024
2d1617e
fix: patch broken react-native-screens
MounirDhahri Oct 24, 2024
6695400
fix: more screen header issues
MounirDhahri Oct 24, 2024
a55447e
fix: more navigation issues
MounirDhahri Oct 24, 2024
d8cfac2
fix: UI issues on the Inbox
MounirDhahri Oct 25, 2024
73db165
chore: extract spinner
MounirDhahri Oct 25, 2024
3df7e58
feat: better bottom tabs
MounirDhahri Oct 25, 2024
c41302f
chore: bring back tab button count
MounirDhahri Oct 25, 2024
46f19f3
fix: broken tests
MounirDhahri Oct 25, 2024
51918ff
fix: more broken UI
MounirDhahri Oct 25, 2024
186dbbc
fix: more tests
MounirDhahri Oct 25, 2024
d05e39d
fix: skip migrations test TODO: To be fixed later
MounirDhahri Oct 25, 2024
26d0216
fix: more fixes to the dev menu
MounirDhahri Oct 25, 2024
fc3ab7d
chore: align staging indicator
MounirDhahri Oct 28, 2024
ed4aece
fix: broken tests
MounirDhahri Oct 28, 2024
ea42143
chore: minor UI fixes
MounirDhahri Oct 28, 2024
ddc5c63
chore: refactor - make routes a variable instead of a function
MounirDhahri Oct 28, 2024
a823bd8
fix: old navigation headers logic
MounirDhahri Oct 28, 2024
074866d
chore: remove hack
MounirDhahri Oct 28, 2024
2c1df7a
chore: self review [round 1]
MounirDhahri Oct 28, 2024
566d0ed
fix: more broken tests
MounirDhahri Oct 28, 2024
f4088b7
chore: better nav stack logic
MounirDhahri Oct 29, 2024
4ae9f09
fix: remove patch
MounirDhahri Oct 29, 2024
ccd12f4
fix: city guide missing back button
MounirDhahri Oct 29, 2024
7db306a
fix: remove post-install
MounirDhahri Oct 29, 2024
524b401
chore: address review comments
MounirDhahri Oct 31, 2024
5260e1a
Merge branch 'main' into feat/update-navigation-infra
MounirDhahri Oct 31, 2024
3b793e1
fix: make inbox full bleed
MounirDhahri Oct 31, 2024
e5a6a9e
feat: support replace
MounirDhahri Oct 31, 2024
e40dec5
feat: support only show in tab name
MounirDhahri Oct 31, 2024
b7f1662
fix: minor tweaks
MounirDhahri Oct 31, 2024
6d90c40
chore: bring back state change instrumentation
MounirDhahri Oct 31, 2024
5f2c1aa
chore: bring back tap on search to focus
MounirDhahri Oct 31, 2024
4cb2960
fix: align simple page with header with current designs
MounirDhahri Nov 1, 2024
9443609
fix: align text title on android
MounirDhahri Nov 1, 2024
fc25b84
Revert "fix: align simple page with header with current designs"
MounirDhahri Nov 1, 2024
09b8c43
fix: align (again) simple page with header with current designs
MounirDhahri Nov 1, 2024
7c3360d
fix: annoying spinner on add artwork to my collection
MounirDhahri Nov 1, 2024
1a46ab4
feat: introduce new modal stack
MounirDhahri Nov 1, 2024
09d5495
fix: auction bidding modal
MounirDhahri Nov 1, 2024
0543d87
fix: make sure privacy and terms are displayed in modals
MounirDhahri Nov 2, 2024
64cc549
fix: typescript
MounirDhahri Nov 2, 2024
a101cbc
Merge branch 'main' into feat/update-navigation-infra
MounirDhahri Nov 2, 2024
bbb9ae7
fix: broken test
MounirDhahri Nov 7, 2024
26601ad
Merge branch 'main' into feat/update-navigation-infra
MounirDhahri Nov 7, 2024
961d64f
Merge branch 'main' into feat/update-navigation-infra
MounirDhahri Nov 7, 2024
7cdd53e
fix: address review comments
MounirDhahri Nov 8, 2024
834e38b
fix: skip not needed broken test
MounirDhahri Nov 8, 2024
1946117
fix: bring back old presentation of screens in app registry
MounirDhahri Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Member Author

@MounirDhahri MounirDhahri Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, we are on App.tsx. This is our entry point to the app (both Android and iOS).
In order to make sure we don't break old logic, I will have the new navigation shell within a separate container.

This choice will also allow us to take advantage of the existing hooks and providers that we already set up in this file.

What does this commit do?
In this commit, we are following the best practices from react-navigation around authentication flows [link].

[Go back] ⬅️_____________ ➡️ [Preparing the tab stack]

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