Repository navigation
[NoQA] [Insights] Render the Spend dashboard - #101218
luacmartins merged 17 commits 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 bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
🦜 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 683d254e..8d215b17 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1167,7 +1167,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'In Ausgaben anzeigen',
+ viewOnSpend: 'In Spend ansehen',
+ emptyState: {title: 'Nichts anzuzeigen', subtitle: 'Versuchen Sie, Ihre Kriterien oben anzupassen'},
+ noExpensesState: {title: 'Sehen Sie, wohin Ihr Geld fließt', subtitle: 'Sobald Sie Ausgaben haben, finden Sie Ausgabentrends, Top-Händler und mehr.'},
},
allSettingsScreen: {
subscription: 'Abonnement',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index a4b8cc02..9687b2f7 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -1217,6 +1217,8 @@ const translations: TranslationDeepObject<typeof en> = {
},
insightsPage: {
viewOnSpend: 'Προβολή στο Spend',
+ emptyState: {title: 'Τίποτα προς εμφάνιση', subtitle: 'Δοκιμάστε να προσαρμόσετε τα κριτήριά σας παραπάνω'},
+ noExpensesState: {title: 'Δείτε πού πηγαίνουν τα χρήματά σας', subtitle: 'Μόλις έχετε δαπάνες, θα βλέπετε τάσεις δαπανών, κορυφαίους εμπόρους και άλλα.'},
},
allSettingsScreen: {
subscription: 'Συνδρομή',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 69f656ee..c37b0278 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1166,7 +1166,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Ver en Gastos',
+ viewOnSpend: 'Ver en Spend',
+ emptyState: {title: 'Nada que mostrar', subtitle: 'Prueba a ajustar tus criterios de arriba'},
+ noExpensesState: {title: 'Ve adónde va tu dinero', subtitle: 'Una vez que tengas gastos, encontrarás tendencias de gasto, principales comercios y mucho más.'},
},
allSettingsScreen: {
subscription: 'Suscripcion',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 3f4fd128..99de7c4c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1170,7 +1170,12 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Voir dans Dépenses',
+ viewOnSpend: 'Voir dans Spend',
+ emptyState: {title: 'Rien à afficher', subtitle: 'Essayez de modifier vos critères ci-dessus'},
+ noExpensesState: {
+ title: 'Voyez où va votre argent',
+ subtitle: 'Une fois que vous aurez des dépenses, vous verrez des tendances de dépenses, les principaux marchands et plus encore.',
+ },
},
allSettingsScreen: {
subscription: 'Abonnement',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e0695363..2ff40109 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1167,7 +1167,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Visualizza in Spese',
+ viewOnSpend: 'Vedi in Spend',
+ emptyState: {title: 'Niente da mostrare', subtitle: 'Prova a modificare i criteri qui sopra'},
+ noExpensesState: {title: 'Scopri dove va il tuo denaro', subtitle: 'Una volta che avrai delle spese, troverai tendenze di spesa, principali esercenti e altro ancora.'},
},
allSettingsScreen: {
subscription: 'Abbonamento',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index d4262861..f03b7a9a 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1154,7 +1154,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: '支出で表示',
+ viewOnSpend: 'Spend で表示',
+ emptyState: {title: '表示するものはありません', subtitle: '上の条件を調整してみてください'},
+ noExpensesState: {title: 'お金の使い道を確認する', subtitle: '経費が登録されると、支出の傾向や上位の加盟店など、さまざまな情報を確認できるようになります。'},
},
allSettingsScreen: {
subscription: 'サブスクリプション',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 3d9157d2..3231c487 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1166,7 +1166,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Bekijken in Uitgaven',
+ viewOnSpend: 'Bekijken in Spend',
+ emptyState: {title: 'Niets om weer te geven', subtitle: 'Probeer je criteria hierboven aan te passen'},
+ noExpensesState: {title: 'Zie waar je geld naartoe gaat', subtitle: 'Zodra je uitgaven hebt, zie je bestedingspatronen, topverkopers en meer.'},
},
allSettingsScreen: {
subscription: 'Abonnement',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 93e61613..a0313454 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1185,7 +1185,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Zobacz w Wydatkach',
+ viewOnSpend: 'Zobacz w Spend',
+ emptyState: {title: 'Nic do wyświetlenia', subtitle: 'Spróbuj zmienić kryteria powyżej'},
+ noExpensesState: {title: 'Zobacz, na co idą twoje pieniądze', subtitle: 'Gdy będziesz mieć wydatki, zobaczysz trendy w wydawaniu, najważniejszych sprzedawców i więcej.'},
},
allSettingsScreen: {
subscription: 'Subskrypcja',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 50437502..1877a72c 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1166,7 +1166,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: 'Ver em Gastos',
+ viewOnSpend: 'Ver no Spend',
+ emptyState: {title: 'Nada para mostrar', subtitle: 'Tente ajustar seus critérios acima'},
+ noExpensesState: {title: 'Veja para onde vai o seu dinheiro', subtitle: 'Quando você tiver despesas, vai encontrar tendências de gastos, principais estabelecimentos e muito mais.'},
},
allSettingsScreen: {
subscription: 'Assinatura',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 60f5c157..4fc21d75 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1120,7 +1120,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
insightsPage: {
- viewOnSpend: '在支出中查看',
+ viewOnSpend: '在 Spend 中查看',
+ emptyState: {title: '没有可显示的内容', subtitle: '请尝试调整上面的条件'},
+ noExpensesState: {title: '查看你的资金流向', subtitle: '添加报销后,您就能查看消费趋势、主要商家等更多信息。'},
},
allSettingsScreen: {
subscription: '订阅',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
…Widget + other minor improvements
|
🚧 JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
This PR looks solid overall! I'm assuming that we'll add the tables in the follow-up PR, right? |
good catch, it's also been the case in Home, but here is much more noticeable. I set the web-only Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-09-22.at.14.19.36.mov |
|
Who else needs to approve so we can get this merged? |
|
🚧 luacmartins 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/luacmartins in version: 9.4.92-0 🚀
|
|
Deploy Blocker #102063 was identified to be related to this PR. |
|
Deploy Blocker #102066 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.4.92-8 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Renders the dashboard fetched via the
getInsightsaction in the Insights page. A headline chart above a grid of supporting ones, each card getting its rows and state from the snapshot the onyx record names for it.Doesn't include the design's inline tables and horizontal bar charts, as PRs for those are still in review, so they will be added later.
InsightsDashboardmoves into its own file and resolves the page state from that record.dashboardSpecsgains each chart's title, view and color, plus anisPolicyEligiblerule where a chart has one. Top spenders is the only one, soisPolicyEligibleForTopSpendersis lifted out of the Spend page's suggested-search visibility and shared. Some chart/widget-related elements become shared rather than copied: row derivation intouseGroupedItems, drill-down query building intochartDrillDown.ts,WidgetHeaderMenuintosrc/components, and chart errors/empty state components.The page has two different empty states:
InsightsNoExpensesStatewhen the record says the account has no expenses at all, with a "Create expense" button, andInsightsEmptyStatewhen it has expenses but none fall inside the filters.BarCharttakes acolor?: stringprop, so a chart names the color it is drawn in rather than choosing between the palette and one fixed default. Left out, each bar still takes its color from the palette by rank.getMemberSectionstakes an optionalonyxPersonalDetailsList, used when the snapshot carries no details for a member, cause the personal details are not send in the snapshots' data by theGetInsightcommand.Fixed Issues
$ #100652
$ #100654
PROPOSAL: N/A
Tests
insightsPagebeta.Offline tests
QA Steps
No tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-09-21.at.12.19.15.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-09-21.o.12.10.13.mov
Nagranie.z.ekranu.2026-09-21.o.11.08.54.mov
Nagranie.z.ekranu.2026-09-21.o.12.11.34.mov
Nagranie.z.ekranu.2026-09-21.o.12.16.35.mov