From 62c82936e14d1dd5d7ca7d96b72e473f15b68449 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahdali Date: Fri, 12 Apr 2024 21:50:13 +0000 Subject: [PATCH 1/5] fix(#2563): Hide Y axis values of net worth graph when privacy mode is enabled --- .../src/components/reports/graphs/NetWorthGraph.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index f3974f7e4ec..653a3267853 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -17,6 +17,7 @@ import { type CSSProperties } from '../../../style'; import { AlignedText } from '../../common/AlignedText'; import { Container } from '../Container'; import { numberFormatterTooltip } from '../numberFormatter'; +import { usePrivacyMode } from '../../../hooks/usePrivacyMode'; type NetWorthGraphProps = { style?: CSSProperties; @@ -29,8 +30,10 @@ export function NetWorthGraph({ graphData, compact, }: NetWorthGraphProps) { + const privacyMode = usePrivacyMode(); + const tickFormatter = tick => { - return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas + return privacyMode ? '...' : `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas }; const gradientOffset = () => { From 32a513987bf68fccaa0f84c619ccacfdbe11fcc6 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahdali Date: Fri, 12 Apr 2024 21:58:02 +0000 Subject: [PATCH 2/5] chore(): add release notes --- upcoming-release-notes/2594.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 upcoming-release-notes/2594.md diff --git a/upcoming-release-notes/2594.md b/upcoming-release-notes/2594.md new file mode 100644 index 00000000000..f1fb41664c3 --- /dev/null +++ b/upcoming-release-notes/2594.md @@ -0,0 +1,6 @@ +--- +category: Fixes +authors: ttlgeek +--- + +Hide Y axis values of net worth graph when privacy mode is enabled. From 08d36b27f81da106eaba0205c3d49a0305ec8ff4 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahdali Date: Fri, 12 Apr 2024 21:59:16 +0000 Subject: [PATCH 3/5] chore(): Update release note category --- upcoming-release-notes/2594.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upcoming-release-notes/2594.md b/upcoming-release-notes/2594.md index f1fb41664c3..9e644366967 100644 --- a/upcoming-release-notes/2594.md +++ b/upcoming-release-notes/2594.md @@ -1,5 +1,5 @@ --- -category: Fixes +category: Bugfix authors: ttlgeek --- From 8c434e50048522e4e2c894f8e8ea0f0af4dafcbc Mon Sep 17 00:00:00 2001 From: Mohamed El Mahdali Date: Fri, 12 Apr 2024 22:00:32 +0000 Subject: [PATCH 4/5] chore(): fix release notes --- upcoming-release-notes/2594.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upcoming-release-notes/2594.md b/upcoming-release-notes/2594.md index 9e644366967..4ce8d1ca336 100644 --- a/upcoming-release-notes/2594.md +++ b/upcoming-release-notes/2594.md @@ -1,6 +1,6 @@ --- category: Bugfix -authors: ttlgeek +authors: [ttlgeek] --- Hide Y axis values of net worth graph when privacy mode is enabled. From 8e330ad5e27567ca6498986f9cda9eaaba423fa6 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahdali Date: Fri, 12 Apr 2024 22:04:47 +0000 Subject: [PATCH 5/5] chore(): lint code --- .../src/components/reports/graphs/NetWorthGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index 653a3267853..825e1ade772 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -12,12 +12,12 @@ import { ResponsiveContainer, } from 'recharts'; +import { usePrivacyMode } from '../../../hooks/usePrivacyMode'; import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; import { AlignedText } from '../../common/AlignedText'; import { Container } from '../Container'; import { numberFormatterTooltip } from '../numberFormatter'; -import { usePrivacyMode } from '../../../hooks/usePrivacyMode'; type NetWorthGraphProps = { style?: CSSProperties;