Skip to content

Commit d9c8313

Browse files
committed
fix: update body text and tests for PredirectInstructions
1 parent 0ae9d46 commit d9c8313

File tree

6 files changed

+153
-119
lines changed

6 files changed

+153
-119
lines changed

src/const/language/es.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@
406406
"Unable to connect": "No se puede conectar",
407407
"Maintenance in progress": "Mantenimiento en curso",
408408
"Deposits verified. You're almost done setting things up. Continue to your institution.": "Depósitos verificados. Ya casi terminas de configurar todo. Continúa con tu institución.",
409-
"After logging in, share at least one account and %1profile information%2.": "Después de iniciar sesión, comparta al menos una cuenta y %1información de perfil%2.",
410-
"After logging in, share at least one account.": "Después de iniciar sesión, comparta al menos una cuenta.",
411409
"Connection not supported by %1": "Conexión no compatible con %1",
412410
"%1 currently limits how your data can be shared. We'll enable this connection once %1 opens access.": "%1 actualmente limita cómo se pueden compartir sus datos. Habilitaremos esta conexión una vez que %1 abra el acceso.",
413411
"UNAVAILABLE": "INDISPONIBLE",
@@ -422,6 +420,7 @@
422420
"Checking or savings account": "Cuenta corriente o de ahorros",
423421
"Profile information": "Información del perfil",
424422
"Account numbers": "Números de cuenta",
423+
"To complete your connection, please %1share%2 the following after signing in:": "Para completar su conexión, por favor, %1comparta%2 lo siguiente después de iniciar sesión:",
425424
"connect/disclosure/button\u0004Continue": "Continuar",
426425
"connect/disclosure/policy/text\u0004By clicking Continue, you agree to the ": "Al hacer clic en Continuar, tu aceptas la ",
427426
"connect/disclosure/policy/link\u0004MX Privacy Policy.": "Política de privacidad de Money Experience.",

src/const/language/es.po

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,17 +2038,6 @@ msgstr ""
20382038
"Depósitos verificados. Ya casi terminas de configurar todo. Continúa con tu "
20392039
"institución."
20402040

2041-
#: src/views/oauth/experiments/PredirectInstructions.tsx
2042-
msgid ""
2043-
"After logging in, share at least one account and %1profile information%2."
2044-
msgstr ""
2045-
"Después de iniciar sesión, comparta al menos una cuenta y %1información de "
2046-
"perfil%2."
2047-
2048-
#: src/views/oauth/experiments/PredirectInstructions.tsx
2049-
msgid "After logging in, share at least one account."
2050-
msgstr "Después de iniciar sesión, comparta al menos una cuenta."
2051-
20522041
#: src/utilities/institutionStatus.ts
20532042
msgid "Connection not supported by %1"
20542043
msgstr "Conexión no compatible con %1"
@@ -2108,3 +2097,10 @@ msgstr "Información del perfil"
21082097
#: src/views/oauth/experiments/PredirectInstructions.tsx
21092098
msgid "Account numbers"
21102099
msgstr "Números de cuenta"
2100+
2101+
#: src/views/oauth/experiments/PredirectInstructions.tsx
2102+
msgid ""
2103+
"To complete your connection, please %1share%2 the following after signing in:"
2104+
msgstr ""
2105+
"Para completar su conexión, por favor, %1comparta%2 lo siguiente después de "
2106+
"iniciar sesión:"

src/const/language/frCa.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@
407407
"Unable to connect": "Impossible de se connecter",
408408
"Maintenance in progress": "Entretien en cours",
409409
"Deposits verified. You're almost done setting things up. Continue to your institution.": "Dépôts vérifiés. Vous avez presque terminé la configuration. Rendez-vous dans votre établissement.",
410-
"After logging in, share at least one account and %1profile information%2.": "Après vous être connecté, partagez au moins un compte et %1informations de profil%2.",
411-
"After logging in, share at least one account.": "Après vous être connecté, partagez au moins un compte.",
412410
"Connection not supported by %1": "Connexion non prise en charge par %1",
413411
"%1 currently limits how your data can be shared. We'll enable this connection once %1 opens access.": "%1 limite actuellement la manière dont vos données peuvent être partagées. Nous activerons cette connexion une fois que %1 ouvrira l'accès.",
414412
"UNAVAILABLE": "INDISPONIBLE",
@@ -423,6 +421,7 @@
423421
"Checking or savings account": "Compte courant ou compte d'épargne",
424422
"Profile information": "Informations de profil",
425423
"Account numbers": "Numéros de compte",
424+
"To complete your connection, please %1share%2 the following after signing in:": "Pour finaliser votre connexion, veuillez %1partager%2 les informations suivantes après vous être connecté :",
426425
"connect/disclosure/policy/text\u0004By clicking Continue, you agree to the ": "En cliquant sur Continuer, vous acceptez la ",
427426
"connect/disclosure/policy/link\u0004MX Privacy Policy.": "Politique de confidentialité de MX.",
428427
"connect/disclosure/policy/link\u0004MX Privacy Policy": "Politique de confidentialité de MX.",

src/const/language/frCa.po

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,17 +2116,6 @@ msgstr ""
21162116
"Dépôts vérifiés. Vous avez presque terminé la configuration. Rendez-vous "
21172117
"dans votre établissement."
21182118

2119-
#: src/views/oauth/experiments/PredirectInstructions.tsx
2120-
msgid ""
2121-
"After logging in, share at least one account and %1profile information%2."
2122-
msgstr ""
2123-
"Après vous être connecté, partagez au moins un compte et %1informations de "
2124-
"profil%2."
2125-
2126-
#: src/views/oauth/experiments/PredirectInstructions.tsx
2127-
msgid "After logging in, share at least one account."
2128-
msgstr "Après vous être connecté, partagez au moins un compte."
2129-
21302119
#: src/utilities/institutionStatus.ts
21312120
msgid "Connection not supported by %1"
21322121
msgstr "Connexion non prise en charge par %1"
@@ -2186,3 +2175,10 @@ msgstr "Informations de profil"
21862175
#: src/views/oauth/experiments/PredirectInstructions.tsx
21872176
msgid "Account numbers"
21882177
msgstr "Numéros de compte"
2178+
2179+
#: src/views/oauth/experiments/PredirectInstructions.tsx
2180+
msgid ""
2181+
"To complete your connection, please %1share%2 the following after signing in:"
2182+
msgstr ""
2183+
"Pour finaliser votre connexion, veuillez %1partager%2 les informations "
2184+
"suivantes après vous être connecté :"

src/views/oauth/experiments/PredirectInstructions.tsx

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import React from 'react'
2-
import { useSelector } from 'react-redux'
32

43
import 'src/views/oauth/experiments/PredirectInstructions.css'
54

6-
import { selectConnectConfig } from 'src/redux/reducers/configSlice'
7-
8-
import { Icon, IconWeight, Text } from '@mxenabled/mxui'
5+
import { Text } from '@mxenabled/mxui'
96
import { __ } from 'src/utilities/Intl'
107
import { Divider, Paper } from '@mui/material'
118
import { ExampleCheckbox } from 'src/components/ExampleCheckbox'
@@ -23,15 +20,13 @@ function PredirectInstructions(
2320
institution: InstitutionResponseType
2421
},
2522
) {
26-
const config = useSelector(selectConnectConfig)
27-
const products = config?.data_request?.products || []
28-
const showProfileSelection =
29-
products.includes('account_verification') || products.includes('identity_verification')
30-
23+
// Filter out any invalid instruction values
3124
const configuredPredirectInstructions = Array.isArray(
3225
props.institution?.oauth_predirect_instructions,
3326
)
34-
? [...props.institution.oauth_predirect_instructions]
27+
? [...props.institution.oauth_predirect_instructions].filter((instruction) =>
28+
Object.values(OAUTH_PREDIRECT_INSTRUCTION).includes(instruction),
29+
)
3530
: []
3631

3732
// Give Wells Fargo a default predirect instruction if none are configured, because we experimented on
@@ -46,6 +41,14 @@ function PredirectInstructions(
4641
)
4742
}
4843

44+
// If the instructions are still empty, provide a default of account and transactions
45+
// for a better user experience.
46+
if (configuredPredirectInstructions.length === 0) {
47+
configuredPredirectInstructions.push(
48+
OAUTH_PREDIRECT_INSTRUCTION.ACCOUNT_AND_TRANSACTIONS_INSTRUCTION,
49+
)
50+
}
51+
4952
const institutionColor = getInstitutionBrandColor(props.institution, DEFAULT_HEADER_HEX_COLOR)
5053

5154
const uiElementTypes = {
@@ -66,13 +69,11 @@ function PredirectInstructions(
6669
})
6770

6871
/* Bold text is needed. The styles applied to this text prevent server-provided styles from ruining strong elements */
69-
const instructionText = showProfileSelection
70-
? __(
71-
'After logging in, share at least one account and %1profile information%2.',
72-
"<strong style='font-weight: bold;'>",
73-
'</strong>',
74-
)
75-
: __('After logging in, share at least one account.')
72+
const instructionText = __(
73+
'To complete your connection, please %1share%2 the following after signing in:',
74+
"<strong style='font-weight: bold;'>",
75+
'</strong>',
76+
)
7677

7778
return (
7879
<>
@@ -89,9 +90,6 @@ function PredirectInstructions(
8990
truncate={false}
9091
variant="body1"
9192
/>
92-
{showProfileSelection && (
93-
<Icon color="secondary" name="info" size={20} weight={IconWeight.Dark} />
94-
)}
9593
</div>
9694

9795
<div className="institution-panel-wrapper">

0 commit comments

Comments
 (0)