From 8f4e247fca310cf7b9548d65ea8ffd9a62b3b898 Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 22 Jan 2024 11:12:18 -0800 Subject: [PATCH 01/81] Remove unnecessary directory --- src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx | 2 +- src/pages/settings/{AboutPage => }/AboutPage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/pages/settings/{AboutPage => }/AboutPage.js (99%) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index b0f33af0ce2e..89365d1e0224 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -203,7 +203,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../pages/settings/Preferences/ThemePage').default as React.ComponentType, [SCREENS.SETTINGS.CLOSE]: () => require('../../../pages/settings/Security/CloseAccountPage').default as React.ComponentType, [SCREENS.SETTINGS.SECURITY]: () => require('../../../pages/settings/Security/SecuritySettingsPage').default as React.ComponentType, - [SCREENS.SETTINGS.ABOUT]: () => require('../../../pages/settings/AboutPage/AboutPage').default as React.ComponentType, + [SCREENS.SETTINGS.ABOUT]: () => require('../../../pages/settings/AboutPage').default as React.ComponentType, [SCREENS.SETTINGS.APP_DOWNLOAD_LINKS]: () => require('../../../pages/settings/AppDownloadLinks').default as React.ComponentType, [SCREENS.SETTINGS.LOUNGE_ACCESS]: () => require('../../../pages/settings/Profile/LoungeAccessPage').default as React.ComponentType, [SCREENS.SETTINGS.WALLET.ROOT]: () => require('../../../pages/settings/Wallet/WalletPage').default as React.ComponentType, diff --git a/src/pages/settings/AboutPage/AboutPage.js b/src/pages/settings/AboutPage.js similarity index 99% rename from src/pages/settings/AboutPage/AboutPage.js rename to src/pages/settings/AboutPage.js index a460c95cdfe6..1ec6c119a5a6 100644 --- a/src/pages/settings/AboutPage/AboutPage.js +++ b/src/pages/settings/AboutPage.js @@ -22,7 +22,7 @@ import * as Report from '@userActions/Report'; import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import SCREENS from '@src/SCREENS'; -import pkg from '../../../../package.json'; +import pkg from '../../../package.json'; const propTypes = { ...withLocalizePropTypes, From d9d97caa2e3ceff968449684c43938eafe7fafec Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 22 Jan 2024 11:55:15 -0800 Subject: [PATCH 02/81] Set up pages and navigation --- src/ROUTES.ts | 13 ++++++++ src/SCREENS.ts | 6 ++++ .../AppNavigator/ModalStackNavigators.tsx | 3 ++ src/libs/Navigation/linkingConfig.ts | 9 ++++++ .../ExitSurvey/ExitSurveyConfirmPage.tsx | 30 +++++++++++++++++++ .../ExitSurvey/ExitSurveyReasonPage.tsx | 27 +++++++++++++++++ .../ExitSurvey/ExitSurveyResponsePage.tsx | 27 +++++++++++++++++ src/pages/settings/InitialSettingsPage.js | 5 +--- 8 files changed, 116 insertions(+), 4 deletions(-) create mode 100644 src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx create mode 100644 src/pages/settings/ExitSurvey/ExitSurveyReasonPage.tsx create mode 100644 src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 37003a09a0cd..b59348e5edf9 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -144,6 +144,19 @@ const ROUTES = { SETTINGS_STATUS_CLEAR_AFTER_DATE: 'settings/profile/status/clear-after/date', SETTINGS_STATUS_CLEAR_AFTER_TIME: 'settings/profile/status/clear-after/time', + SETTINGS_EXIT_SURVEY_REASON: { + route: 'settings/exit-survey/reason', + getRoute: (backTo?: string) => getUrlWithBackToParam('settings/exit-survey/reason', backTo), + }, + SETTINGS_EXIT_SURVEY_RESPONSE: { + route: 'settings/exit-survey/response', + getRoute: (backTo?: string) => getUrlWithBackToParam('settings/exit-survey/response', backTo), + }, + SETTINGS_EXIT_SURVEY_CONFIRM: { + route: 'settings/exit-survey/confirm', + getRoute: (backTo?: string) => getUrlWithBackToParam('settings/exit-survey/confirm', backTo), + }, + KEYBOARD_SHORTCUTS: 'keyboard-shortcuts', NEW: 'new', diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 703cb309d641..2b630aab62c8 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -77,6 +77,12 @@ const SCREENS = { REPORT_VIRTUAL_CARD_FRAUD: 'Settings_Wallet_ReportVirtualCardFraud', CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: 'Settings_Wallet_Cards_Digital_Details_Update_Address', }, + + EXIT_SURVEY: { + REASON: 'Settings_ExitSurvey_Reason', + RESPONSE: 'Settings_ExitSurvey_Response', + CONFIRM: 'Settings_ExitSurvey_Confirm', + }, }, SAVE_THE_WORLD: { ROOT: 'SaveTheWorld_Root', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index 89365d1e0224..286ccc07a615 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -241,6 +241,9 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage').default as React.ComponentType, [SCREENS.SETTINGS.REPORT_CARD_LOST_OR_DAMAGED]: () => require('../../../pages/settings/Wallet/ReportCardLostPage').default as React.ComponentType, [SCREENS.KEYBOARD_SHORTCUTS]: () => require('../../../pages/KeyboardShortcutsPage').default as React.ComponentType, + [SCREENS.SETTINGS.EXIT_SURVEY.REASON]: () => require('../../../pages/settings/ExitSurvey/ExitSurveyReasonPage').default as React.ComponentType, + [SCREENS.SETTINGS.EXIT_SURVEY.RESPONSE]: () => require('../../../pages/settings/ExitSurvey/ExitSurveyResponsePage').default as React.ComponentType, + [SCREENS.SETTINGS.EXIT_SURVEY.CONFIRM]: () => require('../../../pages/settings/ExitSurvey/ExitSurveyConfirmPage').default as React.ComponentType, }); const EnablePaymentsStackNavigator = createModalStackNavigator({ diff --git a/src/libs/Navigation/linkingConfig.ts b/src/libs/Navigation/linkingConfig.ts index 1a495e92eb80..28955156da05 100644 --- a/src/libs/Navigation/linkingConfig.ts +++ b/src/libs/Navigation/linkingConfig.ts @@ -274,6 +274,15 @@ const linkingConfig: LinkingOptions = { [SCREENS.KEYBOARD_SHORTCUTS]: { path: ROUTES.KEYBOARD_SHORTCUTS, }, + [SCREENS.SETTINGS.EXIT_SURVEY.REASON]: { + path: ROUTES.SETTINGS_EXIT_SURVEY_REASON.route, + }, + [SCREENS.SETTINGS.EXIT_SURVEY.RESPONSE]: { + path: ROUTES.SETTINGS_EXIT_SURVEY_RESPONSE.route, + }, + [SCREENS.SETTINGS.EXIT_SURVEY.CONFIRM]: { + path: ROUTES.SETTINGS_EXIT_SURVEY_CONFIRM.route, + }, }, }, [SCREENS.RIGHT_MODAL.PRIVATE_NOTES]: { diff --git a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx new file mode 100644 index 000000000000..ff4e39113581 --- /dev/null +++ b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import Button from '@components/Button'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import Navigation from '@navigation/Navigation'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; + +function ExitSurveyReasonPage() { + return ( + + Navigation.goBack()} + /> + Confirm page +