Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljscript committed Jun 17, 2024
1 parent 6910ba4 commit 32f0782
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 109 deletions.
1 change: 1 addition & 0 deletions apps/wallet-mobile/.storybook/storybook.requires.js

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

64 changes: 32 additions & 32 deletions apps/wallet-mobile/src/WalletNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,38 +137,38 @@ const WalletTabNavigator = () => {
)}
</Tab.Screen>

{dappExplorerEnabled ? (
<Tab.Screen
name="discover"
options={({route}: {route: RouteProp<WalletTabRoutes, 'discover'>}) => ({
tabBarIcon: ({focused}) => <Icon.Discover size={28} color={focused ? colors.active : colors.inactive} />,
tabBarLabel: strings.discoverTabBarLabel,
tabBarTestID: 'discoverTabBarButton',
tabBarStyle: {
...hideTabBarForRoutes(route),
backgroundColor: colors.background,
},
})}
>
{() => (
<SearchProvider>
<DiscoverNavigator />
</SearchProvider>
)}
</Tab.Screen>
) : (
<Tab.Screen
name="staking-dashboard"
component={DashboardNavigator}
options={{
tabBarIcon: ({focused}) => (
<Icon.TabStaking size={24} color={focused ? colors.active : colors.inactive} />
),
tabBarLabel: strings.stakingButton,
tabBarTestID: 'stakingTabBarButton',
}}
/>
)}
{/*{dappExplorerEnabled ? (*/}

Check warning on line 140 in apps/wallet-mobile/src/WalletNavigator.tsx

View workflow job for this annotation

GitHub Actions / check

Expected space or tab after '/*' in comment
{/* <Tab.Screen*/}
{/* name="discover"*/}
{/* options={({route}: {route: RouteProp<WalletTabRoutes, 'discover'>}) => ({*/}
{/* tabBarIcon: ({focused}) => <Icon.Discover size={28} color={focused ? colors.active : colors.inactive} />,*/}
{/* tabBarLabel: strings.discoverTabBarLabel,*/}
{/* tabBarTestID: 'discoverTabBarButton',*/}
{/* tabBarStyle: {*/}
{/* ...hideTabBarForRoutes(route),*/}
{/* backgroundColor: colors.background,*/}
{/* },*/}
{/* })}*/}
{/* >*/}
{/* {() => (*/}
{/* <SearchProvider>*/}
{/* <DiscoverNavigator />*/}
{/* </SearchProvider>*/}
{/* )}*/}
{/* </Tab.Screen>*/}
{/*) : (*/}

Check warning on line 159 in apps/wallet-mobile/src/WalletNavigator.tsx

View workflow job for this annotation

GitHub Actions / check

Expected space or tab after '/*' in comment
{/* <Tab.Screen*/}
{/* name="staking-dashboard"*/}
{/* component={DashboardNavigator}*/}
{/* options={{*/}
{/* tabBarIcon: ({focused}) => (*/}
{/* <Icon.TabStaking size={24} color={focused ? colors.active : colors.inactive} />*/}
{/* ),*/}
{/* tabBarLabel: strings.stakingButton,*/}
{/* tabBarTestID: 'stakingTabBarButton',*/}
{/* }}*/}
{/* />*/}
{/*)}*/}

Check warning on line 171 in apps/wallet-mobile/src/WalletNavigator.tsx

View workflow job for this annotation

GitHub Actions / check

Expected space or tab after '/*' in comment

<Tab.Screen
name="menu"
Expand Down
8 changes: 7 additions & 1 deletion apps/wallet-mobile/src/components/Icon/Chevron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ export const Chevron = ({
const rotate = direction === 'down' ? 0 : direction === 'right' ? 270 : direction === 'left' ? 90 : 180

return (
<Svg width={size} height={size} viewBox="-7 -14 28 28" style={{transform: [{rotate: `${rotate}deg`}]}}>
<Svg
width={size}
pointerEvents={'none'}

Check warning on line 19 in apps/wallet-mobile/src/components/Icon/Chevron.tsx

View workflow job for this annotation

GitHub Actions / check

Curly braces are unnecessary here
height={size}
viewBox="-7 -14 28 28"
style={{transform: [{rotate: `${rotate}deg`}]}}
>
<Path
fillRule="evenodd"
clipRule="evenodd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const BrowserNavigator = () => {
<Tab.Navigator screenOptions={{animationEnabled: false, headerShown: false}}>
<Tab.Screen name="discover-browse-dapp" component={BrowseDappScreen} />

<Tab.Screen name="discover-search-dapp-in-browser" component={SearchDappInBrowserScreen} />
{/*<Tab.Screen name="discover-search-dapp-in-browser" component={SearchDappInBrowserScreen} />*/}

Check warning on line 21 in apps/wallet-mobile/src/features/Discover/BrowserNavigator.tsx

View workflow job for this annotation

GitHub Actions / check

Expected space or tab after '/*' in comment
</Tab.Navigator>
</SafeAreaView>
)
Expand Down
28 changes: 20 additions & 8 deletions apps/wallet-mobile/src/kernel/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {StackNavigationOptions, StackNavigationProp} from '@react-navigation/sta
import {Atoms, ThemedPalette, useTheme} from '@yoroi/theme'
import {Portfolio} from '@yoroi/types'
import React from 'react'
import {Dimensions, InteractionManager, TouchableOpacity, TouchableOpacityProps, ViewStyle} from 'react-native'
import {Dimensions, InteractionManager, TouchableOpacity, TouchableOpacityProps, View, ViewStyle} from 'react-native'

Check failure on line 16 in apps/wallet-mobile/src/kernel/navigation.tsx

View workflow job for this annotation

GitHub Actions / check

'View' is defined but never used. Allowed unused vars must match /^_/u

import {Icon} from '../components'
import {ScanFeature} from '../features/Scan/common/types'
Expand Down Expand Up @@ -46,7 +46,7 @@ export const BackButton = (props: TouchableOpacityProps & {color?: string}) => {
const {color} = useTheme()

return (
<TouchableOpacity {...props} testID="buttonBack2">
<TouchableOpacity {...props} testID="buttonBack2" style={{backgroundColor: 'red'}}>
<Icon.Chevron direction="left" color={props.color ?? color.gray_cmax} />
</TouchableOpacity>
)
Expand All @@ -58,9 +58,9 @@ export const defaultStackNavigationOptions = (atoms: Atoms, color: ThemedPalette
return {
headerTintColor: color.gray_cmax,
headerStyle: {
elevation: 0,
elevation: 3,
shadowOpacity: 0,
backgroundColor: color.gray_cmin,
backgroundColor: 'orange',
},
headerTitleStyle: {
...atoms.body_1_lg_medium,
Expand All @@ -73,14 +73,26 @@ export const defaultStackNavigationOptions = (atoms: Atoms, color: ThemedPalette
alignItems: 'center',
justifyContent: 'center',
},
headerLeftContainerStyle: {
...atoms.pl_sm,
},
headerRightContainerStyle: {
...atoms.pr_sm,
},
cardStyle: {backgroundColor: 'white'},
headerLeft: (props) => <BackButton {...props} />,
headerLeft: (props) => (
<TouchableOpacity
style={{...atoms.pl_sm, ...atoms.pt_sm, ...atoms.pb_sm, elevation: 10000, backgroundColor: 'brown'}}
{...props}
>
<BackButton />
</TouchableOpacity>
),

headerLeftLabelVisible: false,
headerBackgroundContainerStyle: {
backgroundColor: 'purple',
},
headerBackTitleStyle: {
backfaceVisibility: 'hidden',
},
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const TxHistoryNavigator = () => {
screenOptions={{
...defaultStackNavigationOptions(atoms, color),
detachPreviousScreen: false /* https://github.com/react-navigation/react-navigation/issues/9883 */,
gestureEnabled: true,
gestureEnabled: false,
}}
>
<Stack.Screen
Expand Down
48 changes: 24 additions & 24 deletions apps/wallet-mobile/translations/messages/src/WalletNavigator.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"start": {
"line": 260,
"column": 22,
"index": 8865
"index": 9057
},
"end": {
"line": 263,
"column": 3,
"index": 8968
"index": 9160
}
},
{
Expand All @@ -21,12 +21,12 @@
"start": {
"line": 264,
"column": 14,
"index": 8984
"index": 9176
},
"end": {
"line": 267,
"column": 3,
"index": 9083
"index": 9275
}
},
{
Expand All @@ -36,12 +36,12 @@
"start": {
"line": 268,
"column": 17,
"index": 9102
"index": 9294
},
"end": {
"line": 271,
"column": 3,
"index": 9207
"index": 9399
}
},
{
Expand All @@ -51,12 +51,12 @@
"start": {
"line": 272,
"column": 19,
"index": 9228
"index": 9420
},
"end": {
"line": 275,
"column": 3,
"index": 9325
"index": 9517
}
},
{
Expand All @@ -66,12 +66,12 @@
"start": {
"line": 276,
"column": 18,
"index": 9345
"index": 9537
},
"end": {
"line": 279,
"column": 3,
"index": 9440
"index": 9632
}
},
{
Expand All @@ -81,12 +81,12 @@
"start": {
"line": 280,
"column": 16,
"index": 9458
"index": 9650
},
"end": {
"line": 283,
"column": 3,
"index": 9556
"index": 9748
}
},
{
Expand All @@ -96,12 +96,12 @@
"start": {
"line": 284,
"column": 17,
"index": 9575
"index": 9767
},
"end": {
"line": 287,
"column": 3,
"index": 9640
"index": 9832
}
},
{
Expand All @@ -111,12 +111,12 @@
"start": {
"line": 288,
"column": 14,
"index": 9656
"index": 9848
},
"end": {
"line": 291,
"column": 3,
"index": 9750
"index": 9942
}
},
{
Expand All @@ -126,12 +126,12 @@
"start": {
"line": 292,
"column": 14,
"index": 9766
"index": 9958
},
"end": {
"line": 295,
"column": 3,
"index": 9818
"index": 10010
}
},
{
Expand All @@ -141,12 +141,12 @@
"start": {
"line": 296,
"column": 18,
"index": 9838
"index": 10030
},
"end": {
"line": 299,
"column": 3,
"index": 9927
"index": 10119
}
},
{
Expand All @@ -156,12 +156,12 @@
"start": {
"line": 300,
"column": 31,
"index": 9960
"index": 10152
},
"end": {
"line": 303,
"column": 3,
"index": 10069
"index": 10261
}
},
{
Expand All @@ -171,12 +171,12 @@
"start": {
"line": 304,
"column": 19,
"index": 10090
"index": 10282
},
"end": {
"line": 307,
"column": 3,
"index": 10159
"index": 10351
}
}
]
Loading

0 comments on commit 32f0782

Please sign in to comment.