Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US-2150: Developers need an easy way to change the colors of the wallet #908

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d18b14d
remove unused colors
rodrigoncalves Feb 25, 2024
a84e300
add primary and secondary colors for text
rodrigoncalves Feb 25, 2024
dcc460c
add colors text in security information screen
rodrigoncalves Feb 25, 2024
87798d8
move colors text to sharedColors
rodrigoncalves Feb 25, 2024
99aaf2c
refactor colors
rodrigoncalves Feb 25, 2024
1a91c12
footer active color of buttons
rodrigoncalves Feb 26, 2024
8eb3016
home page
rodrigoncalves Feb 27, 2024
f011410
pin screen
rodrigoncalves Feb 27, 2024
3c5e726
refactor colors
rodrigoncalves Feb 28, 2024
ea77584
offline screen
rodrigoncalves Feb 28, 2024
9f3e7c1
input and token balance
rodrigoncalves Feb 28, 2024
bf4c37a
buttons
rodrigoncalves Feb 28, 2024
70fe24e
remove inputActive and inputInactive constants
rodrigoncalves Feb 28, 2024
1c1e6f9
make user icon as svg in order to change its colors
rodrigoncalves Mar 25, 2024
cd150e7
change the top color
rodrigoncalves Mar 25, 2024
f06b8df
adjustments
rodrigoncalves Mar 25, 2024
5060f7a
no dapps image
rodrigoncalves Mar 25, 2024
8d8754c
receive screen
rodrigoncalves Mar 25, 2024
dd5305a
text label
rodrigoncalves Mar 25, 2024
0b446e2
domain input
rodrigoncalves Mar 26, 2024
93b4d41
set default UserIcon params
rodrigoncalves Mar 26, 2024
90ae089
adjustments
rodrigoncalves Mar 26, 2024
e59372b
app spinner
rodrigoncalves Mar 26, 2024
98b34da
confirmation modal
rodrigoncalves Mar 26, 2024
220454a
avatar
rodrigoncalves Mar 26, 2024
7b9efa9
account box
rodrigoncalves Mar 26, 2024
680b384
text link
rodrigoncalves Mar 26, 2024
5e29014
wallet backup
rodrigoncalves Mar 26, 2024
24cb6e4
center no deploy image
rodrigoncalves Mar 26, 2024
582e3ef
onboard screen must have fixed colors instead
rodrigoncalves Mar 26, 2024
eecbafd
new master key screen
rodrigoncalves Mar 26, 2024
1c8ac06
GlobalErrorHandler
rodrigoncalves Mar 26, 2024
1ba5e2b
dapp item
rodrigoncalves Mar 26, 2024
632c8a1
app header adjustments
rodrigoncalves Mar 27, 2024
ba2c526
move shared colors to a separate file
rodrigoncalves Mar 27, 2024
c93ad07
remove unused input shared color
rodrigoncalves Mar 27, 2024
8c4b751
remove unused CustomInput
rodrigoncalves Mar 27, 2024
88d4ca6
remove unused colors file
rodrigoncalves Mar 27, 2024
9368fa7
fix app header
rodrigoncalves Mar 27, 2024
4dec1b5
add margin bottom to TransactionSummary
rodrigoncalves Mar 27, 2024
febc0b5
add deploy wallet SVG image
rodrigoncalves Mar 27, 2024
428f6d8
add NoTransctions image
rodrigoncalves Mar 27, 2024
a6f7830
ImportMasterKeyScreen
rodrigoncalves Mar 28, 2024
60b09c0
colors adjustments
rodrigoncalves Mar 28, 2024
93b248c
fix import
rodrigoncalves Mar 28, 2024
04ef1e2
remove remaining white colors
rodrigoncalves Mar 28, 2024
29fa585
remove duplicated shared styles
rodrigoncalves Mar 28, 2024
a687499
fix build
rodrigoncalves Mar 28, 2024
99db08a
downgrade react-native-svg for ios
rodrigoncalves Apr 9, 2024
950a62a
PR adjustments
rodrigoncalves Apr 9, 2024
3fbc202
fix imports
rodrigoncalves Apr 11, 2024
49ce1d8
Merge branch 'develop' into us-2150
rodrigoncalves Apr 18, 2024
ebab288
fix swap icon
rodrigoncalves Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions assets/svgs/rif_logo.svg

This file was deleted.

8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ PODS:
- React-Core
- RNScreenshotPrevent (1.1.9):
- React
- RNSVG (14.1.0):
- RNSVG (13.4.0):
- React-Core
- RNVectorIcons (10.0.3):
- glog
Expand Down Expand Up @@ -1533,14 +1533,14 @@ SPEC CHECKSUMS:
RNReanimated: beb07f7f900543928467da8107c175d1e57a1049
RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2
RNScreenshotPrevent: cdfbe213203774c7486c6a2f198af8a4ebe10c47
RNSVG: ba3e7232f45e34b7b47e74472386cf4e1a676d0a
RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2
RNVectorIcons: 210f910e834e3485af40693ad4615c1ec22fc02b
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
TrustKit: 7858ea59d0e226b1457b2e9cc8b95d77ab21d471
VisionCamera: 7a5c87805b13adaaa557132b44879ed1e1e39786
Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: 3c66251e2fb883f7575e84b4cdde922bccb42c88

COCOAPODS: 1.14.3
COCOAPODS: 1.13.0
16 changes: 6 additions & 10 deletions ios/rifWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@
baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-rifWallet-rifWalletTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = 3YDAH8ZR7C;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
Expand Down Expand Up @@ -445,6 +446,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = 3YDAH8ZR7C;
INFOPLIST_FILE = rifWalletTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -470,6 +472,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3YDAH8ZR7C;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = rifWallet/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -497,6 +500,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3YDAH8ZR7C;
INFOPLIST_FILE = rifWallet/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -584,11 +588,7 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -656,11 +656,7 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"react-native-screens": "^3.29.0",
"react-native-screenshot-prevent": "^1.1.9",
"react-native-ssl-public-key-pinning": "^1.1.3",
"react-native-svg": "^14.1.0",
"react-native-svg": "13.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait! Why downgrading?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to downgrade this version to fix an issue with the appearance of the loading screen using a light background.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodrigoncalves can you comment or add screenshot/link to show what issue is being caused by downgrading this library?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"react-native-vector-icons": "^10.0.3",
"react-native-vision-camera": "^3.9.1",
"react-redux": "^8.0.5",
Expand Down
6 changes: 5 additions & 1 deletion src/components/BarButtonGroup/BarButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export const BarButtonGroupIcon = ({
onPress={onPress}
style={styles.iconContainerStyle}
accessibilityLabel={iconName}>
<IconComponent name={iconName} color="white" size={size} />
<IconComponent
name={iconName}
color={sharedColors.text.primary}
size={size}
/>
</AppTouchable>
)

Expand Down
3 changes: 2 additions & 1 deletion src/components/BasicRow/BasicRowWithContact.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BasicRow, BasicRowProps } from 'components/BasicRow/index'
import { Contact } from 'shared/types'
import { UserIcon } from 'components/icons/UserIcon'

export interface BasicRowWithContact extends BasicRowProps {
contact: Contact | undefined
Expand All @@ -13,7 +14,7 @@ export const BasicRowWithContact = ({
{...props}
avatar={{
name: contact?.name,
imageSource: contact ? undefined : require('src/images/user.png'),
icon: contact ? undefined : <UserIcon />,
}}
/>
)
4 changes: 2 additions & 2 deletions src/components/BasicRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const styles = StyleSheet.create({
container: castStyle.view({
marginTop: 10,
paddingVertical: 10,
backgroundColor: sharedColors.black,
backgroundColor: sharedColors.background.primary,
height: 'auto',
flexDirection: 'row',
}),
Expand Down Expand Up @@ -181,7 +181,7 @@ const styles = StyleSheet.create({
usdText: {
textAlign: 'right',
flex: 1,
color: sharedColors.labelLight,
color: sharedColors.text.label,
},
horizontalPadding: {
paddingRight: 1,
Expand Down
41 changes: 13 additions & 28 deletions src/components/GlobalErrorHandler/GlobalErrorHandlerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next'
import { sharedColors, sharedStyles } from 'src/shared/constants'
import { castStyle } from 'shared/utils'

import { colors } from '../../styles'
import ContentCopyMaterialIcon from '../icons/ContentCopyMaterialIcon'
import { Typography } from '../typography'
import { useGlobalErrorContext } from './GlobalErrorHandlerContext'
Expand All @@ -21,13 +20,14 @@ const GlobalErrorHandlerView: React.FC<GlobalErrorHandlerViewType> = ({
}) => {
const { handleReload, globalError } = useGlobalErrorContext()
const { t } = useTranslation()
const messageToShow: string = message || globalError || ''
const messageToShow = message || globalError || ''

const onCopyError = React.useCallback(() => {
Clipboard.setString(messageToShow)
}, [messageToShow])

return (
<View style={styles.container}>
<View style={sharedStyles.screen}>
<View style={styles.firstView}>
<Image
source={require('../../images/error-image.png')}
Expand All @@ -48,7 +48,7 @@ const GlobalErrorHandlerView: React.FC<GlobalErrorHandlerViewType> = ({
<View style={sharedStyles.flex}>
<Typography
type={'body2'}
color={sharedColors.white}
color={sharedColors.text.primary}
style={styles.errorDetailsText}>
{t('global_error_details_title')}
</Typography>
Expand All @@ -58,11 +58,14 @@ const GlobalErrorHandlerView: React.FC<GlobalErrorHandlerViewType> = ({
onPress={onCopyError}>
<Typography
type={'body3'}
color={sharedColors.white}
color={sharedColors.text.primary}
style={sharedStyles.flex}>
{t(messageToShow)}
</Typography>
<ContentCopyMaterialIcon color={sharedColors.white} size={25} />
<ContentCopyMaterialIcon
color={sharedColors.text.primary}
size={25}
/>
</TouchableOpacity>
</View>
)}
Expand All @@ -71,7 +74,8 @@ const GlobalErrorHandlerView: React.FC<GlobalErrorHandlerViewType> = ({
title={'reload'}
accessibilityLabel={'reload'}
onPress={handleReload}
style={styles.reload}
color={sharedColors.button.primaryBackground}
textColor={sharedColors.button.primaryText}
/>
</View>
</View>
Expand All @@ -80,14 +84,6 @@ const GlobalErrorHandlerView: React.FC<GlobalErrorHandlerViewType> = ({
}

const styles = StyleSheet.create({
container: castStyle.view({
width: '100%',
height: '100%',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: colors.darkPurple3,
paddingHorizontal: 40,
}),
firstView: castStyle.view({
flex: 0.8,
justifyContent: 'flex-end',
Expand All @@ -96,10 +92,6 @@ const styles = StyleSheet.create({
flex: 1,
width: '100%',
}),
imageView: castStyle.view({
flex: 3,
justifyContent: 'flex-end',
}),
textView: castStyle.view({
flex: 1,
justifyContent: 'center',
Expand All @@ -109,12 +101,12 @@ const styles = StyleSheet.create({
alignItems: 'center',
}),
text: castStyle.text({
color: sharedColors.white,
color: sharedColors.text.primary,
marginBottom: 10,
textAlign: 'center',
}),
errorDetailsTouch: castStyle.view({
backgroundColor: colors.darkPurple5,
backgroundColor: sharedColors.background.secondary,
height: 65,
borderRadius: 17,
padding: 10,
Expand All @@ -127,18 +119,11 @@ const styles = StyleSheet.create({
fontSize: 10,
marginBottom: 4,
}),
exclamation: castStyle.text({
fontSize: 32,
}),
imageStyle: castStyle.image({
width: '100%',
height: undefined,
aspectRatio: 1,
}),
reload: castStyle.view({
backgroundColor: colors.background.bustyBlue,
width: 150,
}),
})

export default GlobalErrorHandlerView
24 changes: 17 additions & 7 deletions src/components/InfoBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { useCallback, useState } from 'react'
import { Typography } from 'components/typography'
import { AppTouchable } from 'components/appTouchable'
import { Avatar } from 'components/avatar'
import { sharedColors } from 'shared/constants'
import { sharedColors, sharedStyles } from 'shared/constants'
import { castStyle } from 'shared/utils'
import { sharedStyles } from 'shared/styles'

interface InfoBoxProps {
avatar?: string
title?: string
description?: string
buttonText?: string
onPress?: () => void
textColor?: string
backgroundColor?: string
avatarBackgroundColor?: string
}
Expand All @@ -24,8 +24,9 @@ export const InfoBox = ({
description,
buttonText,
onPress,
backgroundColor = sharedColors.inputInactive,
avatarBackgroundColor = sharedColors.qrColor,
textColor = sharedColors.text.primary,
backgroundColor = sharedColors.primary,
avatarBackgroundColor = sharedColors.text.secondary,
}: InfoBoxProps) => {
const [shouldHide, setShouldHide] = useState(false)
const handleOnPress = useCallback(() => {
Expand All @@ -47,22 +48,31 @@ export const InfoBox = ({
sharedStyles.marginBottom,
{ backgroundColor: avatarBackgroundColor },
]}
letterColor={textColor}
name={avatar}
size={80}
/>
) : null}

{title ? (
<Typography style={sharedStyles.marginBottom} type={'h3'}>
<Typography
style={sharedStyles.marginBottom}
type={'h3'}
color={textColor}>
{title}
</Typography>
) : null}
{description ? (
<Typography type={'body3'}>{description}</Typography>
<Typography type={'body3'} color={textColor}>
{description}
</Typography>
) : null}
{buttonText ? (
<AppTouchable style={styles.button} onPress={handleOnPress} width={50}>
<Typography style={styles.buttonText} type={'body2'}>
<Typography
style={styles.buttonText}
type={'body2'}
color={textColor}>
{buttonText}
</Typography>
</AppTouchable>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Porfolio/PortfolioCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const styles = StyleSheet.create({
borderRadius: 10,
margin: 5,
padding: 12,
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
},
})

Expand All @@ -152,7 +152,7 @@ const selectedCardStyles = StyleSheet.create({
width: 20,
}),
primaryText: castStyle.text({
color: sharedColors.white,
color: sharedColors.text.primary,
fontSize: 22,
paddingTop: 3,
}),
Expand All @@ -179,11 +179,11 @@ const nonSelectedCardStyles = StyleSheet.create({
marginRight: 3,
}),
primaryText: castStyle.text({
color: sharedColors.white,
color: sharedColors.text.primary,
fontSize: 16,
}),
secondaryText: castStyle.text({
color: sharedColors.white,
color: sharedColors.text.primary,
fontSize: 16,
right: 0,
}),
Expand Down
2 changes: 1 addition & 1 deletion src/components/QRCodeScanner/useCheckCameraPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Alert, Linking } from 'react-native'
import { navigationContainerRef } from 'core/Core'

const checkCameraPermissions = async (t: (text: string) => string) => {
const cameraPermission = await Camera.getCameraPermissionStatus()
const cameraPermission = Camera.getCameraPermissionStatus()
if (cameraPermission === 'not-determined') {
const cameraStatus = await Camera.requestCameraPermission()
cameraStatus === 'denied' && navigationContainerRef.goBack()
Expand Down
Loading
Loading