Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Onboarding - Stage 2] Onboarding Flow - enabled #39687

Merged
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d296c84
Turn on Onboarding Flow Stage 1
MaciejSWM Mar 21, 2024
e5c12fe
Merge branch 'wave9/onboarding-flow' into wave9/onboarding-flow-turne…
cdOut Mar 22, 2024
3cbbca5
Merge branch 'wave9/onboarding-flow' into wave9/onboarding-flow-turne…
cdOut Apr 3, 2024
6580eda
Merge branch 'main' into wave9/onboarding-flow-turned-on
filip-solecki Apr 5, 2024
e54093c
Fix TS
filip-solecki Apr 5, 2024
820d464
Remove onboarding test button
filip-solecki Apr 5, 2024
e2017b6
Adjust header styles
filip-solecki Apr 5, 2024
94296ff
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 9, 2024
dd3bb9e
Remove unnecessary comments
filip-solecki Apr 9, 2024
8d8d73e
disable select styling for video player
cdOut Apr 10, 2024
5240ba6
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 10, 2024
a02589b
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 10, 2024
9dbd0e4
Fix focus outside modal
filip-solecki Apr 10, 2024
d110071
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 11, 2024
5ae151e
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 12, 2024
26a92b3
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 15, 2024
2a79b7f
Fix margin
filip-solecki Apr 15, 2024
3b13953
Adjust comment
filip-solecki Apr 15, 2024
53962f2
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 15, 2024
ff44f1b
disable validate on change and blur for onboarding personal details
cdOut Apr 16, 2024
1d012d8
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 16, 2024
7f84a50
add form validation on change after first submit press
cdOut Apr 17, 2024
e32b6f4
fix prettier
cdOut Apr 17, 2024
3356eb7
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 17, 2024
538f43a
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 18, 2024
cbe6b88
Merge branch 'main' into wave9/onboarding-flow-turn-on
cdOut Apr 19, 2024
8ecab8f
fix prettier
cdOut Apr 19, 2024
c5d61ae
Adjust onboarding to BE changes
filip-solecki Apr 20, 2024
8409fd5
Update src/types/onyx/Onboarding.ts
filip-solecki Apr 20, 2024
c5d8bf6
Update src/ONYXKEYS.ts
filip-solecki Apr 20, 2024
c58d1a6
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 21, 2024
747a2d3
Fix route path
filip-solecki Apr 21, 2024
82db599
cleanup
filip-solecki Apr 22, 2024
811d2f1
Merge branch 'main' into wave9/onboarding-flow-turn-on
filip-solecki Apr 23, 2024
45d1bad
Update functions names
filip-solecki Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {ValueOf} from 'type-fest';
import type CONST from './CONST';
import type * as FormTypes from './types/form';
import type * as OnyxTypes from './types/onyx';
import type Onboarding from './types/onyx/Onboarding';
import type AssertTypesEqual from './types/utils/AssertTypesEqual';
import type DeepValueOf from './types/utils/DeepValueOf';

Expand Down Expand Up @@ -114,6 +115,9 @@ const ONYXKEYS = {
/** Boolean flag only true when first set */
NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER: 'nvp_isFirstTimeNewExpensifyUser',

/** This NVP contains information about whether the onboarding flow was completed or not */
NVP_ONBOARDING: 'nvp_onboarding',

/** Contains the user preference for the LHN priority mode */
NVP_PRIORITY_MODE: 'nvp_priorityMode',

Expand Down Expand Up @@ -565,6 +569,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.ACCOUNT]: OnyxTypes.Account;
[ONYXKEYS.ACCOUNT_MANAGER_REPORT_ID]: string;
[ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER]: boolean;
[ONYXKEYS.NVP_ONBOARDING]: Onboarding | [];
[ONYXKEYS.ACTIVE_CLIENTS]: string[];
[ONYXKEYS.DEVICE_ID]: string;
[ONYXKEYS.IS_SIDEBAR_LOADED]: boolean;
Expand Down
4 changes: 0 additions & 4 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,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: 'settings/teachersunite',
I_KNOW_A_TEACHER: 'settings/teachersunite/i-know-a-teacher',
I_AM_A_TEACHER: 'settings/teachersunite/i-am-a-teacher',
Expand Down
7 changes: 0 additions & 7 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,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',
Expand Down Expand Up @@ -296,12 +295,6 @@ const SCREENS = {
WORK: 'Onboarding_Work',
},

ONBOARD_ENGAGEMENT: {
ROOT: 'Onboard_Engagement_Root',
MANAGE_TEAMS_EXPENSES: 'Manage_Teams_Expenses',
EXPENSIFY_CLASSIC: 'Expenisfy_Classic',
},

WELCOME_VIDEO: {
ROOT: 'Welcome_Video_Root',
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/OnboardingWelcomeVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function OnboardingWelcomeVideo() {
<View style={shouldUseNarrowLayout ? {padding: MODAL_PADDING} : {paddingHorizontal: MODAL_PADDING}}>{getWelcomeVideo()}</View>
<View style={[shouldUseNarrowLayout ? [styles.mt5, styles.mh8] : [styles.mt5, styles.mh5]]}>
<View style={[shouldUseNarrowLayout ? [styles.gap1, styles.mb8] : [styles.mb10]]}>
<Text style={[styles.textHeadlineH1, styles.textXXLarge]}>{translate('onboarding.welcomeVideo.title')}</Text>
<Text style={[styles.textHeadlineH1]}>{translate('onboarding.welcomeVideo.title')}</Text>
<Text style={styles.textSupporting}>{translate('onboarding.welcomeVideo.description')}</Text>
</View>
<Button
Expand Down
11 changes: 0 additions & 11 deletions src/components/TestToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,6 @@ function TestToolMenu({user = USER_DEFAULT, network}: TestToolMenuProps) {
/>
</TestToolRow>

{/* Navigate to the new Onboarding flow (Stage 1). This button is temporary and should be removed after passing QA tests. */}
<TestToolRow title="Onboarding Flow">
<Button
small
text="Navigate"
onPress={() => {
Navigation.dismissModal();
Navigation.navigate(ROUTES.ONBOARDING_PURPOSE);
}}
/>
</TestToolRow>
{/* Navigate to the new Search Page. This button is temporary and should be removed after passing QA tests. */}
<TestToolRow title="New Search Page">
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/components/VideoPlayer/BaseVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function BaseVideoPlayer({
}
togglePlayCurrentVideo();
}}
style={styles.flex1}
style={[styles.flex1, styles.noSelect]}
>
{shouldUseSharedVideoElement ? (
<>
Expand Down
22 changes: 0 additions & 22 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2676,28 +2676,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 expenses 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}"`,
Expand Down
22 changes: 0 additions & 22 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3166,28 +3166,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}"`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type {
MoneyRequestNavigatorParamList,
NewChatNavigatorParamList,
NewTaskNavigatorParamList,
OnboardEngagementNavigatorParamList,
ParticipantsNavigatorParamList,
PrivateNotesNavigatorParamList,
ProfileNavigatorParamList,
Expand Down Expand Up @@ -166,12 +165,6 @@ const NewTaskModalStackNavigator = createModalStackNavigator<NewTaskNavigatorPar
[SCREENS.NEW_TASK.DESCRIPTION]: () => require('../../../../pages/tasks/NewTaskDescriptionPage').default as React.ComponentType,
});

const OnboardEngagementModalStackNavigator = createModalStackNavigator<OnboardEngagementNavigatorParamList>({
[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<TeachersUniteNavigatorParamList>({
[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,
Expand Down Expand Up @@ -324,7 +317,6 @@ const ProcessMoneyRequestHoldStackNavigator = createModalStackNavigator({
export {
AddPersonalBankAccountModalStackNavigator,
DetailsModalStackNavigator,
OnboardEngagementModalStackNavigator,
EditRequestStackNavigator,
EnablePaymentsStackNavigator,
FlagCommentStackNavigator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) {
name={SCREENS.RIGHT_MODAL.NEW_TASK}
component={ModalStackNavigators.NewTaskModalStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.ONBOARD_ENGAGEMENT}
component={ModalStackNavigators.OnboardEngagementModalStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.TEACHERS_UNITE}
component={ModalStackNavigators.NewTeachersUniteNavigator}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,7 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
return;
}

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_ROOT)});
mountiny marked this conversation as resolved.
Show resolved Hide resolved
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoadingApp]);

Expand Down
7 changes: 0 additions & 7 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,6 @@ const config: LinkingOptions<RootStackParamList>['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.I_KNOW_A_TEACHER]: ROUTES.I_KNOW_A_TEACHER,
Expand Down
8 changes: 0 additions & 8 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,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;
Expand Down Expand Up @@ -638,7 +632,6 @@ type RightModalNavigatorParamList = {
[SCREENS.RIGHT_MODAL.ROOM_INVITE]: NavigatorScreenParams<RoomInviteNavigatorParamList>;
[SCREENS.RIGHT_MODAL.MONEY_REQUEST]: NavigatorScreenParams<MoneyRequestNavigatorParamList>;
[SCREENS.RIGHT_MODAL.NEW_TASK]: NavigatorScreenParams<NewTaskNavigatorParamList>;
[SCREENS.RIGHT_MODAL.ONBOARD_ENGAGEMENT]: NavigatorScreenParams<OnboardEngagementNavigatorParamList>;
[SCREENS.RIGHT_MODAL.TEACHERS_UNITE]: NavigatorScreenParams<TeachersUniteNavigatorParamList>;
[SCREENS.RIGHT_MODAL.TASK_DETAILS]: NavigatorScreenParams<TaskDetailsNavigatorParamList>;
[SCREENS.RIGHT_MODAL.ENABLE_PAYMENTS]: NavigatorScreenParams<EnablePaymentsNavigatorParamList>;
Expand Down Expand Up @@ -835,7 +828,6 @@ export type {
NavigationStateRoute,
NewChatNavigatorParamList,
NewTaskNavigatorParamList,
OnboardEngagementNavigatorParamList,
OnboardingModalNavigatorParamList,
ParticipantsNavigatorParamList,
PrivateNotesNavigatorParamList,
Expand Down
2 changes: 2 additions & 0 deletions src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import * as Device from '@userActions/Device';
import * as PriorityMode from '@userActions/PriorityMode';
import redirectToSignIn from '@userActions/SignInRedirect';
import Timing from '@userActions/Timing';
import * as Welcome from '@userActions/Welcome';
import CONFIG from '@src/CONFIG';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -642,6 +643,7 @@ function resetHomeRouteParams() {
function cleanupSession() {
Pusher.disconnect();
Timers.clearAll();
Welcome.resetAllChecks();
PriorityMode.resetHasReadRequiredDataFromStorage();
MainQueue.clear();
HttpUtils.cancelPendingRequests();
Expand Down
Loading
Loading