feat: update confirmation and rate selection UX for date-aware mileage rates#92878
feat: update confirmation and rate selection UX for date-aware mileage rates#92878Krishna2323 wants to merge 0 commit into
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8358365f89
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 32c68c42a5b..382508d81b1 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1689,6 +1689,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Sie können bis zu ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} Ausgaben gleichzeitig duplizieren. Bitte wählen Sie weniger Ausgaben aus und versuchen Sie es erneut.`,
deleted: 'Gelöscht',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} bis ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Gültig ab ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Gültig bis ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9414,6 +9417,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
scanTestDriveTooltip: '<tooltip>Sende diese Quittung, um\n<strong>die Probefahrt abzuschließen!</strong></tooltip>',
gpsTooltip: '<tooltip>GPS-Tracking läuft! Wenn du fertig bist, stoppe die Aufzeichnung unten.</tooltip>',
hasFilterNegation: '<tooltip>Suchen Sie nach Ausgaben ohne Belege mit <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Wir haben den Kurs basierend auf Ihrem Reisedatum aktualisiert.</tooltip>',
},
discardChangesConfirmation: {
title: 'Änderungen verwerfen?',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a776b747936..b2ba49e02f8 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1645,6 +1645,9 @@ const translations: TranslationDeepObject<typeof en> = {
prompt: 'Habilita el seguimiento de impuestos en el espacio de trabajo para editar los detalles del gasto o eliminar el impuesto de este gasto.',
confirmText: 'Eliminar impuesto',
},
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} a ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Válido desde ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Válido hasta ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9575,6 +9578,7 @@ ${amount} para ${merchant} - ${date}`,
scanTestDriveTooltip: '<tooltip>¡Envía este recibo para\n<strong>completar la prueba</strong>!</tooltip>',
gpsTooltip: '<tooltip>¡Seguimiento por GPS en curso! Cuando termines, detén el seguimiento a continuación.</tooltip>',
hasFilterNegation: '<tooltip>Busca gastos sin recibos usando <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Hemos actualizado la tasa según tu fecha de viaje.</tooltip>',
},
discardChangesConfirmation: {
title: '¿Descartar cambios?',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 7ba2b143d6e..b4e6506006f 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1695,6 +1695,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Vous pouvez dupliquer jusqu’à ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} dépenses à la fois. Veuillez sélectionner moins de dépenses et réessayer.`,
deleted: 'Supprimé',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} au ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Valide à partir du ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Valide jusqu’au ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9446,6 +9449,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
scanTestDriveTooltip: '<tooltip>Envoyez ce reçu pour\n<strong>terminer l’essai !</strong></tooltip>',
gpsTooltip: '<tooltip>Suivi GPS en cours ! Lorsque vous avez terminé, arrêtez le suivi ci-dessous.</tooltip>',
hasFilterNegation: '<tooltip>Recherchez les dépenses sans reçus à l’aide de <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Nous avons mis à jour le taux en fonction de votre date de voyage.</tooltip>',
},
discardChangesConfirmation: {
title: 'Ignorer les modifications ?',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 16c336b978b..78cd4ebbd84 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1687,6 +1687,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Puoi duplicare fino a ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} spese alla volta. Seleziona meno spese e riprova.`,
deleted: 'Eliminato',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `dal ${startDate} al ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Valido dal ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Valido fino al ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9402,6 +9405,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
scanTestDriveTooltip: '<tooltip>Invia questa ricevuta per\n<strong>completare il test drive!</strong></tooltip>',
gpsTooltip: '<tooltip>Tracciamento GPS in corso! Quando hai finito, interrompi il tracciamento qui sotto.</tooltip>',
hasFilterNegation: '<tooltip>Cerca le spese senza ricevute usando <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Abbiamo aggiornato il tasso in base alla tua data di viaggio.</tooltip>',
},
discardChangesConfirmation: {
title: 'Scartare le modifiche?',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 2b1a926f254..b399d6bb21c 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1667,6 +1667,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `一度に複製できる経費は最大で ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} 件です。経費の数を減らして、もう一度お試しください。`,
deleted: '削除済み',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} 〜 ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `有効期間:${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `${endDate} まで有効`,
},
transactionMerge: {
listPage: {
@@ -9280,6 +9283,7 @@ ${reportName}
scanTestDriveTooltip: '<tooltip>このレシートを送信して\n<strong>試用を完了しましょう!</strong></tooltip>',
gpsTooltip: '<tooltip>GPS追跡を実行中です!完了したら、下で追跡を停止してください。</tooltip>',
hasFilterNegation: '<tooltip><strong>-has:receipt</strong> を使って、レシートのない経費を検索します。</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>出張日にもとづいてレートを更新しました。</tooltip>',
},
discardChangesConfirmation: {
title: '変更を破棄しますか?',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 58c0c33708d..e1340817da1 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1682,6 +1682,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Je kunt maximaal ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} uitgaven tegelijk dupliceren. Selecteer minder uitgaven en probeer het opnieuw.`,
deleted: 'Verwijderd',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} tot ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Geldig vanaf ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Geldig tot ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9369,6 +9372,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
scanTestDriveTooltip: '<tooltip>Stuur deze bon om\n<strong>de proefrit te voltooien!</strong></tooltip>',
gpsTooltip: '<tooltip>GPS-tracking bezig! Als je klaar bent, stop dan hieronder met bijhouden.</tooltip>',
hasFilterNegation: '<tooltip>Zoek naar uitgaven zonder bonnen met <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>We hebben het tarief bijgewerkt op basis van je reisdatum.</tooltip>',
},
discardChangesConfirmation: {
title: 'Wijzigingen negeren?',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index ae2c2b5fa0a..bd088139520 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1683,6 +1683,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Możesz jednocześnie zduplikować maksymalnie ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} wydatków. Wybierz mniej wydatków i spróbuj ponownie.`,
deleted: 'Usunięto',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} do ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Ważne od ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Ważne do ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9353,6 +9356,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
scanTestDriveTooltip: '<tooltip>Wyślij ten paragon, aby\n<strong>zakończyć jazdę próbną!</strong></tooltip>',
gpsTooltip: '<tooltip>Śledzenie GPS w toku! Gdy skończysz, zatrzymaj śledzenie poniżej.</tooltip>',
hasFilterNegation: '<tooltip>Wyszukaj wydatki bez paragonów za pomocą <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Zaktualizowaliśmy stawkę na podstawie daty twojej podróży.</tooltip>',
},
discardChangesConfirmation: {
title: 'Odrzucić zmiany?',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index de0e271772d..b28f257a960 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1680,6 +1680,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
bulkDuplicateLimit: `Você pode duplicar até ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} despesas por vez. Selecione menos despesas e tente novamente.`,
deleted: 'Excluído',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} a ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `Válido a partir de ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `Válido até ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9361,6 +9364,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
scanTestDriveTooltip: '<tooltip>Envie este recibo para\n<strong>concluir o test drive!</strong></tooltip>',
gpsTooltip: '<tooltip>Rastreamento por GPS em andamento! Quando terminar, pare o rastreamento abaixo.</tooltip>',
hasFilterNegation: '<tooltip>Pesquise despesas sem recibos usando <strong>-has:receipt</strong>.</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>Nós atualizamos a taxa com base na sua data de viagem.</tooltip>',
},
discardChangesConfirmation: {
title: 'Descartar alterações?',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 1df8087de86..4cb40f2a46a 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1628,6 +1628,9 @@ const translations: TranslationDeepObject<typeof en> = {
taxDisabledAlert: {title: '税费已禁用', prompt: '请在工作区中启用税费跟踪,以便编辑此报销的详细信息或从该报销中删除税费。', confirmText: '删除税费'},
bulkDuplicateLimit: `您一次最多可以复制 ${CONST.SEARCH.BULK_DUPLICATE_LIMIT} 笔报销。请减少选择的报销数量后重试。`,
deleted: '已删除',
+ rateValidDateRange: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} 至 ${endDate}`,
+ rateValidFrom: ({startDate}: {startDate: string}) => `有效期自 ${startDate}`,
+ rateValidUntil: ({endDate}: {endDate: string}) => `有效期至 ${endDate}`,
},
transactionMerge: {
listPage: {
@@ -9108,6 +9111,7 @@ ${reportName}
scanTestDriveTooltip: '<tooltip>发送此收据以\n<strong>完成试用体验!</strong></tooltip>',
gpsTooltip: '<tooltip>正在进行 GPS 跟踪!完成后,请在下方停止跟踪。</tooltip>',
hasFilterNegation: '<tooltip>使用 <strong>-has:receipt</strong> 搜索没有收据的报销。</tooltip>',
+ mileageRateAutoUpdated: '<tooltip>我们已根据您的出行日期更新了汇率。</tooltip>',
},
discardChangesConfirmation: {
title: '放弃更改?',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Seems pretty good to me, @JmillsExpensify can you have a look above too? |
|
Yeah, same. This looks good to me as well. |
|
@shawnborton @JmillsExpensify Should the tooltip be permanently dismissed if the user creates the expense or navigates to another page while the tooltip is visible? Currently, it is only permanently dismissed when the user explicitly interacts with the tooltip (tapping the X button or tapping the tooltip itself). Navigating away simply hides it visually, and it will reappear the next time the conditions are met. |
I think it's fine if this is the behavior we go with personally. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2ddca225d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c57e41c95
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@Krishna2323 perf test is failed |
|
@thelullabyy all checks are passing now. |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Testing steps and videos look good to me. Nice work!
|
Checking today |
|
|
0308231 to
cd5455c
Compare
|
I'm really sorry for messing this up 😔, I have opened a new PR here: #93103 |


Explanation of Change
Fixed Issues
$ #89835
PROPOSAL:
Tests
Prerequisites: Create a workspace with multiple distance rates that have date bounds. For example:
Test 1: Rate picker shows date labels
$0.70/mi • Valid Jan 1, 2026 - Dec 31, 2026)Test 2: Date-aware auto-fill on confirmation page
Test 3: Tooltip shows when rate auto-updates due to date change
Test 4: Tooltip does NOT show when rate stays the same
Test 5: Tooltip hides on navigation
Test 6: P2P distance request is unaffected
Test 7: Track expense (Self DM)
Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
Monosnap.screencast.2026-06-08.01-36-45.mp4