Increase information density and enlarge some click targets

This commit is contained in:
Paul Frazee 2022-11-28 09:13:37 -06:00
parent 9c4f62ffeb
commit e3fffac97b
5 changed files with 26 additions and 18 deletions

View file

@ -345,8 +345,8 @@ const styles = StyleSheet.create({
}, },
postText: { postText: {
fontFamily: 'Helvetica Neue', fontFamily: 'Helvetica Neue',
fontSize: 17, fontSize: 16,
lineHeight: 22.1, // 1.3 of 17px lineHeight: 20.8, // 1.3 of 16px
}, },
postTextContainer: { postTextContainer: {
flexDirection: 'row', flexDirection: 'row',

View file

@ -196,7 +196,7 @@ const styles = StyleSheet.create({
}, },
postText: { postText: {
fontFamily: 'Helvetica Neue', fontFamily: 'Helvetica Neue',
fontSize: 17, fontSize: 16,
lineHeight: 22.1, // 1.3 of 17px lineHeight: 20.8, // 1.3 of 16px
}, },
}) })

View file

@ -254,7 +254,7 @@ const styles = StyleSheet.create({
}, },
postText: { postText: {
fontFamily: 'Helvetica Neue', fontFamily: 'Helvetica Neue',
fontSize: 17, fontSize: 16,
lineHeight: 22.1, // 1.3 of 17px lineHeight: 20.8, // 1.3 of 16px
}, },
}) })

View file

@ -8,7 +8,6 @@ import {
TouchableWithoutFeedback, TouchableWithoutFeedback,
View, View,
} from 'react-native' } from 'react-native'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import Animated, { import Animated, {
useSharedValue, useSharedValue,
useAnimatedStyle, useAnimatedStyle,
@ -25,10 +24,17 @@ import {CreateSceneModel} from '../../../state/models/shell-ui'
import {s, colors} from '../../lib/styles' import {s, colors} from '../../lib/styles'
export const MainMenu = observer( export const MainMenu = observer(
({active, onClose}: {active: boolean; onClose: () => void}) => { ({
active,
insetBottom,
onClose,
}: {
active: boolean
insetBottom: number
onClose: () => void
}) => {
const store = useStores() const store = useStores()
const initInterp = useSharedValue<number>(0) const initInterp = useSharedValue<number>(0)
const insets = useSafeAreaInsets()
useEffect(() => { useEffect(() => {
if (active) { if (active) {
@ -172,7 +178,7 @@ export const MainMenu = observer(
<Animated.View <Animated.View
style={[ style={[
styles.wrapper, styles.wrapper,
{bottom: insets.bottom + 55}, {bottom: insetBottom + 45},
wrapperAnimStyle, wrapperAnimStyle,
]}> ]}>
<SafeAreaView> <SafeAreaView>
@ -267,7 +273,8 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
height: 40, height: 40,
paddingHorizontal: 10, paddingHorizontal: 10,
marginBottom: 16, marginTop: 12,
marginBottom: 20,
}, },
section: { section: {
paddingHorizontal: 10, paddingHorizontal: 10,

View file

@ -70,7 +70,7 @@ const Btn = ({
onPress?: (event: GestureResponderEvent) => void onPress?: (event: GestureResponderEvent) => void
onLongPress?: (event: GestureResponderEvent) => void onLongPress?: (event: GestureResponderEvent) => void
}) => { }) => {
let size = 21 let size = 24
let addedStyles let addedStyles
let IconEl let IconEl
if (icon === 'menu') { if (icon === 'menu') {
@ -79,17 +79,17 @@ const Btn = ({
IconEl = GridIconSolid IconEl = GridIconSolid
} else if (icon === 'home') { } else if (icon === 'home') {
IconEl = HomeIcon IconEl = HomeIcon
size = 24 size = 27
} else if (icon === 'home-solid') { } else if (icon === 'home-solid') {
IconEl = HomeIconSolid IconEl = HomeIconSolid
size = 24 size = 27
} else if (icon === 'bell') { } else if (icon === 'bell') {
IconEl = BellIcon IconEl = BellIcon
size = 24 size = 27
addedStyles = {position: 'relative', top: -1} as ViewStyle addedStyles = {position: 'relative', top: -1} as ViewStyle
} else if (icon === 'bell-solid') { } else if (icon === 'bell-solid') {
IconEl = BellIconSolid IconEl = BellIconSolid
size = 24 size = 27
addedStyles = {position: 'relative', top: -1} as ViewStyle addedStyles = {position: 'relative', top: -1} as ViewStyle
} else { } else {
IconEl = FontAwesomeIcon IconEl = FontAwesomeIcon
@ -316,7 +316,7 @@ export const MobileShell: React.FC = observer(() => {
<View <View
style={[ style={[
styles.bottomBar, styles.bottomBar,
{paddingBottom: clamp(safeAreaInsets.bottom, 15, 30)}, {paddingBottom: clamp(safeAreaInsets.bottom, 15, 40)},
]}> ]}>
<Btn <Btn
icon={isAtHome ? 'home-solid' : 'home'} icon={isAtHome ? 'home-solid' : 'home'}
@ -343,6 +343,7 @@ export const MobileShell: React.FC = observer(() => {
</View> </View>
<MainMenu <MainMenu
active={isMainMenuActive} active={isMainMenuActive}
insetBottom={clamp(safeAreaInsets.bottom, 15, 40)}
onClose={() => setMainMenuActive(false)} onClose={() => setMainMenuActive(false)}
/> />
<Modal /> <Modal />
@ -491,7 +492,7 @@ const styles = StyleSheet.create({
}, },
ctrl: { ctrl: {
flex: 1, flex: 1,
paddingTop: 15, paddingTop: 12,
paddingBottom: 5, paddingBottom: 5,
}, },
notificationCount: { notificationCount: {