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

Mandatory exit survey for users going back to OldDot #34925

Merged
merged 97 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
8f4e247
Remove unnecessary directory
roryabraham Jan 22, 2024
d9d97ca
Set up pages and navigation
roryabraham Jan 22, 2024
835c2da
Build basic layout for reason page
roryabraham Jan 22, 2024
e77baf7
Add translations for copy
roryabraham Jan 22, 2024
a566335
Add constants for reasons
roryabraham Jan 22, 2024
d043c79
Use correct reasons from CONST in reasons page
roryabraham Jan 23, 2024
f5e2ded
Fix radio button styles
roryabraham Jan 23, 2024
1f1b22f
Implement validation in reason page
roryabraham Jan 23, 2024
6ccfdd8
Simplify routes
roryabraham Jan 23, 2024
344bd5e
Fix skeletons of response and confirm page
roryabraham Jan 23, 2024
138e14c
Localize page headers
roryabraham Jan 23, 2024
19991af
Translate title and subtitle on reason page
roryabraham Jan 23, 2024
d764869
Implement basic layout of ResponsePage
roryabraham Jan 23, 2024
8ccecea
Style response input better
roryabraham Jan 23, 2024
1063d50
Get multiline styles implemented correctly
roryabraham Jan 23, 2024
5f226ab
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 23, 2024
0f1fc68
Compute maxHeight for TextInput in component
roryabraham Jan 23, 2024
14351a7
Polish response input height
roryabraham Jan 23, 2024
142b59c
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 25, 2024
af1110f
Make response required
roryabraham Jan 25, 2024
21d0449
Add mushroom-top-hat illustration asset
roryabraham Jan 25, 2024
93c5a87
Implement confirm page
roryabraham Jan 25, 2024
3035ce0
Add Onyx types for forms
roryabraham Jan 25, 2024
b83bdef
Fix route type
roryabraham Jan 25, 2024
733dd6a
Add obligatory draft keys for forms
roryabraham Jan 25, 2024
ca73fcf
Make spanish copy informal
roryabraham Jan 26, 2024
899d16c
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 26, 2024
99b7809
Hook up with API
roryabraham Jan 27, 2024
fa6fa15
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 27, 2024
fa47d7f
whoops, forgot to commit this file
roryabraham Jan 27, 2024
fb01ab5
Fix types for API params
roryabraham Jan 27, 2024
6f7026f
Fix regression: https://github.com/Expensify/App/pull/34787\#issuecom…
roryabraham Jan 27, 2024
bf336ce
Bump type-fest
roryabraham Jan 30, 2024
d85a2fe
Wrap RadioButtons with forwardRef
roryabraham Jan 30, 2024
e1e5283
Add ExitSurveyForm onyx types
roryabraham Jan 30, 2024
b5cfed1
Add Onyx type in Form.ts as well
roryabraham Jan 30, 2024
b66d8d3
Merge branch main into Rory-TransitionSurvey
roryabraham Jan 31, 2024
86bf87f
Fix typecheck
roryabraham Jan 31, 2024
688a49b
Remove TODOs
roryabraham Jan 31, 2024
2b2a148
Fix forwardRef
roryabraham Jan 31, 2024
8c909c1
Clear onyx form data after sending to API
roryabraham Jan 31, 2024
639afcd
Attempt to apply drafts - seeing cryptic type error
roryabraham Jan 31, 2024
1ee4118
Populate response TextInput with draft response
roryabraham Jan 31, 2024
41457dc
Use Onyx.set instead of Onyx.merge
roryabraham Jan 31, 2024
f738173
Remove errant console.log
roryabraham Jan 31, 2024
0faf0c5
Implement loading state in confirm page
roryabraham Feb 1, 2024
645c0d0
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 1, 2024
ef706f9
Fix linking config
roryabraham Feb 1, 2024
8fab4f9
Consolidate goToExpensifyClassic copy
roryabraham Feb 1, 2024
222cfb6
Upgrade react-native-onyx
roryabraham Feb 1, 2024
25d1268
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 1, 2024
33d614d
Hide reason page back button on wide layouts
roryabraham Feb 2, 2024
db6b991
Remove unnecessary ref
roryabraham Feb 2, 2024
3bff7db
Submit response form on CMD+Enter
roryabraham Feb 2, 2024
a7f4a2f
Fix form second submission
roryabraham Feb 2, 2024
a61b8d5
Make isOffline a true boolean
roryabraham Feb 2, 2024
566000b
Implement offline UI for reason page
roryabraham Feb 2, 2024
b3245a3
Implement offline UI for the other pages in the survey as well
roryabraham Feb 2, 2024
220a974
Disable button in confirm page when offline
roryabraham Feb 2, 2024
aed59f1
Move survey back to RHP
roryabraham Feb 2, 2024
4222758
Fix typo
roryabraham Feb 2, 2024
edbf8a4
Fix navigation to RHP
roryabraham Feb 2, 2024
7c5e331
Remove unnecessary offline navigation effect
roryabraham Feb 2, 2024
1893e7a
Add backTo param to response and confirm page, even though it doesn't…
roryabraham Feb 2, 2024
ecfc373
Add missing spanish translation
roryabraham Feb 2, 2024
fb01bd2
Fix backTo bug
roryabraham Feb 2, 2024
211f166
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 2, 2024
50d47e9
Move switch to Expensify Classic to top of account settings page
roryabraham Feb 2, 2024
3ee8832
Subtract keyboard height from maxHeight of form and input
roryabraham Feb 3, 2024
50db2a4
Merge branch main into Rory-TransitionSurvey
roryabraham Feb 9, 2024
dcd132f
Make textinput uncontrolled for better performance on android, remove…
roryabraham Feb 9, 2024
57fdf94
Fix offline icon on mobile
roryabraham Feb 9, 2024
13cd0e5
Add padding to offline view
roryabraham Feb 9, 2024
f0091e4
Fix offline and mushroomtophat styles
roryabraham Feb 9, 2024
3c64ea8
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 9, 2024
adbae00
Fix lockfiles after merge
roryabraham Feb 9, 2024
e3ac42d
Center align text on offline and confirm page
roryabraham Feb 9, 2024
5d7c22a
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 14, 2024
90a0b4a
Fix most types after merge
roryabraham Feb 14, 2024
349f6d8
Fix types in ExitSurveyResponsePage
roryabraham Feb 14, 2024
8e243fb
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 14, 2024
45882a4
Fix typo in english translation
roryabraham Feb 14, 2024
07a802d
Update MushroomTopHat illustration
roryabraham Feb 14, 2024
1c4111b
Prepopulate reason form with draft reason
roryabraham Feb 14, 2024
043601d
Remove outdated cleanup
roryabraham Feb 14, 2024
3dfac29
Fix comment in NumberUtils
roryabraham Feb 14, 2024
c7f2b57
fix draft on reason page
roryabraham Feb 14, 2024
22b6390
Setup RadioButtons to work as a controlled input
roryabraham Feb 14, 2024
7be4f46
Switch backTo for response and confirm page if you're offline
roryabraham Feb 14, 2024
b5f26ed
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 15, 2024
ed8ef0d
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 20, 2024
faf6741
Use stable reference for onPress
roryabraham Feb 20, 2024
a5fb310
Delete gremlin file
roryabraham Feb 20, 2024
411b281
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 24, 2024
6040f50
Fix package-lock.json after conflict resolution
roryabraham Feb 24, 2024
c98c48f
Fix TS errors
roryabraham Feb 24, 2024
bd00fc3
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 24, 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
73 changes: 73 additions & 0 deletions assets/images/product-illustrations/mushroom-top-hat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 24 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"shellcheck": "^1.1.0",
"style-loader": "^2.0.0",
"time-analytics-webpack-plugin": "^0.1.17",
"type-fest": "^3.12.0",
"type-fest": "^4.10.2",
"typescript": "^5.3.2",
"wait-port": "^0.2.9",
"webpack": "^5.76.0",
Expand Down
10 changes: 10 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3166,6 +3166,16 @@ const CONST = {
MINI_CONTEXT_MENU_MAX_ITEMS: 4,

REPORT_FIELD_TITLE_FIELD_ID: 'text_title',

EXIT_SURVEY: {
REASONS: {
FEATURE_NOT_AVAILABLE: 'featureNotAvailable',
DONT_UNDERSTAND: 'dontUnderstand',
PREFER_CLASSIC: 'preferClassic',
},
REASON_INPUT_ID: 'reason',
RESPONSE_INPUT_ID: 'response',
},
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
8 changes: 8 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ const ONYXKEYS = {
REIMBURSEMENT_ACCOUNT_FORM_DRAFT: 'reimbursementAccountDraft',
PERSONAL_BANK_ACCOUNT: 'personalBankAccountForm',
PERSONAL_BANK_ACCOUNT_DRAFT: 'personalBankAccountFormDraft',
EXIT_SURVEY_REASON_FORM: 'exitSurveyReasonForm',
EXIT_SURVEY_REASON_FORM_DRAFT: 'exitSurveyReasonFormDraft',
EXIT_SURVEY_RESPONSE_FORM: 'exitSurveyResponseForm',
EXIT_SURVEY_RESPONSE_FORM_DRAFT: 'exitSurveyResponseFormDraft',
},
} as const;

Expand Down Expand Up @@ -549,6 +553,10 @@ type OnyxValues = {
[ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.PERSONAL_BANK_ACCOUNT]: OnyxTypes.PersonalBankAccount;
[ONYXKEYS.FORMS.PERSONAL_BANK_ACCOUNT_DRAFT]: OnyxTypes.PersonalBankAccount;
[ONYXKEYS.FORMS.EXIT_SURVEY_REASON_FORM]: OnyxTypes.ExitSurveyReasonForm;
[ONYXKEYS.FORMS.EXIT_SURVEY_REASON_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM]: OnyxTypes.ExitSurveyResponseForm;
[ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM_DRAFT]: OnyxTypes.ExitSurveyResponseForm;
};

type OnyxKeyValue<TOnyxKey extends (OnyxKey | OnyxCollectionKey) & keyof OnyxValues> = OnyxEntry<OnyxValues[TOnyxKey]>;
Expand Down
7 changes: 7 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ const ROUTES = {
SETTINGS_STATUS_CLEAR_AFTER_DATE: 'settings/profile/status/clear-after/date',
SETTINGS_STATUS_CLEAR_AFTER_TIME: 'settings/profile/status/clear-after/time',

SETTINGS_EXIT_SURVEY_REASON: 'settings/exit-survey/reason',
SETTINGS_EXIT_SURVEY_RESPONSE: {
route: 'settings/exit-survey/response',
getRoute: (reason: ValueOf<typeof CONST.EXIT_SURVEY.REASONS>) => `settings/exit-survey/response?reason=${encodeURIComponent(reason)}` as const,
},
SETTINGS_EXIT_SURVEY_CONFIRM: 'settings/exit-survey/confirm',

KEYBOARD_SHORTCUTS: 'keyboard-shortcuts',

NEW: 'new',
Expand Down
6 changes: 6 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ const SCREENS = {
REPORT_VIRTUAL_CARD_FRAUD: 'Settings_Wallet_ReportVirtualCardFraud',
CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: 'Settings_Wallet_Cards_Digital_Details_Update_Address',
},

EXIT_SURVEY: {
REASON: 'Settings_ExitSurvey_Reason',
RESPONSE: 'Settings_ExitSurvey_Response',
CONFIRM: 'Settings_ExitSurvey_Confirm',
},
},
SAVE_THE_WORLD: {
ROOT: 'SaveTheWorld_Root',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/FormProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import lodashIsEqual from 'lodash/isEqual';
import type {ForwardedRef, MutableRefObject, ReactNode} from 'react';
import type {FocusEvent, ForwardedRef, MutableRefObject, ReactNode} from 'react';
import React, {createRef, forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
Expand Down Expand Up @@ -273,7 +273,7 @@ function FormProvider(
}
inputProps.onPressOut?.(event);
},
onBlur: (event) => {
onBlur: (event: FocusEvent) => {
// Only run validation when user proactively blurs the input.
if (Visibility.isVisible() && Visibility.hasFocus()) {
const relatedTarget = event && 'relatedTarget' in event.nativeEvent && event?.nativeEvent?.relatedTarget;
Expand Down
15 changes: 8 additions & 7 deletions src/components/Form/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type {ComponentProps, FocusEvent, Key, MutableRefObject, ReactNode, Ref} from 'react';
import type {GestureResponderEvent, NativeSyntheticEvent, StyleProp, TextInputFocusEventData, ViewStyle} from 'react-native';
import type {ComponentProps, Key, MutableRefObject, ReactNode, Ref} from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import type AddressSearch from '@components/AddressSearch';
import type AmountTextInput from '@components/AmountTextInput';
import type CheckboxWithLabel from '@components/CheckboxWithLabel';
import type Picker from '@components/Picker';
import type RadioButtons from '@components/RadioButtons';
import type SingleChoiceQuestion from '@components/SingleChoiceQuestion';
import type TextInput from '@components/TextInput';
import type {OnyxFormKey, OnyxValues} from '@src/ONYXKEYS';
Expand All @@ -17,7 +18,7 @@ import type {BaseForm, FormValueType} from '@src/types/onyx/Form';
* TODO: Add remaining inputs here once these components are migrated to Typescript:
* CountrySelector | StatePicker | DatePicker | EmojiPickerButtonDropdown | RoomNameInput | ValuePicker
*/
type ValidInputs = typeof TextInput | typeof AmountTextInput | typeof SingleChoiceQuestion | typeof CheckboxWithLabel | typeof Picker | typeof AddressSearch;
type ValidInputs = typeof TextInput | typeof AmountTextInput | typeof SingleChoiceQuestion | typeof CheckboxWithLabel | typeof Picker | typeof AddressSearch | typeof RadioButtons;

type ValueTypeKey = 'string' | 'boolean' | 'date';

Expand All @@ -26,13 +27,13 @@ type MeasureLayoutOnSuccessCallback = (left: number, top: number, width: number,
type BaseInputProps = {
shouldSetTouchedOnBlurOnly?: boolean;
onValueChange?: (value: unknown, key: string) => void;
onTouched?: (event: GestureResponderEvent) => void;
onTouched?: (event: unknown) => void;
valueType?: ValueTypeKey;
value?: FormValueType;
defaultValue?: FormValueType;
onBlur?: (event: FocusEvent | NativeSyntheticEvent<TextInputFocusEventData>) => void;
onPressOut?: (event: GestureResponderEvent) => void;
onPress?: (event: GestureResponderEvent) => void;
onBlur?: (event: unknown) => void;
onPressOut?: (event: unknown) => void;
onPress?: (event: unknown) => void;
shouldSaveDraft?: boolean;
shouldUseDefaultValue?: boolean;
key?: Key | null | undefined;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Lounge from '@assets/images/product-illustrations/lounge.svg';
import MagicCode from '@assets/images/product-illustrations/magic-code.svg';
import MoneyEnvelopeBlue from '@assets/images/product-illustrations/money-envelope--blue.svg';
import MoneyMousePink from '@assets/images/product-illustrations/money-mouse--pink.svg';
import MushroomTopHat from '@assets/images/product-illustrations/mushroom-top-hat.svg';
import PaymentHands from '@assets/images/product-illustrations/payment-hands.svg';
import ReceiptYellow from '@assets/images/product-illustrations/receipt--yellow.svg';
import ReceiptsSearchYellow from '@assets/images/product-illustrations/receipts-search--yellow.svg';
Expand Down Expand Up @@ -82,6 +83,7 @@ export {
Mailbox,
MoneyEnvelopeBlue,
MoneyMousePink,
MushroomTopHat,
ReceiptsSearchYellow,
ReceiptYellow,
RocketBlue,
Expand Down
2 changes: 1 addition & 1 deletion src/components/RadioButtonWithLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function RadioButtonWithLabel({LabelComponent, style, label = '', hasError = fal
accessible={false}
onPress={onPress}
style={[styles.flexRow, styles.flexWrap, styles.flexShrink1, styles.alignItemsCenter]}
wrapperStyle={[styles.ml3, styles.pr2, styles.w100]}
wrapperStyle={[styles.flex1, styles.ml3, styles.pr2]}
// disable hover style when disabled
hoverDimmingValue={0.8}
pressDimmingValue={0.5}
Expand Down
44 changes: 27 additions & 17 deletions src/components/RadioButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React, {useState} from 'react';
import React, {forwardRef, useState} from 'react';
import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import type {MaybePhraseKey} from '@libs/Localize';
import FormHelpMessage from './FormHelpMessage';
import RadioButtonWithLabel from './RadioButtonWithLabel';

type Choice = {
label: string;
value: string;
style?: StyleProp<ViewStyle>;
};

type RadioButtonsProps = {
Expand All @@ -14,31 +18,37 @@ type RadioButtonsProps = {

/** Callback to fire when selecting a radio button */
onPress: (value: string) => void;

/** Potential error text provided by a form InputWrapper */
errorText?: MaybePhraseKey;
};

function RadioButtons({items, onPress}: RadioButtonsProps) {
function RadioButtons({items, onPress, errorText}: RadioButtonsProps) {
const styles = useThemeStyles();
const [checkedValue, setCheckedValue] = useState('');

return (
<View style={styles.mb3}>
{items.map((item) => (
<RadioButtonWithLabel
key={item.value}
isChecked={item.value === checkedValue}
style={styles.mt4}
onPress={() => {
setCheckedValue(item.value);
return onPress(item.value);
}}
label={item.label}
/>
))}
</View>
<>
<View style={styles.mb3}>
{items.map((item) => (
<RadioButtonWithLabel
key={item.value}
isChecked={item.value === checkedValue}
style={[styles.mt4, item.style]}
onPress={() => {
setCheckedValue(item.value);
return onPress(item.value);
}}
label={item.label}
/>
))}
</View>
{!!errorText && <FormHelpMessage message={errorText} />}
</>
);
}

RadioButtons.displayName = 'RadioButtons';

export type {Choice};
export default RadioButtons;
export default forwardRef(RadioButtons);
3 changes: 1 addition & 2 deletions src/components/SingleChoiceQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React, {forwardRef} from 'react';
import type {Text as RNText} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import type {MaybePhraseKey} from '@libs/Localize';
import FormHelpMessage from './FormHelpMessage';
import type {Choice} from './RadioButtons';
import RadioButtons from './RadioButtons';
import Text from './Text';
Expand Down Expand Up @@ -32,8 +31,8 @@ function SingleChoiceQuestion({prompt, errorText, possibleAnswers, currentQuesti
items={possibleAnswers}
key={currentQuestionIndex}
onPress={onInputChange}
errorText={errorText}
/>
<FormHelpMessage message={errorText} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this down into RadioButtons

</>
);
}
Expand Down
24 changes: 24 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2136,4 +2136,28 @@ export default {
taxRateChanged: 'Tax rate was modified',
taxRequired: 'Missing tax rate',
},
exitSurvey: {
header: 'Before you go',
reasonPage: {
title: "Please tell us why you're leaving",
subtitle: 'Before you go, please tell us why you’d like to switch to Expensify Classic.',
},
reasons: {
// TODO: use consts for these keys
[CONST.EXIT_SURVEY.REASONS.FEATURE_NOT_AVAILABLE]: "I need a feature that's only available in Expensify Classic.",
[CONST.EXIT_SURVEY.REASONS.DONT_UNDERSTAND]: "I don't understand how to use New Expensify.",
[CONST.EXIT_SURVEY.REASONS.PREFER_CLASSIC]: 'I understand how to use New Expensify, but I prefer Expensify Classic.',
},
prompts: {
[CONST.EXIT_SURVEY.REASONS.FEATURE_NOT_AVAILABLE]: "What feature do you need that isn't available in New Expensify?",
[CONST.EXIT_SURVEY.REASONS.DONT_UNDERSTAND]: 'What are you trying to do?',
[CONST.EXIT_SURVEY.REASONS.PREFER_CLASSIC]: 'Why to you prefer Expensify Classic?',
roryabraham marked this conversation as resolved.
Show resolved Hide resolved
},
responsePlaceholder: 'Your response',
thankYou: 'Thanks for the feedback!',
thankYouSubtitle: 'Your responses will help us build a better product to get stuff done. Thank you so much!',
goToExpensifyClassic: 'Switch to Expensify Classic',
offline:
"You appear to be offline. Unfortunately, Expensify Classic doesn't work offline, but New Expensify does. If you prefer to use Expensify Classic, try again when you have an internet connection.",
},
} satisfies TranslationBase;
24 changes: 24 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2624,4 +2624,28 @@ export default {
taxRateChanged: 'La tasa de impuesto fue modificada',
taxRequired: 'Falta la tasa de impuesto',
},
exitSurvey: {
header: 'Antes de irte',
reasonPage: {
title: 'Dinos por qué te vas',
subtitle: 'Antes de irte, por favor dinos por qué te gustaría cambiarte a Expensify Classic.',
},
reasons: {
// TODO: use consts for these keys
[CONST.EXIT_SURVEY.REASONS.FEATURE_NOT_AVAILABLE]: 'Necesito una función que sólo está disponible en Expensify Classic.',
[CONST.EXIT_SURVEY.REASONS.DONT_UNDERSTAND]: 'No entiendo cómo usar New Expensify.',
[CONST.EXIT_SURVEY.REASONS.PREFER_CLASSIC]: 'Entiendo cómo usar New Expensify, pero prefiero Expensify Classic.',
},
prompts: {
[CONST.EXIT_SURVEY.REASONS.FEATURE_NOT_AVAILABLE]: '¿Qué función necesitas que no esté disponible en New Expensify?',
[CONST.EXIT_SURVEY.REASONS.DONT_UNDERSTAND]: '¿Qué estás tratando de hacer?',
[CONST.EXIT_SURVEY.REASONS.PREFER_CLASSIC]: '¿Por qué prefieres Expensify Classic?',
},
responsePlaceholder: 'Su respuesta',
thankYou: '¡Gracias por tus comentarios!',
thankYouSubtitle: 'Sus respuestas nos ayudarán a crear un mejor producto para hacer las cosas bien. ¡Muchas gracias!',
goToExpensifyClassic: 'Cambiar a Expensify Classic',
offline:
'Parece que estás desconectado. Desafortunadamente, Expensify Classic no funciona sin conexión, pero New Expensify sí. Si prefieres utilizar Expensify Classic, inténtalo de nuevo cuando tengas conexión a internet.',
},
} satisfies EnglishTranslation;
9 changes: 9 additions & 0 deletions src/libs/API/parameters/SwitchToOldDotParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';

type SwitchToOldDotParams = {
reason: ValueOf<typeof CONST.EXIT_SURVEY.REASONS>;
surveyResponse: string;
};

export default SwitchToOldDotParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@ export type {default as ReopenTaskParams} from './ReopenTaskParams';
export type {default as CompleteTaskParams} from './CompleteTaskParams';
export type {default as CompleteEngagementModalParams} from './CompleteEngagementModalParams';
export type {default as SetNameValuePairParams} from './SetNameValuePairParams';
export type {default as SwitchToOldDotParams} from './SwitchToOldDotParams';
Loading
Loading