Skip to content

Commit

Permalink
chore: update orange icons to accessible color (#803)
Browse files Browse the repository at this point in the history
* chore: update loader to remain consistent

* chore: update AddButton svg with proper colors

* chore: update sync icon to be svg

* chore: remove duplicate sync icon

* chore: remove unnecessary styling
  • Loading branch information
ErikSin authored Oct 22, 2024
1 parent 2c6d64d commit 9b3e386
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 65 deletions.
20 changes: 20 additions & 0 deletions src/frontend/images/AddButton.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/frontend/images/Sync.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {View, StyleSheet} from 'react-native';
import {IconButton} from '../../sharedComponents/IconButton';

import {EditIcon} from '../../sharedComponents/icons';
import {SyncIcon} from '../../sharedComponents/icons/SyncIconCircle';
import {SyncIcon} from '../../sharedComponents/icons';
import {useNavigationFromRoot} from '../../hooks/useNavigationWithTypes';
import {useDeviceInfo} from '../../hooks/server/deviceInfo';
import {UIActivityIndicator} from 'react-native-indicators';
Expand Down
20 changes: 4 additions & 16 deletions src/frontend/sharedComponents/AddButton.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import {
GestureResponderEvent,
Image,
StyleProp,
StyleSheet,
TouchableOpacity,
View,
ViewStyle,
} from 'react-native';
import {Loading} from './Loading';
import AddButtonSVG from '../images/AddButton.svg';
import {UIActivityIndicator} from 'react-native-indicators';

interface AddButtonProps {
style?: StyleProp<ViewStyle>;
Expand All @@ -17,7 +17,6 @@ interface AddButtonProps {
onPress: ((event: GestureResponderEvent) => void) & (() => void);
isLoading?: boolean;
}

const AddButtonNoMemo = ({
style,
testID,
Expand All @@ -27,16 +26,9 @@ const AddButtonNoMemo = ({
}: AddButtonProps) => (
<View
testID={testID}
style={[styles.container, {bottom: isLoading ? 75 : 25}, style]}>
style={[styles.container, {bottom: isLoading ? 50 : 25}, style]}>
<TouchableOpacity disabled={disabled || isLoading} onPress={onPress}>
{!isLoading ? (
<Image
source={require('../images/add-button.png')}
style={styles.button}
/>
) : (
<Loading size={15} />
)}
{isLoading ? <UIActivityIndicator size={50} /> : <AddButtonSVG />}
</TouchableOpacity>
</View>
);
Expand All @@ -51,8 +43,4 @@ const styles = StyleSheet.create({
position: 'absolute',
alignSelf: 'center',
},
button: {
width: 125,
height: 125,
},
});
4 changes: 2 additions & 2 deletions src/frontend/sharedComponents/HomeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, {FC} from 'react';
import {View, StyleSheet} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import {IconButton} from './IconButton';
import {SyncIconCircle} from './icons';
import {GPSPill} from './GPSPill';
import {BottomTabHeaderProps} from '@react-navigation/bottom-tabs';
import {EdgeInsets, useSafeAreaInsets} from 'react-native-safe-area-context';
import {DrawerMenuIcon} from './icons/DrawerMenuIcon';
import SyncIconCircle from '../images/Sync.svg';

export const HomeHeader: FC<
BottomTabHeaderProps & {openDrawer: () => void}
Expand All @@ -25,7 +25,7 @@ export const HomeHeader: FC<
onPress={() => {
navigation.navigate('Sync');
}}>
<SyncIconCircle />
<SyncIconCircle testID="MAIN.sync-icon" />
</IconButton>
<GPSPill navigation={navigation} />
<DrawerMenuIcon style={{marginRight: 20}} onPress={openDrawer} />
Expand Down
45 changes: 0 additions & 45 deletions src/frontend/sharedComponents/icons/SyncIconCircle.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/frontend/sharedComponents/icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type ImageIconProps = {

export {GpsIcon} from './GpsIcon';
// export { CategoryIcon, CategoryCircleIcon } from "./CategoryIcon";
export {SyncIconCircle} from './SyncIconCircle';

export const AlertIcon = ({size = 30, color = RED, style}: FontIconProps) => (
<MaterialCommunityIcon color={color} name="alert" size={size} style={style} />
Expand Down

0 comments on commit 9b3e386

Please sign in to comment.