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: native tabs #108

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions packages/host/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ target 'host' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

pod 'SDWebImage', :modular_headers => true
pod 'SDWebImageSVGCoder', :modular_headers => true

target 'hostTests' do
inherit! :complete
# Pods for testing
Expand Down
69 changes: 68 additions & 1 deletion packages/host/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,55 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-bottom-tabs (0.5.2):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- react-native-bottom-tabs/common (= 0.5.2)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- SDWebImage (>= 5.19.1)
- SDWebImageSVGCoder (>= 1.7.0)
- SwiftUIIntrospect (~> 1.0)
- Yoga
- react-native-bottom-tabs/common (0.5.2):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- SDWebImage (>= 5.19.1)
- SDWebImageSVGCoder (>= 1.7.0)
- SwiftUIIntrospect (~> 1.0)
- Yoga
- react-native-safe-area-context (4.12.0):
- DoubleConversion
- glog
Expand Down Expand Up @@ -1707,7 +1756,13 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SDWebImage (5.20.0):
- SDWebImage/Core (= 5.20.0)
- SDWebImage/Core (5.20.0)
- SDWebImageSVGCoder (1.7.0):
- SDWebImage/Core (~> 5.6)
- SocketRocket (0.7.1)
- SwiftUIIntrospect (1.3.0)
- SwiftyRSA (1.7.0):
- SwiftyRSA/ObjC (= 1.7.0)
- SwiftyRSA/ObjC (1.7.0)
Expand Down Expand Up @@ -1752,6 +1807,7 @@ DEPENDENCIES:
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
- react-native-bottom-tabs (from `../node_modules/react-native-bottom-tabs`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
Expand Down Expand Up @@ -1784,12 +1840,17 @@ DEPENDENCIES:
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- RNScreens (from `../node_modules/react-native-screens`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- SDWebImage
- SDWebImageSVGCoder
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- JWTDecode
- SDWebImage
- SDWebImageSVGCoder
- SocketRocket
- SwiftUIIntrospect
- SwiftyRSA

EXTERNAL SOURCES:
Expand Down Expand Up @@ -1866,6 +1927,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
React-microtasksnativemodule:
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
react-native-bottom-tabs:
:path: "../node_modules/react-native-bottom-tabs"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
React-nativeconfig:
Expand Down Expand Up @@ -1971,6 +2034,7 @@ SPEC CHECKSUMS:
React-logger: 97c9dafae1f1a638001a9d1d0e93d431f2f9cb7b
React-Mapbuffer: 3146a13424f9fec2ea1f1462d49d566e4d69b732
React-microtasksnativemodule: 02d218c79c72d373a92a8552183f4ead0d1c6e05
react-native-bottom-tabs: e1a13267a8c4584d6a96bc732f8e9b93fe6dfa2d
react-native-safe-area-context: 458f6b948437afcb59198016b26bbd02ff9c3b47
React-nativeconfig: 93fe8c85a8c40820c57814e30f3e44b94c995a7b
React-NativeModulesApple: b3e076fd0d7b73417fe1e8c8b26e3c57ae9b74aa
Expand Down Expand Up @@ -2003,10 +2067,13 @@ SPEC CHECKSUMS:
RNCAsyncStorage: 597673c6086d359029afefef8fd5859f1f35ab87
RNScreens: e389d6a6a66a4f0d3662924ecae803073ccce8ec
RNVectorIcons: 07792a9538e8577c1263fcad187712e90d65d8fb
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d
SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6
Yoga: 157bed1c62656587df4639d4dc29714898f8fb10

PODFILE CHECKSUM: 1eb29827633ed97ecc85d01956159c426f755d22
PODFILE CHECKSUM: 2b24fa302810c2cc12b0fc718c30582aea935b12

COCOAPODS: 1.15.2
3 changes: 2 additions & 1 deletion packages/host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"react-native-paper": "5.12.5",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "3.35.0",
"react-native-vector-icons": "10.2.0"
"react-native-vector-icons": "10.2.0",
"react-native-bottom-tabs": "0.5.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand Down
14 changes: 10 additions & 4 deletions packages/host/rspack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ export default env => {
* dependency. You might need it when using workspaces/monorepos or unconventional project
* structure. For simple/typical project you won't need it.
*/
// alias: {
// 'react-native': reactNativePath,
// },
alias: {
// 'react-native': reactNativePath,
'react-native-bottom-tabs$':
path.dirname(resolve('react-native-bottom-tabs/package.json')) +
'/src',
'react-native-bottom-tabs/react-navigation':
path.dirname(resolve('react-native-bottom-tabs/package.json')) +
'/src/react-navigation',
},
},
/**
* Configures output.
Expand Down Expand Up @@ -126,7 +132,7 @@ export default env => {
},
},
/** Run React Native codegen, required for utilizing new architecture */
Repack.REACT_NATIVE_CODEGEN_RULES,
// Repack.REACT_NATIVE_CODEGEN_RULES,
/**
* This loader handles all static assets (images, video, audio and others), so that you can
* use (reference) them inside your application.
Expand Down
10 changes: 5 additions & 5 deletions packages/host/src/navigation/TabsNavigator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {createMaterialBottomTabNavigator} from 'react-native-paper/react-navigation';
import {createNativeBottomTabNavigator} from 'react-native-bottom-tabs/react-navigation';
import HomeNavigator from './HomeNavigator';
import ServicesNavigator from './ServicesNavigator';
import AccountNavigator from './AccountNavigator';
Expand All @@ -10,7 +10,7 @@ export type TabsParamList = {
AccountNavigator: undefined;
};

const Tabs = createMaterialBottomTabNavigator<TabsParamList>();
const Tabs = createNativeBottomTabNavigator<TabsParamList>();

const TabsNavigator = () => {
return (
Expand All @@ -20,23 +20,23 @@ const TabsNavigator = () => {
component={HomeNavigator}
options={{
title: 'Home',
tabBarIcon: 'home',
tabBarIcon: () => ({ sfSymbol: 'book' }),
}}
/>
<Tabs.Screen
name="ServicesNavigator"
component={ServicesNavigator}
options={{
title: 'Services',
tabBarIcon: 'apps',
tabBarIcon: () => ({ sfSymbol: 'book' }),
}}
/>
<Tabs.Screen
name="AccountNavigator"
component={AccountNavigator}
options={{
title: 'Account',
tabBarIcon: 'account',
tabBarIcon: () => ({ sfSymbol: 'book' }),
}}
/>
</Tabs.Navigator>
Expand Down
29 changes: 29 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.