Update the policy distance rates table to the new style - #93872
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@Krishna2323 @situchan One of you needs to 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b30d9db0d8
ℹ️ 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".
…ck API Align WorkspaceDistanceRatesTableRow with the shared Table offlineWithFeedback pattern and add EmptyStateComponent support so the table can render an empty state while staying mounted.
Show a GenericEmptyStateComponent with an add-rate action when a workspace has no distance rates, and add emptyRates copy across all supported languages.
b30d9db to
2001874
Compare
🦜 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 5d27e86e23f..9447cafceb1 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6746,7 +6746,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
workspaceNeeds: 'Ein Arbeitsbereich benötigt mindestens einen aktivierten Entfernungssatz.',
distance: 'Entfernung',
centrallyManage: 'Tarife zentral verwalten, in Meilen oder Kilometern nachverfolgen und eine Standardkategorie festlegen.',
- emptyRates: {title: 'Noch keine Entfernungssätze', subtitle: 'Fügen Sie einen Satz hinzu, um Kilometer mit benutzerdefinierten Sätzen zu erstatten.'},
+ emptyRates: {title: 'Noch keine Entfernungssätze', subtitle: 'Fügen Sie einen Satz hinzu, um Kilometer mit individuellen Sätzen zu erstatten.'},
rate: 'Bewerten',
addRate: 'Satz hinzufügen',
findRate: 'Kurs finden',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 2c7378e2264..78e439e445c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6772,7 +6772,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
workspaceNeeds: 'Un espace de travail doit avoir au moins un taux de distance activé.',
distance: 'Distance',
centrallyManage: 'Gérez les taux de manière centralisée, suivez en miles ou en kilomètres et définissez une catégorie par défaut.',
- emptyRates: {title: 'Aucun taux de distance pour le moment', subtitle: 'Ajoutez un taux pour rembourser le kilométrage à des taux personnalisés.'},
+ emptyRates: {title: 'Aucun taux de distance pour l’instant', subtitle: 'Ajoutez un taux pour rembourser le kilométrage à des taux personnalisés.'},
rate: 'Taux',
addRate: 'Ajouter un taux',
findRate: 'Trouver le taux',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 5da77853984..63cd5ffaa2f 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6732,7 +6732,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
workspaceNeeds: 'Uno spazio di lavoro necessita di almeno una tariffa distanza abilitata.',
distance: 'Distanza',
centrallyManage: 'Gestisci centralmente le tariffe, monitora in miglia o chilometri e imposta una categoria predefinita.',
- emptyRates: {title: 'Nessuna tariffa distanza ancora', subtitle: 'Aggiungi una tariffa per rimborsare il chilometraggio con tariffe personalizzate.'},
+ emptyRates: {title: 'Ancuna nessuna tariffa distanza', subtitle: 'Aggiungi una tariffa per rimborsare il chilometraggio a tariffe personalizzate.'},
rate: 'Valuta',
addRate: 'Aggiungi tariffa',
findRate: 'Trova tariffa',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index dbaae47dc77..2505a040162 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6711,7 +6711,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
workspaceNeeds: 'Een workspace heeft minstens één ingeschakelde afstandstarief nodig.',
distance: 'Afstand',
centrallyManage: 'Beheer tarieven centraal, volg in mijlen of kilometers en stel een standaardcategorie in.',
- emptyRates: {title: 'Nog geen kilometertarieven', subtitle: 'Voeg een tarief toe om kilometers tegen aangepaste tarieven te vergoeden.'},
+ emptyRates: {title: 'Nog geen afstandstarieven', subtitle: 'Voeg een tarief toe om kilometers tegen aangepaste tarieven te vergoeden.'},
rate: 'Beoordeling',
addRate: 'Tarief toevoegen',
findRate: 'Tarief zoeken',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index dbf9c2cf587..a70d665e84a 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6705,7 +6705,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
workspaceNeeds: 'Miejsce pracy musi mieć włączoną co najmniej jedną stawkę za dystans.',
distance: 'Dystans',
centrallyManage: 'Centralnie zarządzaj stawkami, śledź w milach lub kilometrach i ustaw domyślną kategorię.',
- emptyRates: {title: 'Brak stawek za dystans', subtitle: 'Dodaj stawkę, żeby rozliczać kilometry według własnych stawek.'},
+ emptyRates: {title: 'Brak stawek za dystans', subtitle: 'Dodaj stawkę do zwrotu kosztów przejechanych kilometrów według niestandardowych stawek.'},
rate: 'Oceń',
addRate: 'Dodaj stawkę',
findRate: 'Znajdź kurs',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index e55a98485d2..2d3b3b998d3 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6706,7 +6706,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
workspaceNeeds: 'Um workspace precisa de pelo menos uma taxa de distância ativada.',
distance: 'Distância',
centrallyManage: 'Gerencie tarifas centralmente, acompanhe em milhas ou quilômetros e defina uma categoria padrão.',
- emptyRates: {title: 'Ainda não há tarifas de distância', subtitle: 'Adicione uma taxa para reembolsar a quilometragem com valores personalizados.'},
+ emptyRates: {title: 'Ainda não há tarifas de distância', subtitle: 'Adicione uma tarifa para reembolsar quilometragem com taxas personalizadas.'},
rate: 'Avaliar',
addRate: 'Adicionar tarifa',
findRate: 'Encontrar tarifa',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 41bd235140c..476838e82d1 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6538,7 +6538,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
workspaceNeeds: '一个工作区至少需要一个已启用的距离费率。',
distance: '距离',
centrallyManage: '集中管理费率,以英里或公里跟踪,并设置默认类别。',
- emptyRates: {title: '尚未设置距离费率', subtitle: '添加一个费率,以按自定义费率报销里程。'},
+ emptyRates: {title: '尚未设置里程费率', subtitle: '添加里程报销费率,以自定义报销标准。'},
rate: '评分',
addRate: '添加费率',
findRate: '查找费率',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
Updated |
|
@Krishna2323 back to you |
Reviewer Checklist
Screenshots/Videos |
Krishna2323
left a comment
There was a problem hiding this comment.
The empty state is unlikely to appear in normal user flows — workspaces always get a default distance rate, and the UI prevents deleting the last enabled rate. I couldn’t reproduce it without local code changes, but the implementation looks fine for the edge case.
|
@mjasikowski 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] |
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.17-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 I reviewed the changes in this PR against the help site files under No help site changes are required. This PR is a visual/structural refactor — it migrates the Distance rates page to the shared
Since nothing in the documented behavior changed, I did not create a draft PR. @luacmartins, if you'd like the empty state (or anything else here) reflected in the help site anyway, reply with |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
1 similar comment
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|





Explanation of Change
Migrate the policy distance rates page to the shared
Tablecomponent and add an empty state.Fixed Issues
$ #86210
Tests
Offline tests
N/A
QA Steps
Same as tests