diff --git a/native/src/BottomTabNavigator.tsx b/native/src/BottomTabNavigator.tsx index 93514288a1..e8534fbe60 100644 --- a/native/src/BottomTabNavigator.tsx +++ b/native/src/BottomTabNavigator.tsx @@ -27,6 +27,7 @@ import Text from './components/base/Text' import { TAB_NAVIGATOR_ID } from './constants' import { NavigationProps, RoutesParamsType } from './constants/NavigationTypes' import buildConfig from './constants/buildConfig' +import dimensions from './constants/dimensions' import useLoadRegionContent from './hooks/useLoadRegionContent' import useNavigate from './hooks/useNavigate' import useRegionAppContext from './hooks/useRegionAppContext' @@ -44,8 +45,6 @@ const PlacesStack = createStackNavigator() const EventsStack = createStackNavigator() const NewsStack = createStackNavigator() -const TAB_HEIGHT = 60 - const CategoriesStackScreen = () => ( @@ -188,7 +187,7 @@ const BottomTabNavigator = ({ navigation }: BottomTabNavigatorProps): ReactEleme tabBarActiveTintColor: theme.colors.onSurface, tabBarInactiveTintColor: theme.colors.onSurfaceVariant, tabBarStyle: { - height: TAB_HEIGHT + insets.bottom, + height: dimensions.bottomNavigationHeight + insets.bottom, backgroundColor: theme.colors.surfaceVariant, display: bottomTabsVisible ? 'flex' : 'none', }, @@ -196,7 +195,7 @@ const BottomTabNavigator = ({ navigation }: BottomTabNavigatorProps): ReactEleme }}> {Tabs} - {chatVisible && } + {chatVisible && } ) } diff --git a/native/src/components/ChatFab.tsx b/native/src/components/ChatFab.tsx index e4836d40dd..780e94c120 100644 --- a/native/src/components/ChatFab.tsx +++ b/native/src/components/ChatFab.tsx @@ -1,8 +1,8 @@ import { useFocusEffect } from '@react-navigation/native' import React, { ReactElement, useCallback } from 'react' import { useTranslation } from 'react-i18next' -import { ViewStyle } from 'react-native' -import { Badge, FAB, useTheme } from 'react-native-paper' +import { TouchableOpacity, ViewStyle } from 'react-native' +import { Badge, useTheme } from 'react-native-paper' import styled from 'styled-components/native' import { CHAT_DEFAULT_POLLING_INTERVAL, CHAT_ROUTE, getChatName } from 'shared' @@ -12,7 +12,9 @@ import buildConfig from '../constants/buildConfig' import useNavigate from '../hooks/useNavigate' import useRegionAppContext from '../hooks/useRegionAppContext' import { determineApiUrl } from '../utils/helpers' +import { elevatedStyle } from '../utils/styles' import ChatHighlightPopup from './ChatHighlightPopup' +import Icon from './base/Icon' const Container = styled.View` position: absolute; @@ -21,6 +23,16 @@ const Container = styled.View` align-items: flex-end; ` +const TouchableFab = styled(TouchableOpacity)` + width: 56px; + height: 56px; + border-radius: 30%; + background-color: ${props => props.theme.colors.primary}; + justify-content: center; + align-items: center; + ${elevatedStyle} +` + const StyledBadge = styled(Badge)` position: absolute; right: -8px; @@ -60,17 +72,18 @@ const ChatFab = ({ style }: ChatFabProps): ReactElement => { return ( - navigation.navigate(CHAT_ROUTE)} accessibilityLabel={getChatName(buildConfig().appName)} - variant='primary' - style={{ backgroundColor: theme.colors.primary }} - size='medium' - aria-label={getChatName(buildConfig().appName)} - /> + testID='fab'> + + {unreadMessageCount > 0 && ( - {unreadMessageCount} + + {unreadMessageCount} + )} ) diff --git a/native/src/components/Feedback.tsx b/native/src/components/Feedback.tsx index b96f491e7a..ba9b788f49 100644 --- a/native/src/components/Feedback.tsx +++ b/native/src/components/Feedback.tsx @@ -61,7 +61,7 @@ const Feedback = ({ if (sendingStatus === 'successful') { return ( - + {t('thanksMessage')}