From 3a4961e7745ab83a9fe2e975cdbaa980f81bc30b Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Wed, 4 Mar 2026 22:15:32 -0500 Subject: [PATCH] feat(settings): add Show Unread Counts toggle to Visual Tweaks Hides numeric counts on room and sidebar badges while keeping the dot indicator active. Defaults to on. Exposed in both Appearance and Cosmetics settings panels. --- src/app/components/unread-badge/UnreadBadge.tsx | 8 ++++++-- src/app/features/settings/cosmetics/Cosmetics.tsx | 10 ++++++++++ src/app/features/settings/cosmetics/Themes.tsx | 10 ++++++++++ src/app/state/settings.ts | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/app/components/unread-badge/UnreadBadge.tsx b/src/app/components/unread-badge/UnreadBadge.tsx index 6a62642a..9029cc9b 100644 --- a/src/app/components/unread-badge/UnreadBadge.tsx +++ b/src/app/components/unread-badge/UnreadBadge.tsx @@ -1,6 +1,8 @@ import { CSSProperties, ReactNode } from 'react'; import { Box, Badge, toRem, Text } from 'folds'; import { millify } from '$plugins/millify'; +import { useSetting } from '$state/hooks/settings'; +import { settingsAtom } from '$state/settings'; type UnreadBadgeProps = { highlight?: boolean; @@ -18,15 +20,17 @@ export function UnreadBadgeCenter({ children }: { children: ReactNode }) { } export function UnreadBadge({ highlight, count }: UnreadBadgeProps) { + const [showCounts] = useSetting(settingsAtom, 'showUnreadCounts'); + const showNumber = showCounts && count > 0; return ( 0 ? '400' : '200'} + size={showNumber ? '400' : '200'} fill="Solid" radii="Pill" outlined={false} > - {count > 0 && ( + {showNumber && ( {millify(count)} diff --git a/src/app/features/settings/cosmetics/Cosmetics.tsx b/src/app/features/settings/cosmetics/Cosmetics.tsx index 722d501c..7a21588d 100644 --- a/src/app/features/settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/settings/cosmetics/Cosmetics.tsx @@ -171,6 +171,7 @@ function IdentityCosmetics() { ); const [uniformIcons, setUniformIcons] = useSetting(settingsAtom, 'uniformIcons'); const [rightBubbles, setRightBubbles] = useSetting(settingsAtom, 'useRightBubbles'); + const [showUnreadCounts, setShowUnreadCounts] = useSetting(settingsAtom, 'showUnreadCounts'); return ( @@ -218,6 +219,15 @@ function IdentityCosmetics() { after={} /> + + + } + /> + ); } diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index ac666bdc..1440ae60 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -327,6 +327,7 @@ function PageZoomInput() { } export function Appearance() { const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji'); + const [showUnreadCounts, setShowUnreadCounts] = useSetting(settingsAtom, 'showUnreadCounts'); return ( @@ -346,6 +347,15 @@ export function Appearance() { } /> + + + } + /> + ); diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts index a68f8dfc..64dfe3d2 100644 --- a/src/app/state/settings.ts +++ b/src/app/state/settings.ts @@ -67,6 +67,7 @@ export interface Settings { rightSwipeAction: RightSwipeAction; hideMembershipInReadOnly: boolean; useRightBubbles: boolean; + showUnreadCounts: boolean; } const defaultSettings: Settings = { @@ -120,6 +121,7 @@ const defaultSettings: Settings = { rightSwipeAction: RightSwipeAction.Reply, hideMembershipInReadOnly: true, useRightBubbles: false, + showUnreadCounts: true, }; export const getSettings = () => {