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 fixes #40688

Merged
merged 11 commits into from
Apr 24, 2024
48 changes: 24 additions & 24 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3652,24 +3652,24 @@ const CONST = {
type: 'createWorkspace',
autoCompleted: true,
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
subtitle: '<strong>Create a workspace</strong> 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.',
'<strong>Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.</strong>',
},
{
type: 'trackExpense',
autoCompleted: false,
title: 'Track an expense',
subtitle: 'Track an expense in any currency, in just a few clicks.',
subtitle: '<strong>Track an expense</strong> in any currency, in just a few clicks.',
message:
'Here’s how to track an expense:\n' +
'\n' +
'1. Click the green + button.\n' +
'1. Click the green <strong>+</strong> button.\n' +
'2. Choose <strong>Track expense</strong>.\n' +
'3. Enter an amount or scan a receipt.\n' +
'4. Click <strong>Track</strong>.\n' +
Expand All @@ -3692,11 +3692,11 @@ const CONST = {
type: 'submitExpense',
autoCompleted: false,
title: 'Submit an expense',
subtitle: 'Submit an expense by entering an amount or scanning a receipt.',
subtitle: '<strong>Submit an expense</strong> by entering an amount or scanning a receipt.',
message:
'Here’s how to submit an expense:\n' +
'\n' +
'1. Click the green + button.\n' +
'1. Click the green <strong>+</strong> 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' +
Expand All @@ -3707,7 +3707,7 @@ const CONST = {
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!',
subtitle: 'You’ll need to <strong>enable your Expensify Wallet</strong> to get paid back. Don’t worry, it’s easy!',
message:
'Here’s how to set up your wallet:\n' +
'\n' +
Expand All @@ -3733,14 +3733,14 @@ const CONST = {
type: 'createWorkspace',
autoCompleted: true,
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
subtitle: '<strong>Create a workspace</strong> 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.',
'<strong>Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.</strong>',
},
{
type: 'meetGuide',
Expand All @@ -3756,7 +3756,7 @@ const CONST = {
type: 'setupCategories',
autoCompleted: false,
title: 'Set up categories',
subtitle: 'Set up categories so your team can code expenses for easy reporting.',
subtitle: '<strong>Set up categories</strong> so your team can code expenses for easy reporting.',
message:
'Here’s how to set up categories:\n' +
'\n' +
Expand All @@ -3766,29 +3766,29 @@ const CONST = {
'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.',
'For more controls like requiring a category for every expense, click <strong>Settings</strong>.',
},
{
type: 'addExpenseApprovals',
autoCompleted: false,
title: 'Add expense approvals',
subtitle: 'Add expense approvals to review your team’s spend and keep it under control.',
subtitle: '<strong>Add expense approvals</strong> 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' +
'2. Go to <strong>Workspaces</strong> > [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' +
'5. In <strong>Workflows</strong>, 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.',
subtitle: '<strong>Invite your team</strong> to Expensify so they can start tracking expenses today.',
message:
'Here’s how to invite your team:\n' +
'\n' +
Expand Down Expand Up @@ -3816,14 +3816,14 @@ const CONST = {
type: 'trackExpense',
autoCompleted: false,
title: 'Track an expense',
subtitle: 'Track an expense in any currency, whether you have a receipt or not.',
subtitle: '<strong>Track an expense</strong> 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' +
'1. Click the green <strong>+</strong> button.\n' +
'2. Choose <strong>Track expense</strong>.\n' +
'3. Enter an amount or scan a receipt.\n' +
'4. Click Track.\n' +
'4. Click <strong>Track</strong>.\n' +
'\n' +
'And you’re done! Yep, it’s that easy.',
},
Expand All @@ -3843,27 +3843,27 @@ const CONST = {
type: 'startChat',
autoCompleted: false,
title: 'Start a chat',
subtitle: 'Start a chat with a friend or group using their email or phone number.',
subtitle: '<strong>Start a chat</strong> 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' +
'1. Click the green <strong>+</strong> 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' +
'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',
autoCompleted: false,
title: 'Split an expense',
subtitle: 'Split an expense right in your chat with one or more friends.',
subtitle: '<strong>Split an expense</strong> right in your chat with one or more friends.',
message:
'Here’s how to request money:\n' +
'\n' +
'1. Click the green + button.\n' +
'1. Click the green <strong>+</strong> 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' +
Expand All @@ -3874,7 +3874,7 @@ const CONST = {
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!',
subtitle: 'You’ll need to <strong>enable your Expensify Wallet</strong> to get paid back. Don’t worry, it’s easy!',
message:
'Here’s how to enable your wallet:\n' +
'\n' +
Expand Down
2 changes: 1 addition & 1 deletion src/components/OnboardingWelcomeVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function OnboardingWelcomeVideo() {
success
pressOnEnter
onPress={closeModal}
text={translate('onboarding.welcomeVideo.button')}
text={translate('footer.getStarted')}
/>
</View>
</View>
Expand Down
3 changes: 1 addition & 2 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,7 @@ export default {
onboarding: {
welcomeVideo: {
title: 'Welcome to Expensify',
description: 'Getting paid is as easy as sending a message.',
button: "Let's go",
description: 'One app to handle all your business and personal spend in a chat. Built for your business, your team, and your friends.',
mountiny marked this conversation as resolved.
Show resolved Hide resolved
},
whatsYourName: "What's your name?",
whereYouWork: 'Where do you work?',
Expand Down
5 changes: 2 additions & 3 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export default {
subtitleText2: 'o crea algo usando el botón',
subtitleText3: '.',
},
businessName: 'Nombre del Negocio',
businessName: 'Nombre de la empresa',
},
location: {
useCurrent: 'Usar ubicación actual',
Expand Down Expand Up @@ -1318,8 +1318,7 @@ export default {
onboarding: {
welcomeVideo: {
title: 'Bienvenido a Expensify',
description: 'Cobrar es tan fácil como enviar un mensaje.',
button: 'Vámonos',
description: 'Una aplicación para gestionar todos tus gastos de empresa y personales en un chat. Pensada para tu empresa, tu equipo y tus amigos.',
},
whatsYourName: '¿Cómo te llamas?',
whereYouWork: '¿Dónde trabajas?',
Expand Down
11 changes: 8 additions & 3 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions';
import KeyboardShortcut from '@libs/KeyboardShortcut';
import Log from '@libs/Log';
import getCurrentUrl from '@libs/Navigation/currentUrl';
import getOnboardingModalScreenOptions from '@libs/Navigation/getOnboardingModalScreenOptions';
import Navigation from '@libs/Navigation/Navigation';
import type {AuthScreensParamList} from '@libs/Navigation/types';
import NetworkConnection from '@libs/NetworkConnection';
Expand Down Expand Up @@ -160,7 +161,11 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useOnboardingLayout();
const screenOptions = getRootNavigatorScreenOptions(isSmallScreenWidth, styles, StyleUtils);
const onboardingScreenOptions = useMemo(() => screenOptions.onboardingModalNavigator(shouldUseNarrowLayout), [screenOptions, shouldUseNarrowLayout]);
const onboardingModalScreenOptions = useMemo(() => screenOptions.onboardingModalNavigator(shouldUseNarrowLayout), [screenOptions, shouldUseNarrowLayout]);
const onboardingScreenOptions = useMemo(
() => getOnboardingModalScreenOptions(isSmallScreenWidth, styles, StyleUtils, shouldUseNarrowLayout),
[StyleUtils, isSmallScreenWidth, shouldUseNarrowLayout, styles],
);
const isInitialRender = useRef(true);

if (isInitialRender.current) {
Expand Down Expand Up @@ -364,12 +369,12 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
/>
<RootStack.Screen
name={NAVIGATORS.WELCOME_VIDEO_MODAL_NAVIGATOR}
options={onboardingScreenOptions}
options={onboardingModalScreenOptions}
component={WelcomeVideoModalNavigator}
/>
<RootStack.Screen
name={NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR}
options={screenOptions.fullScreen}
options={onboardingScreenOptions}
component={OnboardingModalNavigator}
/>
<RootStack.Screen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import getRootNavigatorScreenOptions from '@libs/Navigation/AppNavigator/getRootNavigatorScreenOptions';
import type {ThemeStyles} from '@styles/index';
import type {StyleUtilsType} from '@styles/utils';

function getOnboardingModalScreenOptions(isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType) {
return getRootNavigatorScreenOptions(isSmallScreenWidth, styles, StyleUtils).fullScreen;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We failed to handle gestures. #40555

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parasharrajat sorry, I didn't get what you meant. What is the problem with have with the gestures?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this modal should not close even from gestures but we didn't block user gestures which can be used to close this Modal. You fixed it here #41765 for the #40555

}

export default getOnboardingModalScreenOptions;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import getRootNavigatorScreenOptions from '@libs/Navigation/AppNavigator/getRootNavigatorScreenOptions';
import type {ThemeStyles} from '@styles/index';
import type {StyleUtilsType} from '@styles/utils';

function getOnboardingModalScreenOptions(isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType, shouldUseNarrowLayout: boolean) {
return getRootNavigatorScreenOptions(isSmallScreenWidth, styles, StyleUtils).onboardingModalNavigator(shouldUseNarrowLayout);
}

export default getOnboardingModalScreenOptions;
Loading
Loading