From 0a3deace63e6f4e8032d62e0f6ce1811b7906050 Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 16 Aug 2023 14:27:00 +0100 Subject: [PATCH] fix(analytics): Improve text styling and add translations on ToS Screens (#2616) --- .../src/components/BlueCheckbox/BlueCheckbox.tsx | 14 +++++++++++--- .../src/components/YoroiLogo/YoroiLogo.tsx | 3 ++- .../Initialization/InitialScreen/InitialScreen.tsx | 10 +++++++--- .../TermsOfServiceChangedScreen.tsx | 13 ++++++++++--- .../src/features/Initialization/common/strings.tsx | 4 ++-- apps/wallet-mobile/src/i18n/locales/en-US.json | 4 +++- apps/wallet-mobile/src/legacy/config.ts | 2 +- .../src/components/YoroiLogo/YoroiLogo.json | 8 ++++---- .../features/Initialization/common/strings.json | 4 ++-- 9 files changed, 42 insertions(+), 20 deletions(-) diff --git a/apps/wallet-mobile/src/components/BlueCheckbox/BlueCheckbox.tsx b/apps/wallet-mobile/src/components/BlueCheckbox/BlueCheckbox.tsx index bf0090cb90..07d375f512 100644 --- a/apps/wallet-mobile/src/components/BlueCheckbox/BlueCheckbox.tsx +++ b/apps/wallet-mobile/src/components/BlueCheckbox/BlueCheckbox.tsx @@ -10,16 +10,17 @@ export type BlueCheckboxProps = { onPress?: () => void children?: ReactNode style?: StyleProp + spacing?: number } -export const BlueCheckbox = ({checked, onPress, children, style}: BlueCheckboxProps) => { +export const BlueCheckbox = ({checked, onPress, children, style, spacing = 15}: BlueCheckboxProps) => { return ( {checked ? : } - + - {children} + {children} ) } @@ -73,4 +74,11 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', }, + textRow: { + flexDirection: 'row', + flexWrap: 'wrap', + flex: 1, + justifyContent: 'flex-start', + alignItems: 'flex-start', + }, }) diff --git a/apps/wallet-mobile/src/components/YoroiLogo/YoroiLogo.tsx b/apps/wallet-mobile/src/components/YoroiLogo/YoroiLogo.tsx index c81a3cd51e..c9a6b53720 100644 --- a/apps/wallet-mobile/src/components/YoroiLogo/YoroiLogo.tsx +++ b/apps/wallet-mobile/src/components/YoroiLogo/YoroiLogo.tsx @@ -61,13 +61,14 @@ const styles = StyleSheet.create({ color: COLORS.SHELLEY_BLUE, fontSize: 30, fontWeight: '500', - fontFamily: 'Rubik', + fontFamily: 'Rubik-Bold', }, yoroiLogoText: { fontSize: 14, fontWeight: '400', fontFamily: 'Rubik', lineHeight: 22, + color: '#000000', }, }) diff --git a/apps/wallet-mobile/src/features/Initialization/InitialScreen/InitialScreen.tsx b/apps/wallet-mobile/src/features/Initialization/InitialScreen/InitialScreen.tsx index 999c5629cf..56f3311ebe 100644 --- a/apps/wallet-mobile/src/features/Initialization/InitialScreen/InitialScreen.tsx +++ b/apps/wallet-mobile/src/features/Initialization/InitialScreen/InitialScreen.tsx @@ -55,7 +55,7 @@ export const InitialScreen = () => { - + {`${strings.tosIAgreeWith} `} @@ -63,7 +63,11 @@ export const InitialScreen = () => { {strings.tosAgreement} - {` ${strings.tosAnd} `} + {` `} + + {strings.tosAnd} + + {` `} {strings.privacyPolicy} @@ -103,7 +107,7 @@ const styles = StyleSheet.create({ title: { fontSize: 20, fontWeight: '500', - fontFamily: 'Rubik', + fontFamily: 'Rubik-Bold', lineHeight: 30, textAlign: 'center', color: '#242838', diff --git a/apps/wallet-mobile/src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.tsx b/apps/wallet-mobile/src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.tsx index 47a532bab6..15216e5758 100644 --- a/apps/wallet-mobile/src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.tsx +++ b/apps/wallet-mobile/src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.tsx @@ -44,7 +44,7 @@ export const TermsOfServiceChangedScreen = () => { - + {`${strings.tosIAgreeWith} `} @@ -52,7 +52,11 @@ export const TermsOfServiceChangedScreen = () => { {strings.tosAgreement} - {` ${strings.tosAnd} `} + {` `} + + {strings.tosAnd} + + {` `} {strings.privacyPolicy} @@ -84,9 +88,10 @@ const styles = StyleSheet.create({ title: { fontSize: 20, fontWeight: '500', - fontFamily: 'Rubik', + fontFamily: 'Rubik-Bold', lineHeight: 30, textAlign: 'center', + color: '#242838', }, description: { fontSize: 16, @@ -94,11 +99,13 @@ const styles = StyleSheet.create({ fontFamily: 'Rubik', lineHeight: 24, textAlign: 'center', + color: '#383E54', }, checkboxText: { fontFamily: 'Rubik', fontSize: 16, lineHeight: 18, + color: '#000000', }, checkboxLink: { color: COLORS.DARK_BLUE, diff --git a/apps/wallet-mobile/src/features/Initialization/common/strings.tsx b/apps/wallet-mobile/src/features/Initialization/common/strings.tsx index 37117539d0..cfb70e6e76 100644 --- a/apps/wallet-mobile/src/features/Initialization/common/strings.tsx +++ b/apps/wallet-mobile/src/features/Initialization/common/strings.tsx @@ -32,8 +32,8 @@ const messages = defineMessages({ defaultMessage: '!!!and', }, privacyPolicy: { - id: 'analytics.privacyPolicy', - defaultMessage: '!!!Privacy Policy', + id: 'analytics.privacyNotice', + defaultMessage: '!!!Privacy Notice', }, tosAgreement: { id: 'analytics.tosAgreement', diff --git a/apps/wallet-mobile/src/i18n/locales/en-US.json b/apps/wallet-mobile/src/i18n/locales/en-US.json index 30ca75844c..b8e61757e1 100644 --- a/apps/wallet-mobile/src/i18n/locales/en-US.json +++ b/apps/wallet-mobile/src/i18n/locales/en-US.json @@ -669,5 +669,7 @@ "termsOfService.tosAgreement": "Terms Of Service Agreement", "toggleAnalyticsSettings.analyticsTitle": "User Insights", "termsOfService.privacyPolicyTitle": "Privacy Policy", - "analytics.privacyPolicy": "Privacy Policy" + "analytics.privacyPolicy": "Privacy Policy", + "analytics.privacyNotice": "Privacy Notice", + "analytics.tosAnd": "and" } diff --git a/apps/wallet-mobile/src/legacy/config.ts b/apps/wallet-mobile/src/legacy/config.ts index 3bdf17b8f8..9e384c3813 100644 --- a/apps/wallet-mobile/src/legacy/config.ts +++ b/apps/wallet-mobile/src/legacy/config.ts @@ -13,7 +13,7 @@ const _LOG_LEVEL = __DEV__ ? LogLevel.Debug : LogLevel.Warn const FORCE_CRASH_REPORTS = isNightly() -const AGREEMENT_DATE = 2 +const AGREEMENT_DATE = 3 export const CONFIG = { SENTRY_DSN, diff --git a/apps/wallet-mobile/translations/messages/src/components/YoroiLogo/YoroiLogo.json b/apps/wallet-mobile/translations/messages/src/components/YoroiLogo/YoroiLogo.json index f24cd1b29d..7e542ceb74 100644 --- a/apps/wallet-mobile/translations/messages/src/components/YoroiLogo/YoroiLogo.json +++ b/apps/wallet-mobile/translations/messages/src/components/YoroiLogo/YoroiLogo.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Light wallet for Cardano assets", "file": "src/components/YoroiLogo/YoroiLogo.tsx", "start": { - "line": 83, + "line": 84, "column": 8, - "index": 2116 + "index": 2143 }, "end": { - "line": 86, + "line": 87, "column": 3, - "index": 2211 + "index": 2238 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/features/Initialization/common/strings.json b/apps/wallet-mobile/translations/messages/src/features/Initialization/common/strings.json index 99770a2afb..98eea5acc3 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Initialization/common/strings.json +++ b/apps/wallet-mobile/translations/messages/src/features/Initialization/common/strings.json @@ -45,8 +45,8 @@ } }, { - "id": "analytics.privacyPolicy", - "defaultMessage": "!!!Privacy Policy", + "id": "analytics.privacyNotice", + "defaultMessage": "!!!Privacy Notice", "file": "src/features/Initialization/common/strings.tsx", "start": { "line": 34,