Skip to content

feat(onboarding): dependency-free first-run product tour (UX-7)#502

Merged
TerrifiedBug merged 1 commit into
mainfrom
feat/ux-7-tour
Jun 8, 2026
Merged

feat(onboarding): dependency-free first-run product tour (UX-7)#502
TerrifiedBug merged 1 commit into
mainfrom
feat/ux-7-tour

Conversation

@TerrifiedBug

Copy link
Copy Markdown
Owner

UX-7 — guided first-run tour

Adds a lightweight, dependency-free guided tour that introduces a new user to VectorFlow's core surfaces. Builds on the already-shipped demo-pipeline + empty-state work; no tour library was added — the coachmark is assembled from existing primitives (Button, cn, Tailwind tokens) + getBoundingClientRect.

What's here

  • src/components/onboarding/product-tour.tsxProductTour, a self-contained coachmark:
    • ~4 steps { title, body, targetSelector } anchored to real elements: Pipelines nav, the "Create a demo pipeline" action, Fleet nav, Alerts nav.
    • A fixed role="dialog" card positioned beside the target via getBoundingClientRect (flips/clamps to the viewport), plus a highlight ring around the target.
    • Next / Back / Skip controls, a progress-dot row, and an sr-only "Step X of Y" counter.
    • Accessible: focusable card (focus moves to it on open/step change), labelled controls, aria-labelledby/aria-describedby, Esc to dismiss, motion-reduce aware.
    • Graceful no-op: a missing target anchors safely (centered) instead of crashing; auto-start is suppressed entirely when none of the targets exist on the page.
  • Persistence — completion/skip is stored in localStorage under vf:tour-dismissed (matching the existing onboarding-checklist vf:-prefixed convention), so the tour shows once per browser.
  • RestartstartProductTour() clears the flag and reopens; wired to a new "Take a tour" action in OnboardingChecklist.
  • Mounted once in the (dashboard) layout (alongside the command palette / shortcuts modal); the demo button carries a data-tour anchor.

Tests

src/components/onboarding/__tests__/product-tour.test.tsx (jsdom): step-1 render, Next advances / Back returns, Skip + Finish + Esc each persist the flag and unmount, dismissed → no auto-start but startProductTour() reopens, a missing target renders safely, and no-op when zero targets exist. localStorage is exercised via jsdom.

Verification

  • pnpm exec vitest run src/components/onboarding/__tests__/product-tour.test.tsx → 8 passing.
  • Existing onboarding-checklist.test.tsx → 5 passing (header change is compatible).
  • pnpm exec tsc --noEmit clean for all changed files (only the pre-existing @clickhouse/client error remains).

Note: the dashboard editor/onboarding UI is WebAuthn-gated and not visually verifiable in CI; unit tests + types are the bar here.

Walk new users through the core surfaces (pipelines, the demo-pipeline
action, the agent fleet, alerts) with a minimal self-contained coachmark
built from existing primitives — no tour library added.

- ProductTour: a focusable role="dialog" card anchored beside real
  elements via getBoundingClientRect, with Next/Back/Skip, a progress
  dot row, an SR step counter, and Esc-to-dismiss. Missing targets
  anchor safely (no crash); auto-start is suppressed when none exist.
- Persist completion/skip in localStorage ("vf:tour-dismissed", matching
  the onboarding-checklist convention) so it shows once per browser.
- startProductTour() (re)starts it; wired to a "Take a tour" action in
  the onboarding checklist. Mounted once in the (dashboard) layout.
- jsdom test covers step rendering, Next/Back, Skip/Finish/Esc
  persistence + unmount, restart, and missing-target safety.
@TerrifiedBug TerrifiedBug merged commit 0a6c0ed into main Jun 8, 2026
13 checks passed
@TerrifiedBug TerrifiedBug deleted the feat/ux-7-tour branch June 8, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant