From 2b0300b0756d3be6fd3d6eea17a0e19624a520d1 Mon Sep 17 00:00:00 2001 From: Christopher Hight Date: Tue, 4 Aug 2026 09:05:30 -0700 Subject: [PATCH] Refactor continued of UI. changes to theme to make baselines --- .../components/dashboard/SettingsButton.jsx | 100 ++++++++++++------ client/src/pages/home/tabs/MyDashboard.jsx | 5 +- client/src/theme.js | 51 +++------ 3 files changed, 83 insertions(+), 73 deletions(-) diff --git a/client/src/components/dashboard/SettingsButton.jsx b/client/src/components/dashboard/SettingsButton.jsx index 2782712..c14ab21 100644 --- a/client/src/components/dashboard/SettingsButton.jsx +++ b/client/src/components/dashboard/SettingsButton.jsx @@ -60,50 +60,82 @@ export function SettingsButton() { return ( <> - {/* THE STATIC DROPDOWN MENU */} - - + {isEditing ? ( + // 📝 EDIT MODE: The 3-Pill Layout + + {/* 1. The Add Widget Button */} setIsLibraryOpen(true)} + color={{ base: "blue.500", _dark: "blue.300" }} + _hover={{ bg: "rgba(66, 153, 225, 0.1)" }} > - {/* size increased to 24 to match tabs. flexShrink: 0 is CRITICAL */} - - - {/* Dynamic text based on editing state! */} - - {isEditing ? "Editing Layout..." : "Dashboard Settings"} - + + Widget Library - - - - {isEditing ? ( - <> - - Save Layout - + {/* 2. The Save Button */} + + + Save Layout + - - Discard Changes - - - ) : ( - - Edit Layout + {/* 3. The Discard Button */} + + + Discard + + + ) : ( + // 👀 VIEW MODE: The Static Dropdown Menu + + + + {/* size increased to 24 to match tabs. flexShrink: 0 is CRITICAL */} + + Dashboard Settings + + + + + + + Edit Layout - )} - + - setIsLibraryOpen(true)} cursor="pointer" _hover={{WebkitTextStroke: "0.5px currentColor"}}> - Widget Library - - - - + setIsLibraryOpen(true)} + cursor="pointer" + _hover={{ WebkitTextStroke: "0.5px currentColor" }} + > + Widget Library + + + + + )} {/* THE WIDGET LIBRARY MODAL (Controlled by isLibraryOpen) */} { if (user?.preferences?.dashboard_layout && !hasHydrated.current) { @@ -96,7 +97,7 @@ export default function MyDashboard() { {/* NEW: The Positioner lifts the content out of the Flexbox flow */} - + }> diff --git a/client/src/theme.js b/client/src/theme.js index 6140c0d..4001470 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -179,43 +179,6 @@ const widgetRecipe = defineSlotRecipe({ } }); -// const glassPanelRecipe = defineSlotRecipe({ -// slots: ["root", "header", "body"], -// base: { -// root: { -// // Structure -// display: "flex", -// flexDirection: "column", -// width: "100%", -// height: "100%", -// position: "relative", -// overflow: "hidden", -// borderRadius: "3xl", -// -// // Glass Aesthetics (Syncs nicely with your sidebar/tabs) -// bg: { base: "rgba(255, 255, 255, 0.4)", _dark: "rgba(255, 255, 255, 0.04)" }, -// backdropFilter: "blur(12px)", -// WebkitBackdropFilter: "blur(12px)", -// border: "1px solid", -// borderColor: { base: "gray.200", _dark: "whiteAlpha.200" }, -// boxShadow: "sm", -// }, -// header: { -// display: "flex", -// justifyContent: "space-between", -// alignItems: "center", -// px: 3, -// py: 2, -// }, -// body: { -// flex: "1", -// overflow: "hidden", -// position: "relative", -// p: 1, -// } -// } -// }); - const glassPanelRecipe = defineSlotRecipe({ slots: ["root", "header", "body"], @@ -246,6 +209,20 @@ const glassPanelRecipe = defineSlotRecipe({ dropdown: { root: {borderRadius: "xl", p: 1} // (Header and body slots are ignored here because dropdowns don't use them) + }, + popover: { + root: { + borderRadius: "2xl", + p: 4, + boxShadow: "xl", + minW: "240px", + // OVERRIDES: Make the background 85-90% opaque instead of 40% + bg: { base: "rgba(255, 255, 255, 0.75)", _dark: "rgba(20, 22, 25, 0.8)" }, + + // OVERRIDES: Increase the blur just to smooth out any stubborn gridlines + backdropFilter: "blur(20px)", + WebkitBackdropFilter: "blur(20px)", + } } } },