Repository navigation
[No QA][Insights][R1][App] Render the chart inline table - #100807
cristipaval merged 29 commits into
Conversation
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.
|
…ia to the main bundle
|
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 |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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 8401d159..b7ccbf94 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -9690,6 +9690,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
title: 'Berichte zusammenführen',
description: 'Wählen Sie den Bericht aus, der beibehalten werden soll. Alle Ausgaben werden in ihn verschoben und die anderen Berichte werden gelöscht.',
},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} der Ausgaben`,
},
genericErrorPage: {
title: 'Ups, da ist etwas schiefgelaufen!',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index ee582c48..4779ee25 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -9887,6 +9887,7 @@ ${reportName}`,
title: 'Λήψη κατάστασης',
oneFeedAtATime: 'Παρακαλούμε επιλέγετε διακανονισμούς από μία ροή Κάρτας Expensify κάθε φορά.',
},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} των δαπανών`,
},
genericErrorPage: {
title: 'Ωχ, κάτι πήγε στραβά!',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index e8f40948..1b40ba43 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -9520,6 +9520,7 @@ ${reportName}`,
pleaseSelectDatesForBothFromAndTo: 'Por favor, selecciona fechas para Desde y Hasta',
},
mergeReports: {title: 'Combinar informes', description: 'Selecciona el informe que quieres conservar. Todos los gastos se moverán a él y los demás informes se eliminarán.'},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} del gasto`,
},
genericErrorPage: {
title: '¡Oh-oh, algo salió mal!',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index c57e0185..f8499ed7 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -9710,6 +9710,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
title: 'Fusionner des notes de frais',
description: 'Sélectionnez la note de frais à conserver. Toutes les dépenses y seront déplacées et les autres notes de frais seront supprimées.',
},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} des dépenses`,
},
genericErrorPage: {
title: 'Oups, quelque chose s’est mal passé !',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 99ae8352..197b7e50 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -9645,6 +9645,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
violationsBySubmitter: 'Violazioni da parte dell’autore dell’invio',
},
mergeReports: {title: 'Unisci report', description: 'Seleziona il report da mantenere. Tutte le spese verranno spostate al suo interno e gli altri report verranno eliminati.'},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} della spesa`,
},
genericErrorPage: {
title: 'Oops, qualcosa è andato storto!',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index c0450874..50729c98 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -9512,6 +9512,7 @@ ${reportName}`,
violationsBySubmitter: '申請者による違反',
},
mergeReports: {title: 'レポートをマージする', description: '保持するレポートを選択してください。すべての経費はそのレポートに移動され、他のレポートは削除されます。'},
+ percentOfSpend: ({percent}: {percent: string}) => `支出の${percent}`,
},
genericErrorPage: {
title: 'おっと、問題が発生しました!',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 510de3dc..82b97af5 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -9616,6 +9616,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
title: 'Rapporten samenvoegen',
description: 'Selecteer het rapport dat je wilt behouden. Alle uitgaven worden daarheen verplaatst en de andere rapporten worden verwijderd.',
},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} van de uitgaven`,
},
genericErrorPage: {
title: 'Oeps, er is iets misgegaan!',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 9403c8a3..f7bab70d 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -9636,6 +9636,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
violationsBySubmitter: 'Naruszenia przez zgłaszającego',
},
mergeReports: {title: 'Połącz raporty', description: 'Wybierz raport, który chcesz zachować. Wszystkie wydatki zostaną do niego przeniesione, a pozostałe raporty zostaną usunięte.'},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} wydatków`,
},
genericErrorPage: {
title: 'Ups, coś poszło nie tak!',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 7cde0d05..f51d6ffa 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -9616,6 +9616,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
title: 'Mesclar relatórios',
description: 'Selecione o relatório que você quer manter. Todas as despesas serão movidas para ele e os outros relatórios serão excluídos.',
},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} do gasto`,
},
genericErrorPage: {
title: 'Opa, algo deu errado!',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index e4c44270..ac5b4ead 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -9264,6 +9264,7 @@ ${reportName}`,
violationsBySubmitter: '提交人违规',
},
mergeReports: {title: '合并报表', description: '选择要保留的报表。所有费用都将移入该报表,其他报表将被删除。'},
+ percentOfSpend: ({percent}: {percent: string}) => `${percent} 的支出`,
},
genericErrorPage: {
title: '哎呀,出错了!',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
…rt, SearchLineChart)
Yeah so we want the horizontal dividers to extend all the way to the edge, and then we want the same padding on those rows as the main card so that everything lines up nicely on these orange "key lines" I'm showing here in this screenshot:
On these desktop cards that should |
|
It sure does make sense. Thanks for the explanation 🚀 |
|
@daledah @dannymcclain I've addressed both the new design and the review |
|
Awesome, let's get this back into a (final?) review. |
yes we can! I created an issue for this. I'm on it |
|
@daledah please prioritize this review when you're available |
|
@OlGierd03 please resolve conflict |
4f517e2
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 cristipaval has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
luacmartins
left a comment
There was a problem hiding this comment.
Nice! Great job on this one!
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 9.4.94-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.94-0 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
Every bar and pie chart on the Insights dashboard now renders the chart inline table below it. The line chart across the top of the page stays as it was. The Spend page charts are unchanged.
SearchBarChart,SearchLineChartandSearchPieChartstopped preparing their own data. Mapping moved up intoSearchChartView, which builds the series once through the newbuildChartSeriesand exposes the same prepared rows through the newrenderDetailsprop.SearchChartDataRowpairs each point with theGroupedItemit came from, so the chart and the table cannot disagree about values or ordering.PieChartContentgainedshouldShowLegend, whichSearchChartViewturns off wheneverrenderDetailsis supplied. The share comes from the backend aspercentOfTotal.The Insights page is gated behind the insightsPage beta and the table ships with it.
Note
getSliceColorsByDataIndexlives inbuildChartSeries.tsrather than next toprocessDataIntoSlicesinCharts/utils, because importing fromCharts/utilspulls@shopify/react-native-skiaeagerly into the main bundle and breaks the charts.Fixed Issues
$ #100657
Tests
Prerequisite: enable insightsPage in Account > Troubleshoot > Beta overrides, on an account with a few expenses across different merchants, categories and submitters.
Table rows
Loading, layout and regressions
Offline tests
The table adds no requests of its own and renders from the snapshot the chart already reads.
QA Steps
NoQA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
MacOS: Chrome / Safari
Screen.Recording.2026-09-24.at.11.16.48.mov