A local-first personal finance app
[AI] Fix Balance Forecast chart colors with custom themes (#8031)
Sebastián Malukb80128094f96
diff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.pngindex 78cc60ee3e..dcfed8eabd 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.pngindex 59b86aca24..98690d8c84 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.pngindex 3ff7a9e549..28bd85fc5e 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.pngindex fd93794070..80664bf460 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.pngindex 9860d5fdef..3b640bd0f2 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.pngindex a855a8d64a..0666df3bcc 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx b/packages/desktop-client/src/components/reports/reports/BalanceForecast.tsxindex 8c166af09e..578b5becb1 100644--- a/packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx+++ b/packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx@@ -413,19 +413,19 @@ function BalanceForecastInner({ widget }: BalanceForecastInnerProps) {offset="0%"stopColor={hasNegativeBalance- ? theme.errorText- : theme.noticeText+ ? theme.reportsNumberNegative+ : theme.reportsChartFill}/>) : (<><stopoffset={`${zeroCrossingGradientOffset}%`}- stopColor={theme.noticeText}+ stopColor={theme.reportsChartFill}/><stopoffset={`${zeroCrossingGradientOffset}%`}- stopColor={theme.errorText}+ stopColor={theme.reportsNumberNegative}/></>)}@@ -497,11 +497,11 @@ function BalanceForecastInner({ widget }: BalanceForecastInnerProps) {{showsTodayReferenceLine && (<ReferenceLinex={todayReferenceDate}- stroke={theme.noticeText}+ stroke={theme.reportsBlue}strokeDasharray="4 4"label={{value: t('Today'),- fill: theme.noticeText,+ fill: theme.reportsBlue,fontSize: 12,position: 'insideTop',offset: 8,diff --git a/packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx b/packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsxindex 1e41fa1ab3..93ecf646d3 100644--- a/packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx+++ b/packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx@@ -268,19 +268,19 @@ export function BalanceForecastCard({offset="0%"stopColor={hasNegativeBalance- ? theme.errorText- : theme.noticeText+ ? theme.reportsNumberNegative+ : theme.reportsChartFill}/>) : (<><stopoffset={`${zeroCrossingGradientOffset}%`}- stopColor={theme.noticeText}+ stopColor={theme.reportsChartFill}/><stopoffset={`${zeroCrossingGradientOffset}%`}- stopColor={theme.errorText}+ stopColor={theme.reportsNumberNegative}/></>)}@@ -320,7 +320,7 @@ export function BalanceForecastCard({{showsTodayReferenceLine && (<ReferenceLinex={todayReferenceDate}- stroke={theme.noticeText}+ stroke={theme.reportsBlue}strokeDasharray="4 4"/>)}diff --git a/upcoming-release-notes/8031.md b/upcoming-release-notes/8031.mdnew file mode 100644index 0000000000..0cbeb0cd2f--- /dev/null+++ b/upcoming-release-notes/8031.md@@ -0,0 +1,6 @@+---+category: Bugfixes+authors: [samaluk]+---++Fix Balance Forecast chart line colors with custom themes by using report color tokens instead of notice/error text colors.