From 1d769ed564a5ea93d5aa98564a8d6b7263f8a3b0 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Wed, 9 Sep 2026 10:59:55 +0700 Subject: [PATCH] Onboarding: "Save your login" banner + collapse FAQ to reduce load (1.3.7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two greenlit onboarding improvements, keeping the existing layout intact. #5 Save-your-login banner (the safety one): - Right under the green "You're in!" bar, logged-in users who haven't backed up see a prominent amber banner — "Save your login — do this now" — that taps straight to Security settings. It reads the shared `backup-confirmed` flag (same source of truth as BackupReminder), so it PERSISTS until they actually back up; unlike the dismissible reminder sheet, it can't silently turn into "never". Once confirmed it flips to a calm green "Login saved" note. Plain language ("save your login", not "back up your nsec"). Pulse dot respects reduced-motion. #1 Lighten first-glance load: - The 9-item FAQ ("Common questions") is now a collapse-by-default section — one tidy row until tapped — via a small reusable CollapsibleSection (aria-expanded, reduced-motion aware). Nothing removed; the page just feels lighter on arrival. Co-authored-by: shakespeare.diy --- package.json | 2 +- src/pages/OnboardingPage.tsx | 85 ++++++++++++++++++++++++++++++++++-- 2 files changed, 83 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 69816f2..d5b7f70 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "skate-spots", "private": true, - "version": "1.3.6", + "version": "1.3.7", "type": "module", "homepage": "https://skate-spots.com", "scripts": { diff --git a/src/pages/OnboardingPage.tsx b/src/pages/OnboardingPage.tsx index 8e87ae0..d9ba0d1 100644 --- a/src/pages/OnboardingPage.tsx +++ b/src/pages/OnboardingPage.tsx @@ -35,6 +35,7 @@ import { MessageCircle, Lock, Users, + Download, } from 'lucide-react'; import { FounderFollow } from '@/components/FounderFollow'; @@ -69,6 +70,47 @@ function FAQ({ q, a }: { q: string; a: React.ReactNode }) { ); } +// ─── Collapsible section ────────────────────────────────────────────────────── +// Keeps heavier, optional content (Nostr explainer, FAQ) tucked away by default +// so the page feels light on arrival — tap to expand. Reduces first-glance +// cognitive load without removing anything. +function CollapsibleSection({ + title, + icon, + defaultOpen = false, + children, +}: { + title: string; + icon?: React.ReactNode; + defaultOpen?: boolean; + children: React.ReactNode; +}) { + const [open, setOpen] = useState(defaultOpen); + return ( +
+ + {open && ( +
+ {children} +
+ )} +
+ ); +} + // ─── Feature pill ───────────────────────────────────────────────────────────── function FeaturePill({ emoji, label }: { emoji: string; label: string }) { return ( @@ -90,6 +132,10 @@ export default function OnboardingPage() { const { toast } = useToast(); const [showRelayEducation, setShowRelayEducation] = useState(false); const [, setHasSeenRelayEducation] = useLocalStorage('seen-relay-education', false); + // Shared with BackupReminder — the single source of truth for "has the user + // saved their login/key?". The banner below stays until this is true, so + // "remind me later" can never silently become "never" for this critical step. + const [backupConfirmed] = useLocalStorage('backup-confirmed', false); const handleRelayEducationComplete = () => { setShowRelayEducation(false); @@ -169,7 +215,7 @@ export default function OnboardingPage() { {/* ── Logged in: step 1 complete ── */} {user && ( -
+
@@ -183,6 +229,38 @@ export default function OnboardingPage() {
)} + {/* ── Save your login (critical) — stays until actually backed up ── */} + {user && !backupConfirmed && ( + +
+
+
+ +
+ +
+
+

Save your login — do this now

+

+ It's the only way back into your account. Lose it and there's no reset — no email, no password recovery. +

+
+
+ + Save +
+
+ + )} + + {/* ── Login saved confirmation ── */} + {user && backupConfirmed && ( +
+ +

Login saved — your account is safe to recover.

+
+ )} +
{/* ── Why skaters care ── */} @@ -347,9 +425,9 @@ export default function OnboardingPage() {

💡 $5 of Bitcoin = hundreds of zaps to spread across the community

- {/* ── FAQ ── */} + {/* ── FAQ (collapsed by default to keep the page light) ── */}
-

Common questions

+
+
{/* ── Final CTA ── */}