From 53461d1142c2937d68061537b5c4736464f2ec8b Mon Sep 17 00:00:00 2001 From: Shuki Vaknin Date: Tue, 21 Jul 2026 22:12:32 +0300 Subject: [PATCH] feat(email-viewer): message spacing setting (auto/always/edge-to-edge) --- components/email/email-viewer.tsx | 21 +++++++++++++++++---- components/settings/reading-settings.tsx | 15 +++++++++++++++ locales/en/common.json | 7 +++++++ locales/he/common.json | 7 +++++++ stores/settings-store.ts | 11 +++++++++++ 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index 6fee7328..2de6340a 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -654,6 +654,7 @@ export function EmailViewer({ const tDemoWelcome = useTranslations('demo_welcome'); const tWelcome = useTranslations('welcome'); const externalContentPolicy = useSettingsStore((state) => state.externalContentPolicy); + const messageSpacing = useSettingsStore((state) => state.messageSpacing); const mailAttachmentAction = useSettingsStore((state) => state.mailAttachmentAction); const attachmentPosition = useSettingsStore((state) => state.attachmentPosition); const addTrustedSender = useSettingsStore((state) => state.addTrustedSender); @@ -2116,9 +2117,21 @@ export function EmailViewer({ // Word/Outlook HTML emails ship a ${effectiveEmailContent.html}`; - }, [effectiveEmailContent.html, effectiveEmailContent.isHtml, effectiveEmailContent.hasStyleTag, effectiveEmailContent.externalBlocked, isDark, emailHasNativeDarkMode]); + }, [effectiveEmailContent.html, effectiveEmailContent.isHtml, effectiveEmailContent.hasStyleTag, effectiveEmailContent.externalBlocked, isDark, emailHasNativeDarkMode, messageSpacing]); // Unblocking external content is handled by rebuilding the iframe srcDoc: // toggling allowExternalContent (both "Load images" and "Trust sender" set diff --git a/components/settings/reading-settings.tsx b/components/settings/reading-settings.tsx index 1a54f8f1..8ce27ab5 100644 --- a/components/settings/reading-settings.tsx +++ b/components/settings/reading-settings.tsx @@ -35,6 +35,7 @@ export function ReadingSettings() { hoverActionsCorner, hideInlineImageAttachments, attachmentImagePreviewsEnabled, + messageSpacing, updateSetting, } = useSettingsStore(); @@ -115,6 +116,20 @@ export function ReadingSettings() { )} + {!isSettingHidden('messageSpacing') && ( + +