Skip to content

feat: shader bookmarks + accessibility improvements#3

Open
jrkim-kr wants to merge 4 commits intopbakaus:mainfrom
jrkim-kr:main
Open

feat: shader bookmarks + accessibility improvements#3
jrkim-kr wants to merge 4 commits intopbakaus:mainfrom
jrkim-kr:main

Conversation

@jrkim-kr
Copy link
Copy Markdown

@jrkim-kr jrkim-kr commented Apr 1, 2026

Summary

  • Shader save/bookmark feature — users can bookmark shaders to a personal collection stored in localStorage, no login required
  • Accessibility improvements — applied recommendations from a systematic audit (focus styles, touch targets, text sizes, ARIA attributes, performance)

Changes

Shader Bookmark Feature

  • src/lib/saved-shaders.svelte.ts — reactive store backed by localStorage; initialized in root layout onMount to handle prerendered page hydration correctly
  • src/lib/toast.svelte.ts — lightweight toast notification system
  • src/routes/gallery/saved/ — new /gallery/saved page listing bookmarked shaders
  • ShaderCard.svelte — bookmark button (hover to reveal; filled amber when saved)
  • Nav.svelte — saved count badge appears next to GitHub link when collection is non-empty
  • GallerySidebar.svelte — "My Collection" link with live count

Accessibility & Quality

  • Global :focus-visible outline via new CSS custom properties (--color-accent, --color-bg, --color-text, etc.)
  • Keyboard access — sidebar overlay <div> replaced with <button>
  • ARIAaria-label / aria-pressed on Hero scheme dots, Live toggle, layout buttons; aria-hidden on decorative SVGs and mock UI
  • Touch targets — save button 28px → 36px; Hero scheme dots get ::after hit area expansion
  • Text sizes — all sub-12px labels floored at 0.75rem across 5 components
  • Layout icons — Unicode emoji (⬜▣◧◨) replaced with inline SVGs
  • Hero RAFvisibilitychange guard pauses loop when tab is hidden
  • AmbientGlowprefers-reduced-motion support added

Test plan

  • Bookmark a shader on /gallery/all — icon fills amber, toast appears, Nav badge increments
  • Refresh page — bookmarks persist from localStorage
  • Navigate to /gallery/saved — only bookmarked shaders shown
  • Tab through gallery with keyboard — all interactive elements have visible focus outlines
  • Test on mobile — save button and scheme dots are reliably tappable
  • Toggle tab visibility — Hero shader pauses when tab is hidden
  • Enable prefers-reduced-motion — AmbientGlow animation stops

🤖 Generated with Claude Code

jrkim-kr and others added 2 commits April 1, 2026 18:14
- New localStorage-backed reactive store (saved-shaders.svelte.ts)
- Toast notification system (toast.svelte.ts)
- /gallery/saved page to view bookmarked shaders
- Bookmark button on ShaderCard (hover to reveal, filled when saved)
- Saved count badge in Nav header (GitHub 오른쪽)
- My Collection link in GallerySidebar
- initSavedShaders() called from root layout onMount for SSR hydration fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accessibility:
- Add global :focus-visible outline via CSS custom properties
- Fix sidebar overlay div -> button for keyboard access
- Add aria-label/aria-pressed to Hero scheme dots, Live toggle, layout buttons
- Add aria-hidden to decorative SVGs and ShaderPreview mock UI
- Add aria-label to SourceViewer close button

Performance:
- Add visibilitychange guard to Hero RAF loop to pause when tab hidden
- Add prefers-reduced-motion support to AmbientGlow animation

Touch targets & text:
- Increase save button from 28px to 36px
- Expand Hero scheme-dot hit area with ::after pseudo-element
- Floor all sub-12px text to 0.75rem across 5 components

Design:
- Replace Unicode emoji layout icons (⬜▣◧◨) with inline SVGs
- Add CSS design tokens (--color-accent, --color-bg, --color-text, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jrkim-kr
Copy link
Copy Markdown
Author

jrkim-kr commented Apr 1, 2026

Btw about the second commit I used your /audit skill and it only gave me 10/20 scores lol

jrkim-kr and others added 2 commits April 1, 2026 19:28
adapter-static requires all routes to be prerenderable. Since
/gallery/saved uses localStorage (prerender=false, ssr=false),
adding fallback:'404.html' enables SPA-style handling for
non-prerendered routes.

Refs ERR-001

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adapter-static outputs to 'build/' but Vercel defaults to 'public/'.
Add vercel.json to explicitly point Vercel at the correct directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant