Tune the UI layout of the feed tab header

zio/stable
Paul Frazee 2023-05-25 14:56:23 -05:00
parent 524f8b6abd
commit f03ac9fd56
3 changed files with 22 additions and 21 deletions

View File

@ -7,8 +7,9 @@ import {useStores} from 'state/index'
import {usePalette} from 'lib/hooks/usePalette' import {usePalette} from 'lib/hooks/usePalette'
import {useAnimatedValue} from 'lib/hooks/useAnimatedValue' import {useAnimatedValue} from 'lib/hooks/useAnimatedValue'
import {Link} from '../util/Link' import {Link} from '../util/Link'
import {Text} from '../util/text/Text'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {colors} from 'lib/styles' import {s} from 'lib/styles'
export const FeedsTabBar = observer( export const FeedsTabBar = observer(
( (
@ -45,20 +46,23 @@ export const FeedsTabBar = observer(
<View style={[pal.view]}> <View style={[pal.view]}>
<TouchableOpacity <TouchableOpacity
testID="viewHeaderDrawerBtn" testID="viewHeaderDrawerBtn"
style={styles.tabBarAvi}
onPress={onPressAvi} onPress={onPressAvi}
accessibilityRole="button" accessibilityRole="button"
accessibilityLabel="Open navigation" accessibilityLabel="Open navigation"
accessibilityHint="Access profile and other navigation links"> accessibilityHint="Access profile and other navigation links"
<FontAwesomeIcon icon="bars" size={24} color={colors.blue3} /> hitSlop={10}>
<FontAwesomeIcon icon="bars" size={18} color={pal.colors.icon} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<Text type="title" style={[pal.link, s.bold]}>
Bluesky
</Text>
<View style={[pal.view]}> <View style={[pal.view]}>
<Link href="/settings/saved-feeds"> <Link href="/settings/saved-feeds" hitSlop={10}>
<FontAwesomeIcon <FontAwesomeIcon
icon="satellite-dish" icon="satellite-dish"
size={24} size={19}
color={pal.colors.link} color={pal.colors.icon}
/> />
</Link> </Link>
</View> </View>
@ -75,13 +79,6 @@ export const FeedsTabBar = observer(
) )
const styles = StyleSheet.create({ const styles = StyleSheet.create({
topBar: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingHorizontal: 18,
width: '100%',
},
tabBar: { tabBar: {
position: 'absolute', position: 'absolute',
zIndex: 1, zIndex: 1,
@ -92,8 +89,12 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
borderBottomWidth: 1, borderBottomWidth: 1,
}, },
tabBarAvi: { topBar: {
marginTop: 1, flexDirection: 'row',
marginRight: 18, justifyContent: 'space-between',
alignItems: 'center',
paddingHorizontal: 18,
paddingBottom: 2,
width: '100%',
}, },
}) })

View File

@ -92,7 +92,7 @@ export function TabBar({
hoverStyle={pal.viewLight} hoverStyle={pal.viewLight}
onPress={() => onPressItem(i)}> onPress={() => onPressItem(i)}>
<Text <Text
type="xl-bold" type="lg-bold"
testID={testID ? `${testID}-${item}` : undefined} testID={testID ? `${testID}-${item}` : undefined}
style={selected ? pal.text : pal.textLight}> style={selected ? pal.text : pal.textLight}>
{item} {item}
@ -127,12 +127,12 @@ const styles = isDesktopWeb
flexDirection: 'row', flexDirection: 'row',
}, },
contentContainer: { contentContainer: {
gap: 14, gap: 18,
paddingHorizontal: 18, paddingHorizontal: 18,
}, },
item: { item: {
paddingTop: 8, paddingTop: 8,
paddingBottom: 12, paddingBottom: 8,
borderBottomWidth: 3, borderBottomWidth: 3,
borderBottomColor: 'transparent', borderBottomColor: 'transparent',
}, },

View File

@ -23,7 +23,7 @@ import {useAnalytics} from 'lib/analytics'
import {ComposeIcon2} from 'lib/icons' import {ComposeIcon2} from 'lib/icons'
import {isDesktopWeb} from 'platform/detection' import {isDesktopWeb} from 'platform/detection'
const HEADER_OFFSET = isDesktopWeb ? 50 : 74 const HEADER_OFFSET = isDesktopWeb ? 50 : 64
const POLL_FREQ = 30e3 // 30sec const POLL_FREQ = 30e3 // 30sec
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'> type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'>