Skip to content

Commit f06d593

Browse files
authored
[Wallet][ReDesign] Onboarding sucess screen (#4361)
### Description This PR implements the [onboarding success screen redesign](https://www.figma.com/file/zt7aTQ5wuXycIwxq5oAmF9/Wallet--Refresh?node-id=5592%3A335). This also adds a subtle shadow on iOS to the Valora logo like in the designs. See assets diff: valora-inc/valora-app-branding@8a74a2c...4f414a0 ### Other changes - Fix fast refresh triggered constantly while building android (when both iOS and Android dev apps are running) ### Tested Yes. ### Related issues - #3645 ### Backwards compatibility Yes
1 parent b4632d2 commit f06d593

File tree

8 files changed

+63
-10
lines changed

8 files changed

+63
-10
lines changed

.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__comment": "On macOS the first 8 items listed in ignore_dirs can be accelerated at the OS level. See https://facebook.github.io/watchman/docs/config.html#ignore_dirs",
33
"ignore_dirs": [
4-
"packages/mobile/android/build",
4+
"packages/mobile/android/app/build",
55
"packages/mobile/ios/build",
66
"packages/mobile/e2e/artifacts"
77
]

packages/mobile/branding/celo/src/icons/Logo.v2.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Svg, { Path } from 'svgs'
55
export enum LogoTypes {
66
COLOR = 'COLOR',
77
DARK = 'DARK',
8+
LIGHT = 'LIGHT',
89
}
910

1011
interface Props {
@@ -13,19 +14,31 @@ interface Props {
1314
}
1415

1516
export default function Logo({ height = 25, type = LogoTypes.COLOR }: Props) {
17+
let mainColor
18+
switch (type) {
19+
case LogoTypes.DARK:
20+
mainColor = colors.dark
21+
break
22+
case LogoTypes.LIGHT:
23+
mainColor = colors.light
24+
break
25+
default:
26+
break
27+
}
28+
1629
return (
1730
<Svg width={height} height={height} viewBox="0 0 25 25" fill="none">
1831
<Path
1932
d="M9.86842 22.3684C13.8653 22.3684 17.1053 19.1284 17.1053 15.1316C17.1053 11.1348 13.8653 7.89476 9.86842 7.89476C5.87158 7.89476 2.63158 11.1348 2.63158 15.1316C2.63158 19.1284 5.87158 22.3684 9.86842 22.3684ZM9.86842 25C4.41842 25 0 20.5816 0 15.1316C0 9.6816 4.41842 5.26318 9.86842 5.26318C15.3184 5.26318 19.7368 9.6816 19.7368 15.1316C19.7368 20.5816 15.3184 25 9.86842 25Z"
20-
fill={type === LogoTypes.DARK ? colors.dark : colors.goldBrand}
33+
fill={type === LogoTypes.COLOR ? colors.goldBrand : mainColor}
2134
/>
2235
<Path
2336
d="M15.1316 17.1053C19.1284 17.1053 22.3684 13.8653 22.3684 9.86842C22.3684 5.87158 19.1284 2.63158 15.1316 2.63158C11.1348 2.63158 7.89476 5.87158 7.89476 9.86842C7.89476 13.8653 11.1348 17.1053 15.1316 17.1053ZM15.1316 19.7368C9.6816 19.7368 5.26318 15.3184 5.26318 9.86842C5.26318 4.41842 9.6816 0 15.1316 0C20.5816 0 25 4.41842 25 9.86842C25 15.3184 20.5816 19.7368 15.1316 19.7368Z"
24-
fill={type === LogoTypes.DARK ? colors.dark : colors.greenBrand}
37+
fill={type === LogoTypes.COLOR ? colors.greenBrand : mainColor}
2538
/>
2639
<Path
2740
d="M15.4577 19.7369C16.1419 18.9077 16.6324 17.9361 16.8932 16.8932C17.9361 16.6324 18.9077 16.1421 19.7369 15.4579C19.699 16.6658 19.439 17.8563 18.9695 18.9698C17.8561 19.439 16.6656 19.6992 15.4577 19.7369ZM8.10687 8.10687C7.06397 8.36766 6.09239 8.85792 5.26318 9.54213C5.30108 8.33424 5.56108 7.14371 6.03055 6.03029C7.14397 5.56108 8.3345 5.30082 9.54239 5.26318C8.85818 6.09239 8.36766 7.06397 8.10687 8.10687Z"
28-
fill={type === LogoTypes.DARK ? colors.dark : '#5EA33B'}
41+
fill={type === LogoTypes.COLOR ? '#5EA33B' : mainColor}
2942
/>
3043
</Svg>
3144
)
Loading

packages/mobile/locales/en-US/onboarding.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,8 @@
9595
"description": "This account doesn’t have any funds. Would you still like to use it?",
9696
"useAccount": "Use Account",
9797
"title": "Balance <0></0>"
98+
},
99+
"success": {
100+
"message": "You're all set!"
98101
}
99102
}

packages/mobile/locales/es-419/onboarding.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,8 @@
9595
"description": "Esta cuenta no tiene fondos. ¿Todavía te gustaría usarlo?",
9696
"useAccount": "Usar cuenta",
9797
"title": "Saldo <0></0>"
98+
},
99+
"success": {
100+
"message": "Estás listo!"
98101
}
99102
}

packages/mobile/scripts/sync_branding.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo $mobile_root
2121
cd "$mobile_root"
2222

2323
# Please update the sha when valora branding updates are needed
24-
valora_branding_sha=8a74a2c
24+
valora_branding_sha=4f414a0
2525

2626
if [[ "$branding" == "valora" ]]; then
2727
# prevents git from asking credentials

packages/mobile/src/images/Images.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const accountKey2 = require('src/images/account-key-2.png')
33
export const accountKey3 = require('src/images/account-key-3.png')
44
export const accountKey4 = require('src/images/account-key-4.png')
55
export const backupKey = require('src/images/backup-key.png')
6+
export const background = require('src/images/background.jpg')
67
export const celoEducation1 = require('src/images/celo-education-1.png')
78
export const celoEducation2 = require('src/images/celo-education-2.png')
89
export const celoEducation3 = require('src/images/celo-education-3.png')

packages/mobile/src/onboarding/success/OnboardingSuccessScreen.tsx

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
import colors from '@celo/react-components/styles/colors'
2-
import React from 'react'
3-
import { StyleSheet, View } from 'react-native'
4-
import DancingRings from 'src/icons/DancingRings'
1+
import colors from '@celo/react-components/styles/colors.v2'
2+
import fontStyles from '@celo/react-components/styles/fonts.v2'
3+
import { Spacing } from '@celo/react-components/styles/styles.v2'
4+
import React, { useEffect } from 'react'
5+
import { useTranslation } from 'react-i18next'
6+
import { Image, StyleSheet, Text, View } from 'react-native'
7+
import { Namespaces } from 'src/i18n'
8+
import Logo, { LogoTypes } from 'src/icons/Logo.v2'
9+
import { background } from 'src/images/Images'
510
import { nuxNavigationOptionsNoBackButton } from 'src/navigator/Headers.v2'
611
import { navigateHome } from 'src/navigator/NavigationService'
712

813
function OnboardingSuccessScreen() {
14+
useEffect(() => {
15+
const timeout = setTimeout(() => navigateHome(), 3000)
16+
17+
return () => clearTimeout(timeout)
18+
}, [])
19+
20+
const { t } = useTranslation(Namespaces.onboarding)
21+
922
return (
1023
<View style={styles.container}>
11-
<DancingRings onAnimationFinish={navigateHome} />
24+
<Image source={background} style={styles.backgroundImage} />
25+
<Logo type={LogoTypes.LIGHT} height={70} />
26+
<Text style={styles.text}>{t('success.message')}</Text>
1227
</View>
1328
)
1429
}
@@ -22,6 +37,24 @@ const styles = StyleSheet.create({
2237
alignItems: 'center',
2338
justifyContent: 'center',
2439
},
40+
backgroundImage: {
41+
...StyleSheet.absoluteFillObject,
42+
resizeMode: 'stretch',
43+
width: undefined,
44+
height: undefined,
45+
},
46+
text: {
47+
...fontStyles.h2,
48+
fontSize: 30,
49+
lineHeight: 36,
50+
color: colors.light,
51+
marginTop: Spacing.Regular16,
52+
marginBottom: 30,
53+
shadowOffset: { width: 0, height: 1 },
54+
shadowRadius: 2,
55+
shadowOpacity: 1,
56+
shadowColor: 'rgba(46, 51, 56, 0.15)',
57+
},
2558
})
2659

2760
export default OnboardingSuccessScreen

0 commit comments

Comments
 (0)