From 87b5aff4782c0d9d94eff04c52eeace8f528a051 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Thu, 2 Apr 2026 21:13:14 +0200 Subject: [PATCH] feat: implement onboarding guide and HTML export guide Add 4-step dismissible onboarding overlay shown on first feed visit (welcome, upload, hashtags, PIN importance). Dismissed state persisted in localStorage under eventsnap_guide_seen. Step indicator dots and skip/continue buttons included. Update HTML export guide modal to persist the eventsnap_html_guide_seen flag: first download shows the instructions modal; subsequent clicks go straight to download without interruption. Co-Authored-By: Claude Sonnet 4.6 --- .../src/lib/components/OnboardingGuide.svelte | 85 +++++++++++++++++++ frontend/src/routes/export/+page.svelte | 9 +- frontend/src/routes/feed/+page.svelte | 4 + 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/OnboardingGuide.svelte diff --git a/frontend/src/lib/components/OnboardingGuide.svelte b/frontend/src/lib/components/OnboardingGuide.svelte new file mode 100644 index 0000000..58c8167 --- /dev/null +++ b/frontend/src/lib/components/OnboardingGuide.svelte @@ -0,0 +1,85 @@ + + +{#if visible} + +
+
+ +
+ {#each steps as _, i} +
+ {/each} +
+ + +
+
{steps[step].icon}
+

{steps[step].title}

+

{steps[step].body}

+
+ + +
+ + +
+
+
+{/if} diff --git a/frontend/src/routes/export/+page.svelte b/frontend/src/routes/export/+page.svelte index d9fd7e8..e0eb76f 100644 --- a/frontend/src/routes/export/+page.svelte +++ b/frontend/src/routes/export/+page.svelte @@ -16,6 +16,8 @@ html: JobStatus; } + const HTML_GUIDE_KEY = 'eventsnap_html_guide_seen'; + let status = $state(null); let showHtmlGuide = $state(false); let loading = $state(true); @@ -75,10 +77,15 @@ } function downloadHtml() { - showHtmlGuide = true; + if (localStorage.getItem(HTML_GUIDE_KEY)) { + window.location.href = '/api/v1/export/html'; + } else { + showHtmlGuide = true; + } } function confirmHtmlDownload() { + localStorage.setItem(HTML_GUIDE_KEY, '1'); showHtmlGuide = false; window.location.href = '/api/v1/export/html'; } diff --git a/frontend/src/routes/feed/+page.svelte b/frontend/src/routes/feed/+page.svelte index fa24442..f5f05da 100644 --- a/frontend/src/routes/feed/+page.svelte +++ b/frontend/src/routes/feed/+page.svelte @@ -7,6 +7,7 @@ import FeedGrid from '$lib/components/FeedGrid.svelte'; import HashtagChips from '$lib/components/HashtagChips.svelte'; import LightboxModal from '$lib/components/LightboxModal.svelte'; + import OnboardingGuide from '$lib/components/OnboardingGuide.svelte'; import type { FeedUpload, FeedResponse, HashtagCount } from '$lib/types'; let uploads = $state([]); @@ -223,3 +224,6 @@ onlike={handleLike} /> {/if} + + +