From cd503c93102de379273f9f87610ce6837c50c8b5 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 3 Jan 2025 12:27:20 -0800 Subject: [PATCH] Conclude 'uspSigninCta' experiment In favor of the 'alreadyHaveAccount' variant --- CHANGELOG.md | 1 + src/components/scenes/GettingStartedScene.tsx | 45 +++++++------------ src/experimentConfig.ts | 12 ++--- 3 files changed, 20 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8639809d4ea..4dc2abf9f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - fixed: Only send successful import items to completion scene - fixed: WalletConnect `eth_sendRawTransaction` event handling - removed: Removed patch for usb and node-hid +- removed: 'uspSigninCta' experiment in favor of the 'alreadyHaveAccount' variant ## 4.19.1 (2024-12-19) diff --git a/src/components/scenes/GettingStartedScene.tsx b/src/components/scenes/GettingStartedScene.tsx index 6374e33527f..d792534fb26 100644 --- a/src/components/scenes/GettingStartedScene.tsx +++ b/src/components/scenes/GettingStartedScene.tsx @@ -20,7 +20,7 @@ import uspImage1 from '../../assets/images/gettingStarted/usp1.png' import uspImage2 from '../../assets/images/gettingStarted/usp2.png' import uspImage3 from '../../assets/images/gettingStarted/usp3.png' import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' -import { ExperimentConfig, UspSigninCtaType } from '../../experimentConfig' +import { ExperimentConfig } from '../../experimentConfig' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' @@ -156,36 +156,24 @@ export const GettingStartedScene = (props: Props) => { } ) - const footerButtons = - experimentConfig.uspSigninCta === 'alreadyHaveAccount' ? ( - <> - - - - {/* eslint-disable-next-line react-native/no-raw-text */} - {`${lstrings.getting_started_already_have_an_account} `} - {lstrings.getting_started_sign_in} - - - - ) : ( + const footerButtons = ( + <> - ) + + + {/* eslint-disable-next-line react-native/no-raw-text */} + {`${lstrings.getting_started_already_have_an_account} `} + {lstrings.getting_started_sign_in} + + + + ) return ( @@ -259,7 +247,7 @@ export const GettingStartedScene = (props: Props) => { ))} - + {sections.map((section, index) => { return (
@@ -478,12 +466,11 @@ const SectionCoverAnimated = styled(Animated.View)<{ const Sections = styled(Animated.View)<{ swipeOffset: SharedValue - uspSigninCta: UspSigninCtaType }>(theme => props => { - const { swipeOffset, uspSigninCta } = props + const { swipeOffset } = props return [ { - paddingBottom: uspSigninCta === 'alreadyHaveAccount' ? theme.rem(1) : theme.rem(-0.5) + paddingBottom: theme.rem(1) }, useAnimatedStyle(() => { const flexGrow = interpolate(swipeOffset.value, [0, 1], [0, 1.5]) diff --git a/src/experimentConfig.ts b/src/experimentConfig.ts index 5ee6b73fe8e..adc226a3f23 100644 --- a/src/experimentConfig.ts +++ b/src/experimentConfig.ts @@ -5,27 +5,22 @@ import { LOCAL_EXPERIMENT_CONFIG } from './constants/constantSettings' import { ENV } from './env' import { isMaestro } from './util/maestro' -export type UspSigninCtaType = 'alreadyHaveAccount' | 'signIn' - // Persistent experiment config for A/B testing. Values initialized in this // config persist throughout the liftetime of the app install. export interface ExperimentConfig { signupCaptcha: 'withCaptcha' | 'withoutCaptcha' - uspSigninCta: UspSigninCtaType } // Defined default "unchanged" values before experimentation. export const DEFAULT_EXPERIMENT_CONFIG: ExperimentConfig = { - signupCaptcha: 'withoutCaptcha', - uspSigninCta: 'alreadyHaveAccount' + signupCaptcha: 'withoutCaptcha' } const experimentConfigDisklet = makeReactNativeDisklet() // The probability of an experiment config feature being set for a given key const experimentDistribution = { - signupCaptcha: [50, 50], - uspSigninCta: [50, 50] + signupCaptcha: [50, 50] } /** @@ -65,8 +60,7 @@ const generateExperimentConfigVal = (key: keyof typeof experimentDistribution } const asExperimentConfig: Cleaner = asObject({ - signupCaptcha: asMaybe(asValue('withoutCaptcha', 'withCaptcha'), generateExperimentConfigVal('signupCaptcha', ['withoutCaptcha', 'withCaptcha'])), - uspSigninCta: asMaybe(asValue('alreadyHaveAccount', 'signIn'), generateExperimentConfigVal('uspSigninCta', ['alreadyHaveAccount', 'signIn'])) + signupCaptcha: asMaybe(asValue('withoutCaptcha', 'withCaptcha'), generateExperimentConfigVal('signupCaptcha', ['withoutCaptcha', 'withCaptcha'])) }) /**