From 8e7c6bc32502807c44064e8c625ed6fecf204995 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:44:45 -0400 Subject: [PATCH 1/7] [onboarding] First-run guided tour with spotlight + accent glow (#59, phase 1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New-user onboarding per docs/onboarding-plan.md: on the first login of a pubkey on a device, a skippable guided tour escorts the user around bitvid — a scrim dims the page with a spotlight CUTOUT over each step's anchor, ringed by a pulsing glow driven by the theme's accent tokens, plus an anchored popover with Back/Next/Skip, progress dots, and arrow/Esc keyboard nav. - js/ui/onboarding/tourEngine.js: dependency-free engine. Spotlight = one element whose 200vmax box-shadow (--surface-overlay-darker) dims everything except the cutout; an ::after ring animates between --color-accent and --color-accent-strong. Positioning via CSS custom properties set from JS (the sanctioned dynamic-var pattern; visual styling lives in an injected token-only stylesheet). Steps with missing anchors auto-skip, so one script serves all layouts. Repositions on resize/scroll. - js/ui/onboarding/bitvidTour.js: the step script (welcome → feeds → subscriptions → upload → profile → setup CTAs that deep-link into the storage and wallet panes via profileController.show). - js/services/onboardingService.js: once-per-pubkey-per-device flags (bitvid:onboarding:v1, settingsRestorePrompt-style). - app.maybeOfferOnboardingTour fires 3.5s after login (feed already rendered thanks to the warm cold-boot work; never blocks login); app.startOnboardingTour({force}) + a "Take the tour" button in the profile modal footer make it re-launchable. - Lint allowlists: tourEngine.js added to the inline-style allowlist (CSS-var positioning, VideoCard precedent) and the design-token ALLOWED_FILES (injected stylesheet geometry, RevertModal precedent) — all colors are tokens. Tests: tests/onboarding-tour.test.mjs (5 — flag lifecycle, tour render/advance/ finish, skip teardown, missing-anchor exclusion, once-vs-force offering, final CTA deep-link + completion). Lint + build green. Phases 2-4 (getting-started checklist, empty-state upgrades, fresh-npub create- account + key backup + kind-0 bootstrap) tracked in the plan + TODO #59. Co-Authored-By: Claude Opus 4.8 --- components/profile-modal.html | 8 + docs/onboarding-plan.md | 48 ++++ js/app.js | 44 ++++ js/services/onboardingService.js | 70 ++++++ js/ui/applicationBootstrap.js | 2 + js/ui/onboarding/bitvidTour.js | 91 ++++++++ js/ui/onboarding/tourEngine.js | 343 +++++++++++++++++++++++++++++ js/ui/profileModalController.js | 17 ++ scripts/check-design-tokens.mjs | 3 + scripts/check-inline-styles.mjs | 7 + tests/onboarding-tour.test.mjs | 167 ++++++++++++++ todo/TODO_2026-06-20_pre-launch.md | 24 ++ 12 files changed, 824 insertions(+) create mode 100644 docs/onboarding-plan.md create mode 100644 js/services/onboardingService.js create mode 100644 js/ui/onboarding/bitvidTour.js create mode 100644 js/ui/onboarding/tourEngine.js create mode 100644 tests/onboarding-tour.test.mjs diff --git a/components/profile-modal.html b/components/profile-modal.html index 310a20e8..39d716a6 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -1964,6 +1964,14 @@