From c9ce5465bd5464326830ad61fbd13beae48b3c53 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 15 Dec 2023 15:24:18 -0500 Subject: [PATCH 1/2] update behavior adn code --- website/src/components/detailsToggle/index.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/src/components/detailsToggle/index.js b/website/src/components/detailsToggle/index.js index 90464328f8b..ba53192e54b 100644 --- a/website/src/components/detailsToggle/index.js +++ b/website/src/components/detailsToggle/index.js @@ -7,29 +7,29 @@ function detailsToggle({ children, alt_header = null }) { const [hoverTimeout, setHoverTimeout] = useState(null); const handleToggleClick = () => { - setOn(false); - setHoverActive(isOn); // Toggle hover activation based on current state - }; + setHoverActive(true); // Disable hover when clicked + setOn(current => !current); // Toggle the current state +}; - const handleMouseEnter = () => { - if (!hoverActive) return; // Ignore hover if disabled - const timeout = setTimeout(() => { - setOn(true); - }, 500); // 500ms delay - setHoverTimeout(timeout); - }; +const handleMouseEnter = () => { + if (isOn) return; // Ignore hover if already open + setHoverActive(true); // Enable hover + const timeout = setTimeout(() => { + if (hoverActive) setOn(true); + }, 500); + setHoverTimeout(timeout); +}; - const handleMouseLeave = () => { - if (hoverActive && !isOn) { +const handleMouseLeave = () => { + if (!isOn) { clearTimeout(hoverTimeout); setOn(false); - // isOn (false); can't be used here but setOn triggers a re-render - } - }; + } +}; - useEffect(() => { - return () => clearTimeout(hoverTimeout); - }, [hoverTimeout]); +useEffect(() => { + return () => clearTimeout(hoverTimeout); +}, [hoverTimeout]); return (
From 8c7913dee94d5ee88ad589de25b698b1d6780d86 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:38:53 -0500 Subject: [PATCH 2/2] Update _sl-faqs.md --- website/snippets/_sl-faqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/snippets/_sl-faqs.md b/website/snippets/_sl-faqs.md index 092929e1066..75583bfa2f6 100644 --- a/website/snippets/_sl-faqs.md +++ b/website/snippets/_sl-faqs.md @@ -44,7 +44,7 @@ If you're using the legacy Semantic Layer, we highly recommend you [upgrade your - + User data passes through the Semantic Layer on its way back from the warehouse. dbt Labs ensures security by authenticating through the customer's data warehouse. Currently, we don't cache data for the long term, but it might temporarily stay in the system for up to 10 minutes, usually less. In the future, we'll introduce a caching feature that allows us to cache data on our infrastructure for up to 24 hours.