-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[navigation] revamp bottom tab bar and header (#81)
* what * bruh * [wip], did styling for bottom tab nav, working on headers * did some work, really weird bug? * some fixes * weird fix, dont like it * simplified bottomTabNav hiding * pr reviewed * [axe] remove the disappearing bottom tab bar functionality. * [feat] create separate file for back button components. * [refactor] move tab bar item to separate component file. * [feat] create empty header placeholder; fix existing header options. * [feat] apply headers to all screens in the Cases flow. * [fix] fix header style to apply it to the profile screens. * [fix] minor nits. * [feat] apply headers to all profile tabs. * [feat] apply headers to every screen in the auth flow. * [fix] remove redundant back buttons from profile screens. * [fix] bring deep link handler back. --------- Co-authored-by: Ronnie Beggs <[email protected]>
- Loading branch information
1 parent
7b7cd5f
commit cd67ba8
Showing
36 changed files
with
392 additions
and
159 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { router } from 'expo-router'; | ||
import { Text, TouchableOpacity } from 'react-native'; | ||
|
||
import styles from './styles'; | ||
import CircleBackButton from '../../../assets/grey-circle-back-arrow.svg'; | ||
import BackArrow from '../../../assets/red-left-caret.svg'; | ||
|
||
interface backButtonProps { | ||
backText: string; | ||
} | ||
|
||
export function BackButtonText({ backText }: backButtonProps) { | ||
return ( | ||
<TouchableOpacity | ||
onPress={() => router.back()} | ||
style={styles.backButtonContainer} | ||
> | ||
<BackArrow /> | ||
<Text style={styles.headerText}>{backText}</Text> | ||
</TouchableOpacity> | ||
); | ||
} | ||
|
||
export function BackButtonNoText() { | ||
return ( | ||
<TouchableOpacity onPress={() => router.back()}> | ||
<CircleBackButton /> | ||
</TouchableOpacity> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
import { colors } from '../../styles/colors'; | ||
|
||
export default StyleSheet.create({ | ||
backButtonContainer: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
columnGap: 10, | ||
}, | ||
headerText: { | ||
color: colors.midRed, | ||
textAlign: 'center', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: '400', | ||
lineHeight: 24, | ||
letterSpacing: -0.264, | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { View, Image } from 'react-native'; | ||
|
||
import styles from './styles'; | ||
|
||
export function HeaderImage() { | ||
return ( | ||
<Image | ||
source={require('../../../assets/inline-logo.jpeg')} | ||
style={{ width: 120, height: 15 }} | ||
/> | ||
); | ||
} | ||
|
||
export function LeftAlignedHeader() { | ||
return ( | ||
<View style={styles.fullHeaderContainer}> | ||
<HeaderImage /> | ||
</View> | ||
); | ||
} | ||
|
||
export function LeftAlignedHeaderLine() { | ||
return ( | ||
<View style={[styles.fullHeaderContainer, styles.bottomLine]}> | ||
<HeaderImage /> | ||
</View> | ||
); | ||
} | ||
|
||
export function EmptyHeader() { | ||
return <View />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
import { colors } from '../../styles/colors'; | ||
|
||
export default StyleSheet.create({ | ||
fullHeaderContainer: { | ||
width: '92%', | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'flex-start', | ||
paddingTop: 14, | ||
paddingBottom: 14, | ||
}, | ||
bottomLine: { | ||
borderBottomWidth: 1, | ||
borderBottomColor: colors.midGrey, | ||
}, | ||
headerText: { | ||
color: colors.midRed, | ||
textAlign: 'center', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: '400', | ||
lineHeight: 24, | ||
letterSpacing: -0.264, | ||
}, | ||
backButtonContainer: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
columnGap: 10, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { View, Text } from 'react-native'; | ||
|
||
import { colors } from '../../styles/colors'; | ||
|
||
interface TabBarItemProps { | ||
icon: React.ReactNode; | ||
label: string; | ||
focused: boolean; | ||
} | ||
|
||
//Inline styling required --> can't make a styles.ts in this directory otherwise it'll make a new bottom tab idk why | ||
export default function TabBarItem({ icon, label, focused }: TabBarItemProps) { | ||
return ( | ||
<View | ||
style={{ | ||
backgroundColor: focused ? colors.lightRed : 'transparent', | ||
borderRadius: 10, | ||
height: 55, | ||
width: 66, | ||
marginTop: 10, | ||
}} | ||
> | ||
<View | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
marginTop: 8, | ||
}} | ||
> | ||
{icon} | ||
<Text | ||
style={{ | ||
fontSize: 9, | ||
fontStyle: 'normal', | ||
fontWeight: '600', | ||
lineHeight: 21, | ||
color: focused ? colors.midRed : colors.midGrey, | ||
}} | ||
> | ||
{label} | ||
</Text> | ||
</View> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.