Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(onboarding): refine demo celebration and calendar states (#2595)

clarkmaanac7604999e38
diff --git a/src/components/onboarding/CalendarConnectionsStep.tsx b/src/components/onboarding/CalendarConnectionsStep.tsx
index d9c8861f9..ab7b82bb3 100644
--- a/src/components/onboarding/CalendarConnectionsStep.tsx
+++ b/src/components/onboarding/CalendarConnectionsStep.tsx
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from "react";
-import { CircleCheck, FileSearch, Loader2, MessageCircle, UsersRound } from "../icons";
+import { CircleCheck, FileText, Loader2, MessageCircle, UsersRound } from "../icons";
import { useTranslation } from "react-i18next";
import { Button } from "../ui/button";
import { useSettingsStore } from "../../stores/settingsStore";
@@ -157,7 +157,7 @@ export default function CalendarConnectionsStep() {
<ul className="flex flex-col gap-2.5">
{[
[MessageCircle, t("onboarding.rehaul.notes.hero.chat")],
- [FileSearch, t("onboarding.rehaul.notes.hero.transcript")],
+ [FileText, t("onboarding.rehaul.notes.hero.transcript")],
[UsersRound, t("onboarding.rehaul.notes.hero.speakers")],
].map(([Icon, label]) => (
<li
@@ -165,7 +165,9 @@ export default function CalendarConnectionsStep() {
className="flex items-center gap-1.5 text-xs leading-[1.32] text-[var(--onboarding-text-primary)]"
>
<span className="flex size-[18px] shrink-0 items-center justify-center rounded-full bg-[color-mix(in_srgb,var(--onboarding-accent)_8%,transparent)] text-[var(--onboarding-accent)]">
- <Icon className="size-2.5" strokeWidth={0.833} />
+ {/* Default stroke: these sit on a 24-unit grid, so Figma's pixel
+ stroke values would scale down with the glyph and vanish. */}
+ <Icon className="size-3" />
</span>
{String(label)}
</li>
@@ -183,18 +185,16 @@ export default function CalendarConnectionsStep() {
{providers.map((provider, index) => (
<div
key={provider.id}
- className={`flex items-center gap-[14px] ${
+ className={`flex items-center gap-3 ${
index === 0
? "pb-2.5"
: "border-t border-[var(--onboarding-control-border)] py-2.5 last:pb-0"
}`}
>
- {/* Frame 2147258981 — 44x44 tile, 1px surface stroke, rx 9.5, with a 24px
- glyph inset. The stroke lives here rather than in each asset so all
- three providers match; the 48px sources land exactly 2x at 24px.
- No fill: the frame has stroke only, so the row's surface reads
- through. Do not re-add bg-[var(--onboarding-surface)]. */}
- <span className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-[var(--onboarding-control-border)]">
+ {/* The logos sit straight on the row, with no tile: they carry their own
+ shapes and colour, and a framed box around each only added noise.
+ 24px so the 48px sources land at exactly 2x. */}
+ <span className="flex size-7 shrink-0 items-center justify-center">
<img
src={provider.icon}
alt=""
@@ -205,7 +205,7 @@ export default function CalendarConnectionsStep() {
draggable={false}
// contain, not cover: the Microsoft export is 51x48, so it
// letterboxes instead of stretching.
- className="size-5 select-none object-contain"
+ className="size-6 select-none object-contain"
/>
</span>
<div className="flex min-w-0 flex-1 flex-col gap-[3px] text-start">
@@ -216,13 +216,12 @@ export default function CalendarConnectionsStep() {
{provider.description}
</p>
</div>
- {/* Figma "Frame 25", both states: pad 6 14, radius 38, 14/140% medium
- white. Deliberately a plain button, not the shadcn Button — that
- default variant layers on shadow-sm, hover:shadow, a
- border-primary/60 and font-semibold, none of which the spec has. */}
+ {/* Connected is a status, not an action, so it matches the permissions
+ step's "Enabled" pill (accent tint, accent text) rather than a solid
+ fill that read as a second primary button next to Continue. */}
{provider.connected ? (
- <span className="inline-flex shrink-0 items-center justify-center gap-1.5 rounded-[38px] bg-[var(--onboarding-accent)] px-3 py-1.5 text-xs font-medium leading-[1.4] text-[var(--onboarding-accent-foreground)]">
- <CircleCheck className="size-3.5 shrink-0" strokeWidth={1.167} />
+ <span className="inline-flex h-8 min-w-20 shrink-0 items-center justify-center gap-1 rounded-full bg-[color-mix(in_srgb,var(--onboarding-accent)_12%,transparent)] px-2.5 text-xs font-normal text-[var(--onboarding-accent)]">
+ <CircleCheck className="size-3.5 shrink-0" aria-hidden="true" />
{t(`integrations.${provider.id}Calendar.connected`)}
</span>
) : (
diff --git a/src/components/onboarding/DemoStep.tsx b/src/components/onboarding/DemoStep.tsx
index e6f7f8132..2bd1807af 100644
--- a/src/components/onboarding/DemoStep.tsx
+++ b/src/components/onboarding/DemoStep.tsx
@@ -20,51 +20,27 @@ import founderAvatar from "../../assets/onboarding-founder.webp";
import gmailMark from "../../assets/icons/gmail.svg";
/**
- * The dictation success celebration: canvas-confetti's "school pride" effect —
- * two cannons firing continuously from the left and right edges while the middle
- * of the screen stays readable.
+ * The dictation success celebration: one soft burst from each side edge, angled
+ * inward and up so the middle of the screen stays readable.
*
- * Differences from the upstream demo, all deliberate. It runs for under two
- * seconds instead of thirty, because this fires on a success state and not a
- * permanent page decoration. The per-frame particle count tapers with the
- * remaining time so the streams thin out instead of stopping mid-air. The loop is
- * cancelled on unmount — the demo is a bare IIFE with no teardown, which in React
- * would keep firing into a detached canvas. And reduced motion skips the loop
- * outright rather than scheduling ~100 frames of no-ops.
- *
- * Colours are sampled from the reference artwork; `scalar` sizes the pieces (1 is
- * canvas-confetti's default).
+ * One volley of ~70 small pieces in the onboarding blues plus one warm accent,
+ * settling in about a second: an acknowledgement, not a continuous stream.
*/
const CONFETTI_BASE = {
- // Sampled from the reference artwork: gold and yellow through orange, then teal,
- // blue, magenta, purple and green.
- colors: [
- "#f5d400",
- "#f5c518",
- "#f07800",
- "#f04800",
- "#00d0bc",
- "#2e6be6",
- "#d8005f",
- "#8e1a78",
- "#5fa82a",
- ],
+ // --color-primary and two lighter tints of it, plus one warm accent.
+ colors: ["#4577e9", "#7da2f2", "#b9cdf8", "#f5c518"],
shapes: ["circle", "square"] as ("circle" | "square")[],
- scalar: 1.3,
- spread: 55,
- startVelocity: 45,
- gravity: 1,
- decay: 0.9,
- ticks: 200,
+ particleCount: 36,
+ scalar: 0.85,
+ spread: 50,
+ startVelocity: 38,
+ gravity: 0.9,
+ decay: 0.91,
+ ticks: 140,
// canvas-confetti opts out natively; the CSS in index.css cannot reach a canvas.
disableForReducedMotion: true,
};
-/** Long enough to register as a celebration, short enough not to be decoration. */
-const STREAM_DURATION_MS = 1800;
-/** Per side, per frame, at full strength; tapers to 1 as the streams wind down. */
-const STREAM_PARTICLES = 7;
-
function ConfettiLayer() {
const canvasRef = useRef<HTMLCanvasElement>(null);
@@ -74,34 +50,14 @@ function ConfettiLayer() {
// useWorker: false on purpose. The worker path hands the canvas to an
// OffscreenCanvas, which can only be transferred once, and StrictMode mounts
- // effects twice in dev — the second pass throws. ~90 particles for 1.5s on the
- // main thread costs nothing next to that.
+ // effects twice in dev — the second pass throws.
const fire = confetti.create(canvas, { resize: true, useWorker: false });
- // canvas-confetti already no-ops per call under reduced motion, but bail
- // before the loop so we don't schedule ~100 frames of nothing.
- if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
+ // 60 from the left edge and 120 from the right both angle inward and up.
+ void fire({ ...CONFETTI_BASE, angle: 60, origin: { x: 0, y: 0.7 } });
+ void fire({ ...CONFETTI_BASE, angle: 120, origin: { x: 1, y: 0.7 } });
- const end = performance.now() + STREAM_DURATION_MS;
- let frameId = 0;
-
- const frame = (now: number) => {
- const remaining = Math.max(0, (end - now) / STREAM_DURATION_MS);
- const shared = {
- ...CONFETTI_BASE,
- particleCount: Math.max(1, Math.round(STREAM_PARTICLES * remaining)),
- };
- // 60 from the left edge and 120 from the right both angle inward and up.
- void fire({ ...shared, angle: 60, origin: { x: 0 } });
- void fire({ ...shared, angle: 120, origin: { x: 1 } });
- if (now < end) frameId = requestAnimationFrame(frame);
- };
- frameId = requestAnimationFrame(frame);
-
- return () => {
- cancelAnimationFrame(frameId);
- fire.reset();
- };
+ return () => fire.reset();
}, []);
// Escape the transformed onboarding step so the fixed canvas spans the full
@@ -134,12 +90,13 @@ function FounderAvatar() {
);
}
-// Figma "Frame 25"/"Frame 27": pill on surface/brand, radius 38, 10/20 padding,
-// Inter Medium 14/140% in light/surface-primary.
+// Figma "Frame 25"/"Frame 27": bubble on surface/brand, 10/20 padding, Inter
+// Medium 14/140% in light/surface-primary. Radius 16 rather than the spec's 38:
+// the second message wraps, and a full pill radius turned two lines into a blob.
function FounderBubble({ children }: { children: ReactNode }) {
return (
<p
- className="w-fit rounded-[38px] bg-[var(--onboarding-accent)] px-4 py-2 text-sm font-medium leading-[1.4] text-[var(--onboarding-accent-foreground)]"
+ className="w-fit rounded-2xl bg-[var(--onboarding-accent)] px-4 py-2 text-sm font-medium leading-[1.4] text-[var(--onboarding-accent-foreground)]"
style={BUBBLE_IN}
>
{children}
@@ -235,10 +192,10 @@ function TypingBubble() {
const { t } = useTranslation();
return (
- // Figma "Onboarding / Frame 25": pill on light/surface-stroke, radius 38,
- // 10/20 padding, hugging the dots row.
+ // Figma "Onboarding / Frame 25": on light/surface-stroke, 10/20 padding,
+ // hugging the dots row. Radius matches FounderBubble.
<div
- className="flex items-center rounded-[38px] bg-[var(--onboarding-control-border)] px-4 py-2"
+ className="flex items-center rounded-2xl bg-[var(--onboarding-control-border)] px-4 py-2"
style={BUBBLE_IN}
aria-label={t("onboarding.rehaul.demo.typing")}
>