From 476bc89e87e83943c64381bdbf0d791ce006e525 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Fri, 4 Dec 2026 09:28:46 +0800 Subject: [PATCH] fix(demo): comma in the demo line, result badges fade in one by one The scripted demo's line had a dash that real dictation would never produce; it is now "Save your fingers and type faster, free and unlimited." The demo's result badges appeared as one block. While the demo pins them they now fade in row by row (130 ms apart). A normal hover keeps the single fade. --- .../components/OutputToastsContainer.svelte | 42 +++++++++++++++++++ src/lib/services/demoService.ts | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/lib/components/OutputToastsContainer.svelte b/src/lib/components/OutputToastsContainer.svelte index 997f3c2..7066dad 100644 --- a/src/lib/components/OutputToastsContainer.svelte +++ b/src/lib/components/OutputToastsContainer.svelte @@ -417,6 +417,7 @@ SPDX-License-Identifier: MPL-2.0
{#if showPager || speedLabel} @@ -549,6 +550,47 @@ SPDX-License-Identifier: MPL-2.0 visibility 0s linear 0s; } + /* Scripted demo only: the rows arrive one after another, top to bottom (timing, + transcript, output), the order a real run produces them, instead of the + whole stack at once. The wrapper shows instantly so each row's own fade is + the only motion. A hover in normal use keeps the single 160ms fade above. */ + .chips-wrap.staggered.visible { + transition: none; + } + + .chips-wrap.staggered.visible > * { + animation: chip-in 220ms cubic-bezier(0.4, 0, 0.2, 1) backwards; + } + + .chips-wrap.staggered.visible > :nth-child(2) { + animation-delay: 130ms; + } + + .chips-wrap.staggered.visible > :nth-child(3) { + animation-delay: 260ms; + } + + .chips-wrap.staggered.visible > :nth-child(n + 4) { + animation-delay: 390ms; + } + + @keyframes chip-in { + from { + opacity: 0; + transform: translate3d(6px, 0, 0); + } + to { + opacity: 1; + transform: translate3d(0, 0, 0); + } + } + + @media (prefers-reduced-motion: reduce) { + .chips-wrap.staggered.visible > * { + animation: none; + } + } + /* Vertically centered on the 128px record button (the area is top-aligned with it). */ .history-indicator { position: absolute; diff --git a/src/lib/services/demoService.ts b/src/lib/services/demoService.ts index 41c2c1c..62b2098 100644 --- a/src/lib/services/demoService.ts +++ b/src/lib/services/demoService.ts @@ -37,7 +37,7 @@ export interface DemoOptions { } /** Canned transcription (the real slogan from the marketing site). */ -export const DEMO_TEXT = 'Save your fingers and type faster - free and unlimited.'; +export const DEMO_TEXT = 'Save your fingers and type faster, free and unlimited.'; /** Defaults shown in the options modal. */ export const DEFAULT_DEMO_OPTIONS: DemoOptions = {