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 19 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
4 changes: 0 additions & 4 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,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 @@ -112,7 +112,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 @@ -289,12 +288,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',
},
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
14 changes: 0 additions & 14 deletions src/components/TestToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as ApiUtils from '@libs/ApiUtils';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
import * as Network from '@userActions/Network';
import * as Session from '@userActions/Session';
import * as User from '@userActions/User';
import CONFIG from '@src/CONFIG';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {Network as NetworkOnyx, User as UserOnyx} from '@src/types/onyx';
import Button from './Button';
import {withNetwork} from './OnyxProvider';
Expand Down Expand Up @@ -91,18 +89,6 @@ function TestToolMenu({user = USER_DEFAULT, network}: TestToolMenuProps) {
onPress={() => Session.invalidateCredentials()}
/>
</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_PERSONAL_DETAILS);
}}
/>
</TestToolRow>
</>
);
}
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 @@ -250,7 +250,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 @@ -2673,28 +2673,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}"`,
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 @@ -11,7 +11,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 @@ -323,7 +316,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 @@ -48,17 +48,7 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
return;
}

// Welcome.isOnboardingFlowCompleted({onNotCompleted: () => 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]);

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 @@ -498,13 +498,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 @@ -513,12 +513,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 @@ -626,7 +620,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 @@ -844,7 +837,6 @@ export type {
ReimbursementAccountNavigatorParamList,
State,
WorkspaceSwitcherNavigatorParamList,
OnboardEngagementNavigatorParamList,
SwitchPolicyIDParams,
FullScreenNavigatorParamList,
WorkspacesCentralPaneNavigatorParamList,
Expand Down
10 changes: 2 additions & 8 deletions src/libs/actions/Welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,15 @@ function isAbleToDetermineOnboardingStatus({onAble, onNotAble}: DetermineOnboard
*/
function isOnboardingFlowCompleted({onCompleted, onNotCompleted}: HasCompletedOnboardingFlowProps) {
isOnboardingFlowStatusKnownPromise.then(() => {
// Remove once Stage 1 Onboarding Flow is ready
if (!isFirstTimeNewExpensifyUser) {
return;
}

// Uncomment once Stage 1 Onboarding Flow is ready
//
// const onboardingFlowCompleted = hasProvidedPersonalDetails && hasSelectedPurpose;
//
const onboardingFlowCompleted = hasSelectedPurpose;
const onboardingFlowCompleted = hasProvidedPersonalDetails && hasSelectedPurpose;

if (onboardingFlowCompleted) {
onCompleted?.();
} else {
// Remove once Stage 1 Onboarding Flow is ready
// This key is only updated when we call ReconnectApp, setting it to false now allows the user to navigate normally instead of always redirecting to the workspace chat
Onyx.set(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER, false);

Expand Down Expand Up @@ -120,7 +114,7 @@ Onyx.connect({
key: ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER,
initWithStoredValues: false,
callback: (value) => {
// If isFirstTimeNewExpensifyUser was true do not update it to false. We update it to false inside the Welcome.show logic
// If isFirstTimeNewExpensifyUser was true do not update it to false. We update it to false inside the Welcome.isOnboardingFlowCompleted logic
// More context here https://github.com/Expensify/App/pull/16962#discussion_r1167351359

isFirstTimeNewExpensifyUser = value ?? undefined;
Expand Down
75 changes: 0 additions & 75 deletions src/pages/OnboardEngagement/ExpensifyClassicPage.tsx

This file was deleted.

Loading
Loading