Skip to content

Use registry preview_sounds in pack cards#19

Merged
garysheng merged 1 commit intoPeonPing:mainfrom
Sogl:fix-preview-sounds-registry
Mar 14, 2026
Merged

Use registry preview_sounds in pack cards#19
garysheng merged 1 commit intoPeonPing:mainfrom
Sogl:fix-preview-sounds-registry

Conversation

@Sogl
Copy link
Copy Markdown
Contributor

@Sogl Sogl commented Mar 14, 2026

This makes OpenPeon respect registry.preview_sounds when building pack card previews.

What changes:

  • site/src/lib/registry.ts now resolves preview sounds from entry.preview_sounds first
  • falls back to the current category-first behavior when preview_sounds is absent or cannot be resolved
  • site/src/components/ui/PackCard.tsx passes the full preview list to the play button
  • site/src/components/ui/AudioPlayer.tsx randomly chooses one preview clip per click when multiple preview choices are available

Why:

  • registry entries already expose preview_sounds as an array
  • the site currently ignores that field and always uses only the first generated preview
  • this keeps the existing single-button UI, but makes multi-preview packs actually work

Validation:

  • npm run lint
  • npm run build

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 14, 2026

@Sogl is attempting to deploy a commit to the Gary Sheng's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Sogl Sogl force-pushed the fix-preview-sounds-registry branch from 9053b71 to 0430a81 Compare March 14, 2026 22:11
@garysheng garysheng merged commit ede5170 into PeonPing:main Mar 14, 2026
2 of 3 checks passed
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.

2 participants