From 2a24f8e5a071e72358ade2bfc886aa879e6a2640 Mon Sep 17 00:00:00 2001 From: kenny lopez Date: Wed, 12 Aug 2026 10:42:42 +0100 Subject: [PATCH] Decouple conversation font size and density Signed-off-by: kenny lopez --- .../ui/AppearanceSettingsControls.tsx | 62 +++++- .../features/settings/ui/SettingsPanels.tsx | 4 +- desktop/src/main.tsx | 2 + .../lib/conversationDensityPreference.ts | 2 +- .../conversationFontSizePreference.test.mjs | 56 +++++ .../lib/conversationFontSizePreference.ts | 84 ++++++++ desktop/src/shared/styles/globals/theme.css | 28 ++- desktop/tailwind.config.js | 4 +- .../tests/e2e/buzz-theme-screenshots.spec.ts | 201 ++++++++++++++---- .../e2e/inbox-refactor-screenshots.spec.ts | 14 ++ 10 files changed, 394 insertions(+), 63 deletions(-) create mode 100644 desktop/src/shared/lib/conversationFontSizePreference.test.mjs create mode 100644 desktop/src/shared/lib/conversationFontSizePreference.ts diff --git a/desktop/src/features/settings/ui/AppearanceSettingsControls.tsx b/desktop/src/features/settings/ui/AppearanceSettingsControls.tsx index c37ba8f259..bd7113a461 100644 --- a/desktop/src/features/settings/ui/AppearanceSettingsControls.tsx +++ b/desktop/src/features/settings/ui/AppearanceSettingsControls.tsx @@ -20,6 +20,12 @@ import { useConversationDensity, type ConversationDensity, } from "@/shared/lib/conversationDensityPreference"; +import { + previewConversationFontSize, + setConversationFontSize, + useConversationFontSize, + type ConversationFontSize, +} from "@/shared/lib/conversationFontSizePreference"; import { ACCENT_COLORS, DEFAULT_GLASS_OPACITY, @@ -105,6 +111,24 @@ const CONVERSATION_DENSITY_OPTIONS: readonly { }, ]; +const CONVERSATION_FONT_SIZE_OPTIONS: readonly { + value: ConversationFontSize; + label: string; +}[] = [ + { + value: "smaller", + label: "Smaller", + }, + { + value: "default", + label: "Default", + }, + { + value: "larger", + label: "Larger", + }, +]; + function ConversationDensityPreviewMessage({ avatar, author, @@ -138,18 +162,18 @@ function ConversationDensityPreviewMessage({ ); } -function ConversationDensityPreview() { +function ConversationPreview() { return ( -
+