From 2ea0cfec9668c9cce2b8e9dd1a4a1095f18f1c7f Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Thu, 14 May 2026 00:33:39 +0200 Subject: [PATCH] =?UTF-8?q?fix(mail):=20donut=20card=20layout=20from=20scr?= =?UTF-8?q?atch=20=E2=80=94=20center,=20breathing=20room,=20no=20truncatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Feedback nach mehreren Iterationen: vorheriges Layout war kaputt (Donut zu klein, Total links statt im Center, Legend mit "G.." truncated). Frischer Ansatz: - DONUT_WIDTH 180 → 200 (Center-Number-Math passt, sitzt sauber im Bogen-Hohlraum) - Container: flex-row, alignItems center, justifyContent center, gap 20 - KEIN flexShrink/maxWidth am Legend-Wrapper mehr (war Ursache des Quetschens) - Truncation nur am einzelnen Text-Element via maxWidth: 160 + numberOfLines: 1 (statt am ganzen Wrapper) — schützt nur extrem lange Domains - Donut + Legend nehmen ihre natural-width, Container zentriert beides Plus i18n: "Blockiert — letzte 30 Tage" → "Blockiert" (DE+EN). Das hardcoded 30 war falsch wenn die Connection nur 2 Tage Daten hat. Echte Range-Info kommt schon aus dem Sublabel "N Mails blockiert · M letzte Woche". Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/mail/MailDistributionChart.tsx | 13 ++++++++++--- apps/rebreak-native/locales/de.json | 2 +- apps/rebreak-native/locales/en.json | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/rebreak-native/components/mail/MailDistributionChart.tsx b/apps/rebreak-native/components/mail/MailDistributionChart.tsx index 12d09cd..a9da37f 100644 --- a/apps/rebreak-native/components/mail/MailDistributionChart.tsx +++ b/apps/rebreak-native/components/mail/MailDistributionChart.tsx @@ -98,14 +98,21 @@ export function MailDistributionChart({ data, hero, totalBlocked, isLegend }: Pr paddingBottom: 12, }} > - + - + {slices.map((slice) => ( ))} @@ -163,10 +170,10 @@ function LegendRow({ /> diff --git a/apps/rebreak-native/locales/de.json b/apps/rebreak-native/locales/de.json index c5c56e0..c48b42d 100644 --- a/apps/rebreak-native/locales/de.json +++ b/apps/rebreak-native/locales/de.json @@ -455,7 +455,7 @@ "more_infos_title": "Mehr Infos", "more_infos_subtitle": "Blockiert — letzte 30 Tage", "stats": { - "blocked_per_day_heading": "Blockiert — letzte 30 Tage", + "blocked_per_day_heading": "Blockiert", "blocked_per_day_sublabel": "%{total} Mails blockiert · %{avg} letzte Woche", "blocked_per_week_heading": "Blockiert — letzte Wochen", "blocked_per_month_heading": "Blockiert — letzte Monate", diff --git a/apps/rebreak-native/locales/en.json b/apps/rebreak-native/locales/en.json index 8d072d6..495d9e8 100644 --- a/apps/rebreak-native/locales/en.json +++ b/apps/rebreak-native/locales/en.json @@ -455,7 +455,7 @@ "more_infos_title": "More Info", "more_infos_subtitle": "Blocked — last 30 days", "stats": { - "blocked_per_day_heading": "Blocked — last 30 days", + "blocked_per_day_heading": "Blocked", "blocked_per_day_sublabel": "%{total} mails blocked · %{avg} last week", "blocked_per_week_heading": "Blocked — recent weeks", "blocked_per_month_heading": "Blocked — recent months",