From bc9fbaae6e3395e7ac374381eb98a6c0df78e483 Mon Sep 17 00:00:00 2001 From: vkuchenik Date: Mon, 5 Oct 2026 15:21:51 -0700 Subject: [PATCH] wip - committing to check out another branch --- .../Widgets/settings/AlertChangeSettings.jsx | 12 +++++---- client/src/pages/home/tabs/MyDashboard.jsx | 26 ++++++++++--------- client/src/theme.js | 13 +++++++++- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/client/src/components/Widgets/settings/AlertChangeSettings.jsx b/client/src/components/Widgets/settings/AlertChangeSettings.jsx index bc1103b..b4b041f 100644 --- a/client/src/components/Widgets/settings/AlertChangeSettings.jsx +++ b/client/src/components/Widgets/settings/AlertChangeSettings.jsx @@ -4,21 +4,23 @@ import {useDashboardStore} from "@/store/useDashboardStore.jsx"; export default function IvansAlertsSettings({ widgetId, currentSettings }) { const updateSettings = useDashboardStore(state => state.updateWidgetSettings); + console.log("currentSettings:", currentSettings); + return ( - + {/* SLIDER DATE RANGE SELECTION */} { + console.log("change end", e); const day = new Date(Date.now() - (e.value[0])*86400000).toLocaleDateString('en-CA'); - console.log("new start: ", day); updateSettings(widgetId, {...currentSettings, startDate: day}); }} > - {currentSettings?.endDate} to {currentSettings?.startDate} + {currentSettings?.startDate} to {currentSettings?.endDate} diff --git a/client/src/pages/home/tabs/MyDashboard.jsx b/client/src/pages/home/tabs/MyDashboard.jsx index 8fcc8f8..3dc9f98 100644 --- a/client/src/pages/home/tabs/MyDashboard.jsx +++ b/client/src/pages/home/tabs/MyDashboard.jsx @@ -29,9 +29,11 @@ export default function MyDashboard() { const hasHydrated = useRef(false); // 1. Pull the global slot recipes - const recipe = useSlotRecipe({key: "glassPanel"}); - const styles = recipe({ layout: "widget" }); - const popoverStyles = recipe({ layout: "popover" }); + const glassPanelRecipe = useSlotRecipe({key: "glassPanel"}); + const glassPanelStyles = glassPanelRecipe(); + const widgetStyles = glassPanelRecipe({ layout: "widget" }); + const widgetSettingsRecipe = useSlotRecipe({ key: "widgetSettings" }); + const widgetSettingsStyles = widgetSettingsRecipe(); // 2. Populate widgets useEffect(() => { @@ -67,7 +69,7 @@ export default function MyDashboard() { return ( <> - + {registryEntry.name} @@ -82,8 +84,8 @@ export default function MyDashboard() { {/* NEW: The Positioner lifts the content out of the Flexbox flow */} - - + + {/*className={`${glassPanelStyles.root} ${widgetSettingsStyles.root}`}>*/} }> - + @@ -105,7 +107,7 @@ export default function MyDashboard() { // Fallback if someone asks for a widget that doesn't exist return ( - + Error Widget '{widget.type}' not found. @@ -129,12 +131,12 @@ export default function MyDashboard() { {widgets.map(widget => ( @@ -163,7 +165,7 @@ export default function MyDashboard() { {/* SUSPENSE BOUNDARY wrapping the render function */} + }> diff --git a/client/src/theme.js b/client/src/theme.js index 53edb4f..f530bb5 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -304,6 +304,16 @@ const homeRecipe = defineSlotRecipe({ }, }) +const widgetSettingsRecipe = defineSlotRecipe({ + slots: ["root"], + base: { + root: { + w: "100%", + h: "500px", + bg: "red", + } + } +}) // const canvasRecipe = defineRecipe({ // base: { // bg: "{transparent}", @@ -428,7 +438,7 @@ const glassPanelRecipe = defineSlotRecipe({ popover: { root: { borderRadius: "2xl", - p: 0, + p: 2, boxShadow: "xl", minW: "240px", maxW: "60%", @@ -775,6 +785,7 @@ const config = defineConfig({ header: headerRecipe, sidebar: sidebarRecipe, // widget: widgetRecipe, + widgetSettings: widgetSettingsRecipe, glassPanel: glassPanelRecipe, home: homeRecipe, },