From 198297e96e9b991d772f311eae0a0782ffc7e1c3 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Fri, 12 Dec 2025 17:13:26 +0100 Subject: [PATCH] SELF-1554 : Fix Country Picker (#1492) * country picker is always euclid. * track when users press the info icon --- app/src/navigation/documents.ts | 16 ++++++---------- app/src/utils/devUtils.ts | 2 +- .../mobile-sdk-alpha/src/constants/analytics.ts | 1 + .../flows/onboarding/country-picker-screen.tsx | 4 ++-- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/src/navigation/documents.ts b/app/src/navigation/documents.ts index 518290605..0fb3ea6f2 100644 --- a/app/src/navigation/documents.ts +++ b/app/src/navigation/documents.ts @@ -77,16 +77,12 @@ const documentsScreens = { }, CountryPicker: { screen: CountryPickerScreen, - options: IS_EUCLID_ENABLED - ? ({ - header: HeadlessNavForEuclid, - statusBarHidden: CountryPickerScreen.statusBar?.hidden, - statusBarStyle: CountryPickerScreen.statusBar?.style, - headerShown: true, - } as NativeStackNavigationOptions) - : { - headerShown: false, - }, + options: { + header: HeadlessNavForEuclid, + statusBarHidden: CountryPickerScreen.statusBar?.hidden, + statusBarStyle: CountryPickerScreen.statusBar?.style, + headerShown: true, + } as NativeStackNavigationOptions, }, IDPicker: { screen: IDPickerScreen, diff --git a/app/src/utils/devUtils.ts b/app/src/utils/devUtils.ts index 863720cf9..1bd470b67 100644 --- a/app/src/utils/devUtils.ts +++ b/app/src/utils/devUtils.ts @@ -8,4 +8,4 @@ * Use this constant instead of checking __DEV__ directly throughout the codebase. */ export const IS_DEV_MODE = typeof __DEV__ !== 'undefined' && __DEV__; -export const IS_EUCLID_ENABLED = IS_DEV_MODE; // just in case we forgot to turn it off before pushing to prod. +export const IS_EUCLID_ENABLED = false; //IS_DEV_MODE; // just in case we forgot to turn it off before pushing to prod. diff --git a/packages/mobile-sdk-alpha/src/constants/analytics.ts b/packages/mobile-sdk-alpha/src/constants/analytics.ts index 8b4aab40a..bb67f5516 100644 --- a/packages/mobile-sdk-alpha/src/constants/analytics.ts +++ b/packages/mobile-sdk-alpha/src/constants/analytics.ts @@ -79,6 +79,7 @@ export const BackupEvents = { }; export const DocumentEvents = { + COUNTRY_HELP_TAPPED: 'Document: Country Help Tapped', ADD_NEW_AADHAAR_SELECTED: 'Document: Add Aadhaar', ADD_NEW_MOCK_SELECTED: 'Document: Add New Document via Mock', ADD_NEW_SCAN_SELECTED: 'Document: Add New Document via Scan', diff --git a/packages/mobile-sdk-alpha/src/flows/onboarding/country-picker-screen.tsx b/packages/mobile-sdk-alpha/src/flows/onboarding/country-picker-screen.tsx index adc097e8e..c4c041ca3 100644 --- a/packages/mobile-sdk-alpha/src/flows/onboarding/country-picker-screen.tsx +++ b/packages/mobile-sdk-alpha/src/flows/onboarding/country-picker-screen.tsx @@ -8,6 +8,7 @@ import { commonNames } from '@selfxyz/common/constants/countries'; import { CountryPickerScreen as CountryPickerUI, type SafeArea } from '@selfxyz/euclid'; import { RoundFlag } from '../../components'; +import { DocumentEvents } from '../../constants/analytics'; import { useSelfClient } from '../../context'; import { useCountries } from '../../documents/useCountries'; import { buttonTap } from '../../haptic'; @@ -59,7 +60,6 @@ const CountryPickerScreen: React.FC & { statusBar: typeof CountryPicke const onSearchChange = useCallback((value: string) => { setSearchValue(value); }, []); - return ( & { statusBar: typeof CountryPicke getCountryName={getCountryName} searchValue={searchValue} onClose={selfClient.goBack} - onInfoPress={() => console.log('Info pressed TODO: Implement')} + onInfoPress={() => selfClient.trackEvent(DocumentEvents.COUNTRY_HELP_TAPPED)} onSearchChange={onSearchChange} /> );