diff --git a/frontend/src/components/Dashboard/RoundFace.tsx b/frontend/src/components/Dashboard/RoundFace.tsx index 3832a60..7289b3b 100644 --- a/frontend/src/components/Dashboard/RoundFace.tsx +++ b/frontend/src/components/Dashboard/RoundFace.tsx @@ -13,7 +13,7 @@ import { flushSync } from "react-dom" import { ErrorBoundary } from "react-error-boundary" import type { WidgetDef } from "@/client" import { slotsFor } from "@/components/Common/UplotChart" -import { fadeIn } from "@/lib/motion" +import { duration, fadeIn } from "@/lib/motion" import { useShortcuts } from "@/lib/shortcuts" import { cn } from "@/lib/utils" import { useClock } from "./ClockWidget" @@ -476,7 +476,11 @@ export function RoundView({ useEffect(() => { if (!announce) return - const timer = setTimeout(() => setAnnounce(false), ANNOUNCE_MS) + // Held for its whole time once faded in, as the docs and openpanel count it. + const timer = setTimeout( + () => setAnnounce(false), + duration.base * 1000 + ANNOUNCE_MS, + ) return () => clearTimeout(timer) }, [announce]) diff --git a/frontend/src/components/Dashboard/ui/core/ring.ts b/frontend/src/components/Dashboard/ui/core/ring.ts index 184546d..b2bba1a 100644 --- a/frontend/src/components/Dashboard/ui/core/ring.ts +++ b/frontend/src/components/Dashboard/ui/core/ring.ts @@ -133,7 +133,7 @@ export const turnsPage = (by: number, speed: number, size: number) => Math.sign(speed) === Math.sign(by) && Math.abs(speed) >= PAGE_FLING) -/** How long a change of dashboard shows which one it landed on. */ +/** How long a change of dashboard holds its name, once faded in. */ export const ANNOUNCE_MS = 1000 /**