Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0bb8bb9
Add localization keys for go-back-just-once picker
allgandalf Apr 29, 2026
79fbb05
Add two-button footer scaffold to reason page
allgandalf Apr 29, 2026
ab62c2e
Wire Go back just once button
allgandalf Apr 29, 2026
cf8a30d
Wire Switch to Classic button
allgandalf Apr 29, 2026
8fc5b65
Hide reason input on HybridApp
allgandalf Apr 29, 2026
4c961b1
Disable picker buttons when web is offline
allgandalf Apr 29, 2026
26daf97
Log user choice between Go back just once and Switch to Classic
allgandalf Apr 29, 2026
3420d21
Route HybridApp dismissed:false users to picker instead of direct red…
allgandalf Apr 29, 2026
ea6e8fd
Add empty submitButtonText to satisfy FormProvider type
allgandalf Apr 29, 2026
7767a2b
Add picker localization keys to non-English languages
allgandalf Apr 29, 2026
c074748
Revert "Route HybridApp dismissed:false users to picker instead of di…
allgandalf May 11, 2026
de064c6
Drop HybridApp branch from Go back just once handler
allgandalf May 11, 2026
99ca795
Drop HybridApp branch from Switch to Classic handler
allgandalf May 11, 2026
0183be7
Always show reason input on the picker page
allgandalf May 11, 2026
eed02f2
Remove unused HybridApp imports from reason page
allgandalf May 11, 2026
ce04c41
Open OldDot in same tab on Go back just once to match other redirect …
allgandalf May 11, 2026
12b6273
Merge branch 'Expensify:main' into go-back-just-once-classic-redirect
allgandalf May 12, 2026
505ae49
Reuse existing goToExpensifyClassic copy on the picker button
allgandalf May 12, 2026
a4102ae
Show field-required error on click instead of disabling Switch button
allgandalf May 12, 2026
2d68712
Merge branch 'go-back-just-once-classic-redirect' of github.com:allga…
allgandalf May 12, 2026
e0ad430
Drop shouldValidateOnBlur so Go back just once does not surface a sta…
allgandalf May 13, 2026
b78b48e
Make Enter behavior consistent: newline in input, Go back just once o…
allgandalf May 13, 2026
fdd743e
Merge branch 'Expensify:main' into go-back-just-once-classic-redirect
allgandalf May 13, 2026
5e98c2a
Explicitly set shouldValidateOnBlur to false since default is true
allgandalf May 15, 2026
568c8ea
Merge branch 'Expensify:main' into go-back-just-once-classic-redirect
allgandalf May 15, 2026
29b6663
Merge branch 'Expensify:main' into go-back-just-once-classic-redirect
allgandalf May 18, 2026
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
1 change: 1 addition & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8676,6 +8676,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
bookACallTextBottom:
'Wir würden uns freuen, mit Ihnen zu telefonieren, um die Gründe besser zu verstehen. Sie können einen Anruf mit einer*m unserer leitenden Produktmanager*innen buchen, um Ihre Bedürfnisse zu besprechen.',
takeMeToExpensifyClassic: 'Bring mich zu Expensify Classic',
goBackJustOnce: 'Nur dieses Mal zurück',
},
listBoundary: {
errorMessage: 'Beim Laden weiterer Nachrichten ist ein Fehler aufgetreten',
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8696,6 +8696,7 @@ const translations = {
bookACallTextTop: 'By switching to Expensify Classic, you will miss out on:',
bookACallTextBottom: 'We’d be excited to get on a call with you to understand why. You can book a call with one of our senior product managers to discuss your needs.',
takeMeToExpensifyClassic: 'Take me to Expensify Classic',
goBackJustOnce: 'Go back just once',
},
listBoundary: {
errorMessage: 'An error occurred while loading more messages',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8846,6 +8846,7 @@ ${amount} para ${merchant} - ${date}`,
bookACallTextTop: 'Al cambiar a Expensify Classic, se perderá:',
bookACallTextBottom: 'Nos encantaría hablar con usted para entender por qué. Puede concertar una llamada con uno de nuestros jefes de producto para hablar de sus necesidades.',
takeMeToExpensifyClassic: 'Llévame a Expensify Classic',
goBackJustOnce: 'Volver solo esta vez',
Comment thread
allgandalf marked this conversation as resolved.
},
listBoundary: {
errorMessage: 'Se ha producido un error al cargar más mensajes',
Expand Down
1 change: 1 addition & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8699,6 +8699,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
bookACallTextBottom:
'Nous serions ravis d’organiser un appel avec vous pour comprendre pourquoi. Vous pouvez réserver un appel avec l’un de nos chefs de produit senior pour discuter de vos besoins.',
takeMeToExpensifyClassic: 'M’emmener vers Expensify Classic',
goBackJustOnce: 'Revenir une seule fois',
},
listBoundary: {
errorMessage: 'Une erreur est survenue lors du chargement de messages supplémentaires',
Expand Down
1 change: 1 addition & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8668,6 +8668,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
bookACallTextBottom:
'Saremmo felici di fare una chiamata con te per capirne il motivo. Puoi prenotare una chiamata con uno dei nostri senior product manager per discutere delle tue esigenze.',
takeMeToExpensifyClassic: 'Portami a Expensify Classic',
goBackJustOnce: 'Torna solo per questa volta',
},
listBoundary: {
errorMessage: 'Si è verificato un errore durante il caricamento di altri messaggi',
Expand Down
1 change: 1 addition & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8560,6 +8560,7 @@ ${reportName}
bookACallTextTop: 'Expensify Classic に切り替えると、次の機能が利用できなくなります:',
bookACallTextBottom: 'ぜひお電話で理由をお聞かせください。お客様のニーズについて話し合うために、シニアプロダクトマネージャーとの通話を予約できます。',
takeMeToExpensifyClassic: 'Expensify Classic に移動',
goBackJustOnce: '一度だけ戻る',
},
listBoundary: {
errorMessage: 'さらにメッセージを読み込む際にエラーが発生しました',
Expand Down
1 change: 1 addition & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8637,6 +8637,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
bookACallTextTop: 'Als je overschakelt naar Expensify Classic, loop je het volgende mis:',
bookACallTextBottom: 'We spreken graag met je om te begrijpen waarom. Je kunt een gesprek inplannen met een van onze senior productmanagers om je behoeften te bespreken.',
takeMeToExpensifyClassic: 'Breng me naar Expensify Classic',
goBackJustOnce: 'Eenmalig teruggaan',
},
listBoundary: {
errorMessage: 'Er is een fout opgetreden bij het laden van meer berichten',
Expand Down
1 change: 1 addition & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8625,6 +8625,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
bookACallTextBottom:
'Chętnie umówimy się z Tobą na rozmowę, aby zrozumieć dlaczego. Możesz zarezerwować rozmowę z jednym z naszych starszych menedżerów produktu, aby omówić swoje potrzeby.',
takeMeToExpensifyClassic: 'Przejdź do Expensify Classic',
goBackJustOnce: 'Wróć tylko raz',
},
listBoundary: {
errorMessage: 'Wystąpił błąd podczas wczytywania kolejnych wiadomości',
Expand Down
1 change: 1 addition & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8632,6 +8632,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
bookACallTextBottom:
'Ficaríamos muito animados em fazer uma ligação com você para entender o motivo. Você pode agendar uma chamada com um de nossos gerentes de produto sêniores para discutir suas necessidades.',
takeMeToExpensifyClassic: 'Leve-me para o Expensify Classic',
goBackJustOnce: 'Voltar apenas desta vez',
},
listBoundary: {
errorMessage: 'Ocorreu um erro ao carregar mais mensagens',
Expand Down
1 change: 1 addition & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8416,6 +8416,7 @@ ${reportName}
bookACallTextTop: '切换回 Expensify 经典版后,您将无法享受:',
bookACallTextBottom: '我们非常期待与您通话以了解原因。您可以预约与我们的一位资深产品经理通话,讨论您的需求。',
takeMeToExpensifyClassic: '带我前往 Expensify 经典版',
goBackJustOnce: '仅此一次返回',
},
listBoundary: {
errorMessage: '加载更多消息时出错',
Expand Down
54 changes: 50 additions & 4 deletions src/pages/settings/ExitSurvey/DynamicExitSurveyReasonPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, {useCallback} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import Button from '@components/Button';
import FixedFooter from '@components/FixedFooter';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import type {FormOnyxValues} from '@components/Form/types';
Expand All @@ -19,10 +21,14 @@ import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import {saveResponse} from '@libs/actions/ExitSurvey';
import {setErrorFields} from '@libs/actions/FormActions';
import {getMicroSecondOnyxErrorWithMessage} from '@libs/ErrorUtils';
import Log from '@libs/Log';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import StatusBar from '@libs/StatusBar';
import Navigation from '@navigation/Navigation';
import variables from '@styles/variables';
import {openOldDotLink} from '@userActions/Link';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
Expand Down Expand Up @@ -52,7 +58,30 @@ function DynamicExitSurveyReasonPage() {
saveResponse(draftResponse);
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EXIT_SURVEY_CONFIRM.path), {forceReplace: true});
}, [draftResponse]);
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.CTRL_ENTER, submitForm);

const goBackJustOnce = useCallback(() => {
Log.info('[ExitSurvey] User chose Go back just once');
Navigation.dismissModal();
openOldDotLink(CONST.OLDDOT_URLS.INBOX, true);
}, []);

const switchToClassic = useCallback(() => {
Log.info('[ExitSurvey] User chose Switch to Classic');
if (!draftResponse.trim()) {
setErrorFields(ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM, {
[INPUT_IDS.RESPONSE]: getMicroSecondOnyxErrorWithMessage(translate('common.error.fieldRequired')),
});
return;
}
if (draftResponse.length > CONST.MAX_COMMENT_LENGTH) {
setErrorFields(ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM, {
[INPUT_IDS.RESPONSE]: getMicroSecondOnyxErrorWithMessage(translate('common.error.characterLimitExceedCounter', draftResponse.length, CONST.MAX_COMMENT_LENGTH)),
});
return;
}
submitForm();
}, [draftResponse, submitForm, translate]);
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.CTRL_ENTER, switchToClassic);

const formTopMarginsStyle = styles.mt3;
const baseResponseInputContainerStyle = styles.mt3;
Expand All @@ -79,8 +108,9 @@ function DynamicExitSurveyReasonPage() {
formID={ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM}
style={[styles.flex1, styles.mh5, formTopMarginsStyle, StyleUtils.getMaximumHeight(formMaxHeight)]}
onSubmit={submitForm}
submitButtonText={translate('common.next')}
shouldValidateOnBlur
submitButtonText=""
isSubmitButtonVisible={false}
Comment thread
allgandalf marked this conversation as resolved.
shouldValidateOnBlur={false}
validate={(values: FormOnyxValues<typeof ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM>) => {
const errors: Errors = {};
const response = values[INPUT_IDS.RESPONSE] ?? '';
Expand Down Expand Up @@ -110,11 +140,27 @@ function DynamicExitSurveyReasonPage() {
ref={inputCallbackRef}
containerStyles={[baseResponseInputContainerStyle]}
shouldSaveDraft
shouldSubmitForm
/>
</>
)}
</FormProvider>
<FixedFooter>
<Button
large
text={translate('exitSurvey.goToExpensifyClassic')}
onPress={switchToClassic}
isDisabled={isOffline}
/>
<Button
success
large
pressOnEnter
Comment thread
allgandalf marked this conversation as resolved.
text={translate('exitSurvey.goBackJustOnce')}
onPress={goBackJustOnce}
isDisabled={isOffline}
style={styles.mt3}
/>
</FixedFooter>
</ScreenWrapper>
);
}
Expand Down
Loading