-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add onboarding flow #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7b09ac7
redirect old url's
hhvrc 3af6481
welcome screen
hhvrc 2bd90ba
Update WelcomeScreen.svelte
hhvrc 69933f1
Update WelcomeScreen.svelte
hhvrc 95e2483
add tutorial n stuff
hhvrc f037443
Potential fix for pull request finding 'CodeQL / Client-side URL redi…
hhvrc cbe180d
bleh
hhvrc 51a4471
a
hhvrc d825a54
fix: handleKeydown skips interactive targets; tour next button labell…
hhvrc c9bf739
Merge branch 'develop' into feat/onboarding-flow
hhvrc 3dbe5b2
merge: resolve conflicts from develop into feat/onboarding-flow
hhvrc 58ecf42
Merge branch 'develop' into feat/onboarding-flow
hhvrc 14e1e9d
good stuff
hhvrc 4e84fad
format
hhvrc f2d3461
yeah
hhvrc 6d0bd4d
Merge remote-tracking branch 'origin/develop' into feat/onboarding-flow
hhvrc d666a30
prepend base path to legacy hash redirects and test safety guard
hhvrc 806e8d9
only attach window listeners while welcome screen is open, focus dial…
hhvrc cb757e5
extract dot grid into shared DotGrid component
hhvrc 7a7e303
prompt for tour on login if welcome was seen but tour skipped
hhvrc 85d3203
split welcome-tour.ts: extract onboarding state into onboarding-state.ts
hhvrc 4dec2e9
fix DotGrid style expressions; add browser guard to startWelcomeTour
hhvrc c6f7b69
mobile tour: auto open/close sidebar; navigate home on tour complete;…
hhvrc bc7e536
add onPrevClick sidebar management; mark tour done on skip/dismiss
hhvrc dc7d396
hide driver.js close button; it's unclickable due to title z-index
hhvrc 6f71258
fix driver.js button styles being overridden by default CSS
hhvrc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <script lang="ts"> | ||
| let mouseX = $state(-9999); | ||
| let mouseY = $state(-9999); | ||
| let rafPending = false; | ||
| let containerEl: HTMLDivElement | undefined = $state(); | ||
|
|
||
| export function handlePointerMove(e: PointerEvent) { | ||
| if (rafPending) return; | ||
| rafPending = true; | ||
| requestAnimationFrame(() => { | ||
| const rect = containerEl?.getBoundingClientRect(); | ||
| mouseX = rect ? e.clientX - rect.left : e.clientX; | ||
| mouseY = rect ? e.clientY - rect.top : e.clientY; | ||
| rafPending = false; | ||
| }); | ||
| } | ||
| </script> | ||
|
|
||
| <div bind:this={containerEl} class="pointer-events-none absolute inset-0"> | ||
| <div class="bg-grid absolute inset-0" aria-hidden="true"></div> | ||
| <div | ||
| class="bg-grid-spotlight absolute inset-0" | ||
| style="--mouse-x={mouseX}px --mouse-y={mouseY}px" | ||
| aria-hidden="true" | ||
| ></div> | ||
| </div> | ||
|
|
||
| <style> | ||
| .bg-grid { | ||
| background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px); | ||
| background-size: 28px 28px; | ||
| background-position: center center; | ||
| } | ||
|
|
||
| .bg-grid-spotlight { | ||
| background-image: radial-gradient(circle, rgba(225, 74, 109, 0.9) 1px, transparent 1px); | ||
| background-size: 28px 28px; | ||
| background-position: center center; | ||
| mask-image: radial-gradient( | ||
| circle 220px at var(--mouse-x, -9999px) var(--mouse-y, -9999px), | ||
| black 0%, | ||
| transparent 75% | ||
| ); | ||
| -webkit-mask-image: radial-gradient( | ||
| circle 220px at var(--mouse-x, -9999px) var(--mouse-y, -9999px), | ||
| black 0%, | ||
| transparent 75% | ||
| ); | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import { PUBLIC_DISABLE_ONBOARDING } from '$env/static/public'; | ||
| import { isTruthy } from '$lib/utils/parse'; | ||
|
|
||
| const CURRENT_WELCOME_VERSION = 1; | ||
| const WELCOME_VERSION_KEY = 'os.welcomeVersion'; | ||
|
|
||
| const CURRENT_TOUR_VERSION = 1; | ||
| const TOUR_VERSION_KEY = 'os.tourCompletedVersion'; | ||
|
|
||
| export function isOnboardingDisabled(): boolean { | ||
| return isTruthy(PUBLIC_DISABLE_ONBOARDING); | ||
| } | ||
|
|
||
| export function hasSeenWelcome(): boolean { | ||
| try { | ||
| const raw = localStorage.getItem(WELCOME_VERSION_KEY); | ||
| const seen = raw ? parseInt(raw, 10) : 0; | ||
| return Number.isFinite(seen) && seen >= CURRENT_WELCOME_VERSION; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| export function markWelcomed(): void { | ||
| try { | ||
| localStorage.setItem(WELCOME_VERSION_KEY, String(CURRENT_WELCOME_VERSION)); | ||
| } catch { | ||
| // ignore (private mode, quota, etc.) | ||
| } | ||
| } | ||
|
|
||
| export function shouldShowWelcome(): boolean { | ||
| if (isOnboardingDisabled()) return false; | ||
| try { | ||
| const raw = localStorage.getItem(WELCOME_VERSION_KEY); | ||
| const seen = raw ? parseInt(raw, 10) : 0; | ||
| return !Number.isFinite(seen) || seen < CURRENT_WELCOME_VERSION; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| export function hasCompletedTour(): boolean { | ||
| if (isOnboardingDisabled()) return true; | ||
| try { | ||
| const raw = localStorage.getItem(TOUR_VERSION_KEY); | ||
| const n = raw ? parseInt(raw, 10) : 0; | ||
| return Number.isFinite(n) && n >= CURRENT_TOUR_VERSION; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| export function markTourCompleted(): void { | ||
| try { | ||
| localStorage.setItem(TOUR_VERSION_KEY, String(CURRENT_TOUR_VERSION)); | ||
| } catch { | ||
| // ignore | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.