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

Tasks for guided setup #39951

Merged
merged 69 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
53e0ca3
feat: added new method for handliung onboarding, build new messages s…
barttom Apr 5, 2024
c34e8a2
feat: call method
barttom Apr 5, 2024
9068ffd
Merge branch 'feat/38771/tasks-for-guided-setup' of https://github.co…
rezkiy37 Apr 9, 2024
880a34a
feat: added new method for handliung onboarding, build new messages s…
barttom Apr 5, 2024
c396f2a
feat: call method
barttom Apr 5, 2024
9ad3329
feat: added optimistic data
barttom Apr 10, 2024
9cff1f4
feat: added optimistic data
barttom Apr 10, 2024
1077782
feat: update method
barttom Apr 10, 2024
5e18a49
Merge branch 'feat/38771/tasks-for-guided-setup' of https://github.co…
rezkiy37 Apr 10, 2024
b37c394
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 10, 2024
28c66f3
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 11, 2024
4f8f78e
minor fixes of onboarding messages
rezkiy37 Apr 11, 2024
e08f94d
create CompleteGuidedSetupParams
rezkiy37 Apr 11, 2024
202b111
integrate setDisplayName
rezkiy37 Apr 11, 2024
fdb7f46
extend functions in ReportUtils
rezkiy37 Apr 11, 2024
b60ed0d
improve completeOnboarding
rezkiy37 Apr 11, 2024
f5486bb
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 12, 2024
4f291f0
simplify CompleteGuidedSetupParams
rezkiy37 Apr 12, 2024
a32e5ea
add todo
rezkiy37 Apr 12, 2024
30678e2
improve completeOnboarding
rezkiy37 Apr 12, 2024
40c5676
pass timestamp into getDBTimeWithSkew
rezkiy37 Apr 12, 2024
98175c1
pass createdOffset into buildOptimistic function
rezkiy37 Apr 12, 2024
64f4b92
fix bugs and improve completeOnboarding
rezkiy37 Apr 12, 2024
80b6b48
avoid text escaping
rezkiy37 Apr 12, 2024
2a78251
add replies config
rezkiy37 Apr 12, 2024
e97aa46
pass mentionMessage and prettify
rezkiy37 Apr 12, 2024
22cfe3b
change ordering of pages
rezkiy37 Apr 12, 2024
f5cd44b
fix bottom padding
rezkiy37 Apr 12, 2024
2adfe8f
pass current user info
rezkiy37 Apr 12, 2024
1fb2411
remove line
rezkiy37 Apr 12, 2024
2782025
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 15, 2024
beba934
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 15, 2024
c1145c6
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 15, 2024
0d23206
integrate OnboardingWork page
rezkiy37 Apr 15, 2024
19d7d50
move types
rezkiy37 Apr 15, 2024
ed44ffd
integrate onboarding work
rezkiy37 Apr 15, 2024
41851ac
clarify work cases
rezkiy37 Apr 15, 2024
23268d1
fix onboarding screen options
rezkiy37 Apr 15, 2024
80bb56c
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 16, 2024
52fde4a
add video to tasks
rezkiy37 Apr 16, 2024
5df95e0
fix workspace creating
rezkiy37 Apr 16, 2024
ca821a0
integrate video to tasks
rezkiy37 Apr 16, 2024
9591026
integrate OnboardingPurposeType type
rezkiy37 Apr 16, 2024
d87069d
integrate GuidedSetupData type
rezkiy37 Apr 16, 2024
e4a4fa6
use OnboardingPurposeType
rezkiy37 Apr 16, 2024
ef7f8c6
change progress bar values
rezkiy37 Apr 16, 2024
3c6e512
fix task actions ordering
rezkiy37 Apr 16, 2024
6eb2c29
integrate addition options
rezkiy37 Apr 16, 2024
820360f
fix default value of guideCalendarLink
rezkiy37 Apr 16, 2024
8142c95
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 17, 2024
2e7d5c0
fix task video assigning
rezkiy37 Apr 17, 2024
a443fb5
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 17, 2024
cb102de
minor improvement
rezkiy37 Apr 17, 2024
95ce5fc
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 18, 2024
f81ba49
cut task videos off
rezkiy37 Apr 18, 2024
18cf4a8
Revert "add video to tasks"
rezkiy37 Apr 18, 2024
070e933
fix mentionHandle
rezkiy37 Apr 18, 2024
41e7786
fix link of message
rezkiy37 Apr 18, 2024
897668c
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 18, 2024
6b4f19f
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Apr 19, 2024
76d419c
fix bold text
rezkiy37 Apr 19, 2024
67a2e10
add task types
rezkiy37 Apr 19, 2024
3ec3c82
complete tasks
rezkiy37 Apr 19, 2024
8cfbe4c
Revert "complete tasks"
rezkiy37 Apr 19, 2024
4e5a21b
Reapply "complete tasks"
rezkiy37 Apr 19, 2024
b1c34f1
integrate autocompleted tasks
rezkiy37 Apr 19, 2024
c3360e0
improve progress bar
rezkiy37 Apr 19, 2024
4b0354a
Merge branch 'main' into feature/38771-tasks-for-guided-setup
fabioh8010 Apr 21, 2024
555861c
Apply review changes
fabioh8010 Apr 21, 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
270 changes: 269 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const onboardingChoices = {
LOOKING_AROUND: 'newDotLookingAround',
};

type OnboardingPurposeType = ValueOf<typeof onboardingChoices>;

const CONST = {
MERGED_ACCOUNT_PREFIX: 'MERGED_',
DEFAULT_POLICY_ROOM_CHAT_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL],
Expand Down Expand Up @@ -3607,6 +3609,272 @@ const CONST = {
"We'll send a request to each person so they can pay you back. Let me know if you have any questions!",
},

ONBOARDING_MESSAGES: {
[onboardingChoices.TRACK]: {
message: 'Here are some essential tasks to keep your business spend in shape for tax season.',
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'createWorkspace',
autoCompleted: true,
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
message:
'Here’s how to create a workspace:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Click <strong>Workspaces</strong> > <strong>New workspace</strong>.\n' +
'\n' +
'Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.',
},
{
type: 'trackExpense',
autoCompleted: false,
title: 'Track an expense',
subtitle: 'Track an expense in any currency, in just a few clicks.',
message:
'Here’s how to track an expense:\n' +
'\n' +
'1. Click the green + button.\n' +
'2. Choose <strong>Track expense</strong>.\n' +
'3. Enter an amount or scan a receipt.\n' +
'4. Click <strong>Track</strong>.\n' +
'\n' +
'And you’re done! Yep, it’s that easy.',
},
],
},
[onboardingChoices.EMPLOYER]: {
message: 'Getting paid back is as easy as sending a message. Let’s go over the basics.',
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'submitExpense',
autoCompleted: false,
title: 'Submit an expense',
subtitle: 'Submit an expense by entering an amount or scanning a receipt.',
message:
'Here’s how to submit an expense:\n' +
'\n' +
'1. Click the green + button.\n' +
'2. Choose <strong>Submit expense</strong>.\n' +
'3. Enter an amount or scan a receipt.\n' +
'4. Add your reimburser to the request.\n' +
'\n' +
'Then, send your request and wait for that sweet “Cha-ching!” when it’s complete.',
},
{
type: 'enableWallet',
autoCompleted: false,
title: 'Enable your wallet',
subtitle: 'You’ll need to enable your Expensify Wallet to get paid back. Don’t worry, it’s easy!',
message:
'Here’s how to set up your wallet:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Click <strong>Wallet</strong> > <strong>Enable wallet</strong>.\n' +
'3. Connect your bank account.\n' +
'\n' +
'Once that’s done, you can request money from anyone and get paid back right into your personal bank account.',
},
],
},
[onboardingChoices.MANAGE_TEAM]: {
message: 'Here are some important tasks to help get your team’s expenses under control.',
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'createWorkspace',
autoCompleted: true,
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
message:
'Here’s how to create a workspace:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Click <strong>Workspaces<strong> > <strong>New workspace<strong>.\n' +
'\n' +
'Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.',
},
{
type: 'meetGuide',
autoCompleted: false,
title: 'Meet your setup specialist',
subtitle: '',
message: ({adminsRoomLink, guideCalendarLink}: {adminsRoomLink: string; guideCalendarLink: string}) =>
`Meet your setup specialist, who can answer any questions as you get started with Expensify. Yes, a real human!\n` +
'\n' +
`Chat with the specialist in your [#admins room](${adminsRoomLink}) or [schedule a call](${guideCalendarLink}) today.`,
},
{
type: 'setupCategories',
autoCompleted: false,
title: 'Set up categories',
subtitle: 'Set up categories so your team can code expenses for easy reporting.',
message:
'Here’s how to set up categories:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Go to <strong>Workspaces</strong> > [your workspace].\n' +
'3. Click <strong>Categories</strong>.\n' +
'4. Enable and disable default categories.\n' +
'5. Click <strong>Add categories</strong> to make your own.\n' +
'\n' +
'For more controls like requiring a category for every expense, click Settings.',
},
{
type: 'addExpenseApprovals',
autoCompleted: false,
title: 'Add expense approvals',
subtitle: 'Add expense approvals to review your team’s spend and keep it under control.',
message:
'Here’s how to add expense approvals:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Go to Workspaces > [your workspace].\n' +
'3. Click <strong>More features</strong>.\n' +
'4. Enable <strong>Workflows</strong>.\n' +
'5. In Workflows, enable <strong>Add approvals</strong>.\n' +
'\n' +
'You’ll be set as the expense approver. You can change this to any admin once you invite your team.',
},
{
type: 'inviteTeam',
autoCompleted: false,
title: 'Invite your team',
subtitle: 'Invite your team to Expensify so they can start tracking expenses today.',
message:
'Here’s how to invite your team:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. Go to <strong>Workspaces</strong> > [your workspace].\n' +
'3. Click <strong>Members</strong> > <strong>Invite member</strong>.\n' +
'4. Enter emails or phone numbers. \n' +
'5. Add an invite message if you want.\n' +
'\n' +
'That’s it! Happy expensing :)',
},
],
},
[onboardingChoices.PERSONAL_SPEND]: {
message: 'Here’s how to track your spend in a few clicks.',
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'trackExpense',
autoCompleted: false,
title: 'Track an expense',
subtitle: 'Track an expense in any currency, whether you have a receipt or not.',
message:
'Here’s how to track an expense:\n' +
'\n' +
'1. Click the green + button.\n' +
'2. Choose <strong>Track expense</strong>.\n' +
'3. Enter an amount or scan a receipt.\n' +
'4. Click Track.\n' +
'\n' +
'And you’re done! Yep, it’s that easy.',
},
],
},
[onboardingChoices.CHAT_SPLIT]: {
message: 'Splitting bills with friends is as easy as sending a message. Here’s how.',
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [
{
type: 'startChat',
autoCompleted: false,
title: 'Start a chat',
subtitle: 'Start a chat with a friend or group using their email or phone number.',
message:
'Here’s how to start a chat:\n' +
'\n' +
'1. Click the green + button.\n' +
'2. Choose <strong>Start chat</strong>.\n' +
'3. Enter emails or phone numbers.\n' +
'\n' +
'If any of your friends aren’t using Expensify already, they’ll be invited automatically. \n' +
'\n' +
'Every chat will also turn into an email or text that they can respond to directly.',
},
{
type: 'splitExpense',
rezkiy37 marked this conversation as resolved.
Show resolved Hide resolved
autoCompleted: false,
title: 'Split an expense',
subtitle: 'Split an expense right in your chat with one or more friends.',
message:
'Here’s how to request money:\n' +
'\n' +
'1. Click the green + button.\n' +
'2. Choose <strong>Split expense</strong>.\n' +
'3. Scan a receipt or enter an amount.\n' +
'4. Add your friend(s) to the request.\n' +
'\n' +
'Feel free to add more details if you want, or just send it off. Let’s get you paid back!',
},
{
type: 'enableWallet',
autoCompleted: false,
title: 'Enable your wallet',
subtitle: 'You’ll need to enable your Expensify Wallet to get paid back. Don’t worry, it’s easy!',
message:
'Here’s how to enable your wallet:\n' +
'\n' +
'1. Click your profile picture.\n' +
'2. <strong>Click Wallet</strong> > <strong>Enable wallet</strong>.\n' +
'3. Add your bank account.\n' +
'\n' +
'Once that’s done, you can request money from anyone and get paid right into your personal bank account.',
},
],
},
[onboardingChoices.LOOKING_AROUND]: {
message:
'# Welcome to Expensify!\n' +
"Hi there, I'm Concierge. Chat with me here for anything you need.\n" +
'\n' +
"Expensify is best known for expense and corporate card management, but we do a lot more than that. Let me know what you're interested in and I'll help get you started.",
video: {
url: `${CLOUDFRONT_URL}/videos/intro-1280.mp4`,
thumbnailUrl: `${CLOUDFRONT_URL}/images/expensify__favicon.png`,
duration: 55,
width: 1280,
height: 960,
},
tasks: [],
},
},

REPORT_FIELD_TITLE_FIELD_ID: 'text_title',

MOBILE_PAGINATION_SIZE: 15,
Expand Down Expand Up @@ -4352,6 +4620,6 @@ type Country = keyof typeof CONST.ALL_COUNTRIES;
type IOUType = ValueOf<typeof CONST.IOU.TYPE>;
type IOUAction = ValueOf<typeof CONST.IOU.ACTION>;

export type {Country, IOUAction, IOUType, RateAndUnit};
export type {Country, IOUAction, IOUType, RateAndUnit, OnboardingPurposeType};

export default CONST;
3 changes: 3 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ const ONYXKEYS = {
DISPLAY_NAME_FORM_DRAFT: 'displayNameFormDraft',
ONBOARDING_PERSONAL_DETAILS_FORM: 'onboardingPersonalDetailsForm',
ONBOARDING_PERSONAL_DETAILS_FORM_DRAFT: 'onboardingPersonalDetailsFormDraft',
ONBOARDING_PERSONAL_WORK: 'onboardingWorkForm',
ONBOARDING_PERSONAL_WORK_DRAFT: 'onboardingWorkFormDraft',
ROOM_NAME_FORM: 'roomNameForm',
ROOM_NAME_FORM_DRAFT: 'roomNameFormDraft',
REPORT_DESCRIPTION_FORM: 'reportDescriptionForm',
Expand Down Expand Up @@ -475,6 +477,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.PROFILE_SETTINGS_FORM]: FormTypes.ProfileSettingsForm;
[ONYXKEYS.FORMS.DISPLAY_NAME_FORM]: FormTypes.DisplayNameForm;
[ONYXKEYS.FORMS.ONBOARDING_PERSONAL_DETAILS_FORM]: FormTypes.DisplayNameForm;
[ONYXKEYS.FORMS.ONBOARDING_PERSONAL_WORK]: FormTypes.WorkForm;
[ONYXKEYS.FORMS.ROOM_NAME_FORM]: FormTypes.RoomNameForm;
[ONYXKEYS.FORMS.REPORT_DESCRIPTION_FORM]: FormTypes.ReportDescriptionForm;
[ONYXKEYS.FORMS.LEGAL_NAME_FORM]: FormTypes.LegalNameForm;
Expand Down
1 change: 1 addition & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ const ROUTES = {
PROCESS_MONEY_REQUEST_HOLD: 'hold-request-educational',
ONBOARDING_ROOT: 'onboarding',
ONBOARDING_PERSONAL_DETAILS: 'onboarding/personal-details',
ONBOARDING_WORK: 'onboarding/work',
ONBOARDING_PURPOSE: 'onboarding/purpose',
WELCOME_VIDEO_ROOT: 'onboarding/welcome-video',

Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ const SCREENS = {
ONBOARDING: {
PERSONAL_DETAILS: 'Onboarding_Personal_Details',
PURPOSE: 'Onboarding_Purpose',
WORK: 'Onboarding_Work',
},

ONBOARD_ENGAGEMENT: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TestToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function TestToolMenu({user = USER_DEFAULT, network}: TestToolMenuProps) {
text="Navigate"
onPress={() => {
Navigation.dismissModal();
Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS);
Navigation.navigate(ROUTES.ONBOARDING_PURPOSE);
}}
/>
</TestToolRow>
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export default {
subtitleText2: 'button above, or create something using the',
subtitleText3: 'button below.',
},
businessName: 'Business name',
},
location: {
useCurrent: 'Use current location',
Expand Down Expand Up @@ -1316,13 +1317,13 @@ export default {
notYou: ({user}: NotYouParams) => `Not ${user}?`,
},
onboarding: {
welcome: 'Welcome!',
welcomeVideo: {
title: 'Welcome to Expensify',
description: 'Getting paid is as easy as sending a message.',
button: "Let's go",
},
whatsYourName: "What's your name?",
whereYouWork: 'Where do you work?',
purpose: {
title: 'What do you want to do today?',
error: 'Please make a selection before continuing',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export default {
subtitleText2: 'o crea algo usando el botón',
subtitleText3: '.',
},
businessName: 'Nombre del Negocio',
},
location: {
useCurrent: 'Usar ubicación actual',
Expand Down Expand Up @@ -1315,13 +1316,13 @@ export default {
notYou: ({user}: NotYouParams) => `¿No eres ${user}?`,
},
onboarding: {
welcome: '¡Bienvenido!',
welcomeVideo: {
title: 'Bienvenido a Expensify',
description: 'Cobrar es tan fácil como enviar un mensaje.',
button: 'Vámonos',
},
whatsYourName: '¿Cómo te llamas?',
whereYouWork: '¿Dónde trabajas?',
purpose: {
title: '¿Qué quieres hacer hoy?',
error: 'Por favor, haga una selección antes de continuar.',
Expand Down
10 changes: 10 additions & 0 deletions src/libs/API/parameters/CompleteGuidedSetupParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type {OnboardingPurposeType} from '@src/CONST';

type CompleteGuidedSetupParams = {
firstName: string;
lastName: string;
guidedSetupData: string;
engagementChoice: OnboardingPurposeType;
};

export default CompleteGuidedSetupParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export type {default as SetPolicyCurrencyDefaultParams} from './SetPolicyCurrenc
export type {default as UpdatePolicyConnectionConfigParams} from './UpdatePolicyConnectionConfigParams';
export type {default as RemovePolicyConnectionParams} from './RemovePolicyConnectionParams';
export type {default as RenamePolicyTaxParams} from './RenamePolicyTaxParams';
export type {default as CompleteGuidedSetupParams} from './CompleteGuidedSetupParams';
export type {default as DismissTrackExpenseActionableWhisperParams} from './DismissTrackExpenseActionableWhisperParams';
export type {default as ConvertTrackedExpenseToRequestParams} from './ConvertTrackedExpenseToRequestParams';
export type {default as ShareTrackedExpenseParams} from './ShareTrackedExpenseParams';
Expand Down
Loading
Loading