diff --git a/desktop/src/features/settings/ui/SettingsPanels.tsx b/desktop/src/features/settings/ui/SettingsPanels.tsx index d2b439928c..07092372cc 100644 --- a/desktop/src/features/settings/ui/SettingsPanels.tsx +++ b/desktop/src/features/settings/ui/SettingsPanels.tsx @@ -1,4 +1,5 @@ import { useMemo, useState } from "react"; +import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { Archive, BellRing, @@ -32,6 +33,7 @@ import { LocalArchiveSettingsCard } from "@/features/local-archive/ui/LocalArchi import { cn } from "@/shared/lib/cn"; import { ACCENT_COLORS, + isBuzzTheme, NEUTRAL_ACCENT, useTheme, } from "@/shared/theme/ThemeProvider"; @@ -378,10 +380,23 @@ function SingleThemeTile({ type AppearanceMode = "system" | "light" | "dark"; +// Reveal/hide motion for the accent picker: a small translate + opacity fade. +// The picker sits below the theme grid and reads as tucking up behind it, so +// it enters from above (slides *down* into place when a non-Buzz theme reveals +// it) and exits upward (slides up behind the grid when Buzz hides it). No +// height/scale — height collapse clipped the swatches behind the grid's bottom +// fade (the "white bar"). Snappier than the modal 0.2s since this is a small +// settings control, sharing the modal/ProfileSettingsCard easing curve. +const ACCENT_PICKER_TRANSITION = { + duration: 0.16, + ease: [0.23, 1, 0.32, 1] as const, +}; + function ThemeSettingsCard() { const { setTheme, selectedThemeName, + themeName, isDark, accentColor, setAccentColor, @@ -389,6 +404,12 @@ function ThemeSettingsCard() { setFollowSystem, } = useTheme(); + // Buzz themes pin a neutral accent (GitHub black in light, white in dark), + // so the accent picker is hidden while a Buzz theme is active. `themeName` is + // the effective theme, so this also covers System mode resolving to Buzz. + const accentPickerHidden = isBuzzTheme(themeName); + const shouldReduceMotion = useReducedMotion(); + const previewVarsByTheme = useThemePreviewVars(); const { pairedLight, lightOnly, darkOnly } = useThemeCategories(); @@ -522,15 +543,19 @@ function ThemeSettingsCard() { "linear-gradient(to bottom, hsl(var(--background)), hsl(var(--background) / 0))", }} /> - {/* Bottom fade */} -