From d296c84255fe8a96ff0f43e8b22aff1d95608f08 Mon Sep 17 00:00:00 2001 From: Maciej Dobosz Date: Thu, 21 Mar 2024 18:12:58 +0100 Subject: [PATCH 01/19] Turn on Onboarding Flow Stage 1 --- src/ROUTES.ts | 4 - src/SCREENS.ts | 7 - src/languages/en.ts | 22 --- src/languages/es.ts | 22 --- .../AppNavigator/ModalStackNavigators.tsx | 8 - .../Navigators/RightModalNavigator.tsx | 4 - .../BottomTabBar.tsx | 12 +- src/libs/Navigation/linkingConfig/config.ts | 7 - src/libs/Navigation/types.ts | 8 - src/libs/actions/Welcome.ts | 6 +- .../ExpensifyClassicPage.tsx | 75 --------- .../ManageTeamsExpensesPage.tsx | 122 -------------- .../PurposeForUsingExpensifyPage.tsx | 155 ------------------ src/styles/theme/themes/dark.ts | 8 - src/styles/theme/themes/light.ts | 8 - 15 files changed, 2 insertions(+), 466 deletions(-) delete mode 100644 src/pages/OnboardEngagement/ExpensifyClassicPage.tsx delete mode 100644 src/pages/OnboardEngagement/ManageTeamsExpensesPage.tsx delete mode 100644 src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx diff --git a/src/ROUTES.ts b/src/ROUTES.ts index c326b1e69e08..83aff058a41a 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -420,10 +420,6 @@ const ROUTES = { NEW_TASK_TITLE: 'new/task/title', NEW_TASK_DESCRIPTION: 'new/task/description', - ONBOARD: 'onboard', - ONBOARD_MANAGE_EXPENSES: 'onboard/manage-expenses', - ONBOARD_EXPENSIFY_CLASSIC: 'onboard/expensify-classic', - TEACHERS_UNITE: 'teachersunite', I_KNOW_A_TEACHER: 'teachersunite/i-know-a-teacher', I_AM_A_TEACHER: 'teachersunite/i-am-a-teacher', diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 3cf747aa3859..45d4c79ca764 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -109,7 +109,6 @@ const SCREENS = { PARTICIPANTS: 'Participants', MONEY_REQUEST: 'MoneyRequest', NEW_TASK: 'NewTask', - ONBOARD_ENGAGEMENT: 'Onboard_Engagement', TEACHERS_UNITE: 'TeachersUnite', TASK_DETAILS: 'Task_Details', ENABLE_PAYMENTS: 'EnablePayments', @@ -274,12 +273,6 @@ const SCREENS = { PURPOSE: 'Onboarding_Purpose', }, - ONBOARD_ENGAGEMENT: { - ROOT: 'Onboard_Engagement_Root', - MANAGE_TEAMS_EXPENSES: 'Manage_Teams_Expenses', - EXPENSIFY_CLASSIC: 'Expenisfy_Classic', - }, - WELCOME_VIDEO: { ROOT: 'Welcome_Video_Root', }, diff --git a/src/languages/en.ts b/src/languages/en.ts index 92522b51d1f6..37b4b26ea45b 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2512,28 +2512,6 @@ export default { }, copyReferralLink: 'Copy invite link', }, - purposeForExpensify: { - [CONST.INTRO_CHOICES.TRACK]: 'Track business spend for taxes', - [CONST.INTRO_CHOICES.SUBMIT]: 'Get paid back by my employer', - [CONST.INTRO_CHOICES.MANAGE_TEAM]: "Manage my team's expenses", - [CONST.INTRO_CHOICES.CHAT_SPLIT]: 'Chat and split bills with friends', - welcomeMessage: 'Welcome to Expensify', - welcomeSubtitle: 'What would you like to do?', - }, - manageTeams: { - [CONST.MANAGE_TEAMS_CHOICE.MULTI_LEVEL]: 'Multi level approval', - [CONST.MANAGE_TEAMS_CHOICE.CUSTOM_EXPENSE]: 'Custom expense coding', - [CONST.MANAGE_TEAMS_CHOICE.CARD_TRACKING]: 'Company card tracking', - [CONST.MANAGE_TEAMS_CHOICE.ACCOUNTING]: 'Accounting integrations', - [CONST.MANAGE_TEAMS_CHOICE.RULE]: 'Rule enforcement', - title: 'Do you require any of the following features?', - }, - expensifyClassic: { - title: "Expensify Classic has everything you'll need", - firstDescription: "While we're busy working on New Expensify, it currently doesn't support some of the features you're looking for.", - secondDescription: "Don't worry, Expensify Classic has everything you need.", - buttonText: 'Take me to Expensify Classic', - }, violations: { allTagLevelsRequired: 'All tags required', autoReportedRejectedExpense: ({rejectReason, rejectedBy}: ViolationsAutoReportedRejectedExpenseParams) => `${rejectedBy} rejected this expense with the comment "${rejectReason}"`, diff --git a/src/languages/es.ts b/src/languages/es.ts index 95a84bcf59a0..f4f7b02124eb 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -3004,28 +3004,6 @@ export default { }, copyReferralLink: 'Copiar enlace de invitación', }, - purposeForExpensify: { - [CONST.INTRO_CHOICES.TRACK]: 'Seguimiento de los gastos de empresa para fines fiscales', - [CONST.INTRO_CHOICES.SUBMIT]: 'Reclamar gastos a mi empleador', - [CONST.INTRO_CHOICES.MANAGE_TEAM]: 'Gestionar los gastos de mi equipo', - [CONST.INTRO_CHOICES.CHAT_SPLIT]: 'Chatea y divide gastos con tus amigos', - welcomeMessage: 'Bienvenido a Expensify', - welcomeSubtitle: '¿Qué te gustaría hacer?', - }, - manageTeams: { - [CONST.MANAGE_TEAMS_CHOICE.MULTI_LEVEL]: 'Aprobación multinivel', - [CONST.MANAGE_TEAMS_CHOICE.CUSTOM_EXPENSE]: 'Codificación personalizada de gastos', - [CONST.MANAGE_TEAMS_CHOICE.CARD_TRACKING]: 'Seguimiento de tarjetas corporativas', - [CONST.MANAGE_TEAMS_CHOICE.ACCOUNTING]: 'Integraciones de contaduría', - [CONST.MANAGE_TEAMS_CHOICE.RULE]: 'Aplicación de reglas', - title: '¿Necesitas alguna de las siguientes funciones?', - }, - expensifyClassic: { - title: 'Expensify Classic tiene todo lo que necesitas', - firstDescription: 'Aunque estamos ocupados trabajando en el Nuevo Expensify, actualmente no soporta algunas de las funciones que estás buscando.', - secondDescription: 'No te preocupes, Expensify Classic tiene todo lo que necesitas.', - buttonText: 'Llévame a Expensify Classic', - }, violations: { allTagLevelsRequired: 'Todas las etiquetas son obligatorias', autoReportedRejectedExpense: ({rejectedBy, rejectReason}: ViolationsAutoReportedRejectedExpenseParams) => `${rejectedBy} rechazó la solicitud y comentó "${rejectReason}"`, diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index bd5bfc46134a..370324602a0a 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -12,7 +12,6 @@ import type { MoneyRequestNavigatorParamList, NewChatNavigatorParamList, NewTaskNavigatorParamList, - OnboardEngagementNavigatorParamList, ParticipantsNavigatorParamList, PrivateNotesNavigatorParamList, ProfileNavigatorParamList, @@ -172,12 +171,6 @@ const NewTaskModalStackNavigator = createModalStackNavigator require('../../../pages/tasks/NewTaskDescriptionPage').default as React.ComponentType, }); -const OnboardEngagementModalStackNavigator = createModalStackNavigator({ - [SCREENS.ONBOARD_ENGAGEMENT.ROOT]: () => require('../../../pages/OnboardEngagement/PurposeForUsingExpensifyPage').default as React.ComponentType, - [SCREENS.ONBOARD_ENGAGEMENT.MANAGE_TEAMS_EXPENSES]: () => require('../../../pages/OnboardEngagement/ManageTeamsExpensesPage').default as React.ComponentType, - [SCREENS.ONBOARD_ENGAGEMENT.EXPENSIFY_CLASSIC]: () => require('../../../pages/OnboardEngagement/ExpensifyClassicPage').default as React.ComponentType, -}); - const NewTeachersUniteNavigator = createModalStackNavigator({ [SCREENS.SAVE_THE_WORLD.ROOT]: () => require('../../../pages/TeachersUnite/SaveTheWorldPage').default as React.ComponentType, [SCREENS.I_KNOW_A_TEACHER]: () => require('../../../pages/TeachersUnite/KnowATeacherPage').default as React.ComponentType, @@ -336,7 +329,6 @@ const ProcessMoneyRequestHoldStackNavigator = createModalStackNavigator({ export { AddPersonalBankAccountModalStackNavigator, DetailsModalStackNavigator, - OnboardEngagementModalStackNavigator, EditRequestStackNavigator, EnablePaymentsStackNavigator, FlagCommentStackNavigator, diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index c421bdc82028..93d2f8fba989 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -85,10 +85,6 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) { name={SCREENS.RIGHT_MODAL.NEW_TASK} component={ModalStackNavigators.NewTaskModalStackNavigator} /> - Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS)}); - Welcome.isOnboardingFlowCompleted({ - onNotCompleted: () => - Navigation.navigate( - // Uncomment once Stage 1 Onboarding Flow is ready - // - // ROUTES.ONBOARDING_PERSONAL_DETAILS - // - ROUTES.ONBOARD, - ), - }); + Welcome.isOnboardingFlowCompleted({onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS)}); // eslint-disable-next-line react-hooks/exhaustive-deps }, [isLoadingApp]); diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index dafce762116e..1982afaa149f 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -451,13 +451,6 @@ const config: LinkingOptions['config'] = { [SCREENS.NEW_TASK.DESCRIPTION]: ROUTES.NEW_TASK_DESCRIPTION, }, }, - [SCREENS.RIGHT_MODAL.ONBOARD_ENGAGEMENT]: { - screens: { - [SCREENS.ONBOARD_ENGAGEMENT.ROOT]: ROUTES.ONBOARD, - [SCREENS.ONBOARD_ENGAGEMENT.MANAGE_TEAMS_EXPENSES]: ROUTES.ONBOARD_MANAGE_EXPENSES, - [SCREENS.ONBOARD_ENGAGEMENT.EXPENSIFY_CLASSIC]: ROUTES.ONBOARD_EXPENSIFY_CLASSIC, - }, - }, [SCREENS.RIGHT_MODAL.TEACHERS_UNITE]: { screens: { [SCREENS.SAVE_THE_WORLD.ROOT]: ROUTES.TEACHERS_UNITE, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 41e4602ea2d9..7dc862ed437d 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -412,12 +412,6 @@ type NewTaskNavigatorParamList = { [SCREENS.NEW_TASK.DESCRIPTION]: undefined; }; -type OnboardEngagementNavigatorParamList = { - [SCREENS.ONBOARD_ENGAGEMENT.ROOT]: undefined; - [SCREENS.ONBOARD_ENGAGEMENT.MANAGE_TEAMS_EXPENSES]: undefined; - [SCREENS.ONBOARD_ENGAGEMENT.EXPENSIFY_CLASSIC]: undefined; -}; - type TeachersUniteNavigatorParamList = { [SCREENS.SAVE_THE_WORLD.ROOT]: undefined; [SCREENS.I_KNOW_A_TEACHER]: undefined; @@ -525,7 +519,6 @@ type RightModalNavigatorParamList = { [SCREENS.RIGHT_MODAL.ROOM_INVITE]: NavigatorScreenParams; [SCREENS.RIGHT_MODAL.MONEY_REQUEST]: NavigatorScreenParams; [SCREENS.RIGHT_MODAL.NEW_TASK]: NavigatorScreenParams; - [SCREENS.RIGHT_MODAL.ONBOARD_ENGAGEMENT]: NavigatorScreenParams; [SCREENS.RIGHT_MODAL.TEACHERS_UNITE]: NavigatorScreenParams; [SCREENS.RIGHT_MODAL.TASK_DETAILS]: NavigatorScreenParams; [SCREENS.RIGHT_MODAL.ENABLE_PAYMENTS]: NavigatorScreenParams; @@ -737,7 +730,6 @@ export type { ReimbursementAccountNavigatorParamList, State, WorkspaceSwitcherNavigatorParamList, - OnboardEngagementNavigatorParamList, SwitchPolicyIDParams, FullScreenNavigatorParamList, WorkspacesCentralPaneNavigatorParamList, diff --git a/src/libs/actions/Welcome.ts b/src/libs/actions/Welcome.ts index a93da266e622..95b879fc7485 100644 --- a/src/libs/actions/Welcome.ts +++ b/src/libs/actions/Welcome.ts @@ -63,11 +63,7 @@ function isOnboardingFlowCompleted({onCompleted, onNotCompleted}: HasCompletedOn return; } - // Uncomment once Stage 1 Onboarding Flow is ready - // - // const onboardingFlowCompleted = hasProvidedPersonalDetails && hasSelectedPurpose; - // - const onboardingFlowCompleted = hasSelectedPurpose; + const onboardingFlowCompleted = hasProvidedPersonalDetails && hasSelectedPurpose; if (onboardingFlowCompleted) { onCompleted?.(); diff --git a/src/pages/OnboardEngagement/ExpensifyClassicPage.tsx b/src/pages/OnboardEngagement/ExpensifyClassicPage.tsx deleted file mode 100644 index 7b242dd4aefa..000000000000 --- a/src/pages/OnboardEngagement/ExpensifyClassicPage.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react'; -import {View} from 'react-native'; -import Button from '@components/Button'; -import HeaderPageLayout from '@components/HeaderPageLayout'; -import Icon from '@components/Icon'; -import * as Expensicons from '@components/Icon/Expensicons'; -import Text from '@components/Text'; -import useLocalize from '@hooks/useLocalize'; -import useTheme from '@hooks/useTheme'; -import useThemeStyles from '@hooks/useThemeStyles'; -import useWindowDimensions from '@hooks/useWindowDimensions'; -import Navigation from '@libs/Navigation/Navigation'; -import variables from '@styles/variables'; -import * as Link from '@userActions/Link'; -import CONST from '@src/CONST'; -import ROUTES from '@src/ROUTES'; -import SCREENS from '@src/SCREENS'; - -function ExpensifyClassicModal() { - const styles = useThemeStyles(); - const {translate} = useLocalize(); - const {isExtraSmallScreenHeight} = useWindowDimensions(); - const theme = useTheme(); - - const navigateBack = () => { - Navigation.goBack(ROUTES.ONBOARD_MANAGE_EXPENSES); - }; - - const navigateToOldDot = () => { - Link.openOldDotLink(`${CONST.OLDDOT_URLS.INBOX}${CONST.OLDDOT_URLS.DISMMISSED_REASON}`); - }; - - return ( - - } - footer={ -