From e5a953c11c66f9552328eb8ec47d660e8d50b7a6 Mon Sep 17 00:00:00 2001 From: Melvin Strobl Date: Thu, 15 Oct 2026 10:04:07 +0200 Subject: [PATCH] Name pill held its full 1000 ms once faded in, as the docs and openpanel count it --- frontend/src/components/Dashboard/RoundFace.tsx | 8 ++++++-- frontend/src/components/Dashboard/ui/core/ring.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Dashboard/RoundFace.tsx b/frontend/src/components/Dashboard/RoundFace.tsx index fb9f84c..07af71f 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 { useClock } from "./ClockWidget" import type { Dashboard } from "./DashboardView" @@ -441,7 +441,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 /**