Skip to content

feat: move Prompt Templates to /templates and lighten its gallery - #173

Merged
PromSereyreaksa merged 2 commits into
mainfrom
feat/templates-page
Oct 16, 2026
Merged

PromSereyreaksa merged 2 commits into
mainfrom
feat/templates-page

Conversation

@PromSereyreaksa

Copy link
Copy Markdown
Member

Summary

  • Route: Prompt Templates moves from /prompts to /templates. Old /prompts links still open it and the address is replaced with /templates. The film-starter page that used to sit at /templates (not linked from the sidebar) moves to /films.
  • Aspect ratios: each preview is sized to its template's aspectRatio (16:9, 9:16, 1:1, 4:5) with a ratio badge, in a masonry layout like the landing page gallery.
  • Filter: category chips pick one category at a time; "All" clears it. A new account that picked exactly one interest opens filtered to it, several picks open on All.
  • Performance:
    • Previews download and play only within ~half a screen of view and pause when scrolled away (one shared IntersectionObserver, src/ui/cloud/lazy-video.ts). Before, every video autoplayed and downloaded at once.
    • Cards shimmer until the first frame arrives instead of showing black boxes.
    • With prefers-reduced-motion, previews show a still and play only on hover or focus.
    • The template list is kept for the session: reopening the tab is instant and refreshes in the background; a failed refresh keeps the earlier list.

Pairs with COPPSARY/Motify-Backend#66, which streams preview videos through the API instead of redirecting to Supabase. This PR works with or without it, since the video link is unchanged.

Test plan

  • vitest run on PromptTemplatesPanel, lazy-video, routes, onboarding and App tests
  • svelte-check with 0 errors
  • Open /templates: mixed aspect ratios in masonry, only nearby videos load in the network tab
  • /prompts redirects to /templates
  • With reduce motion on, previews are still until hovered

- Prompt Templates now lives at /templates; old /prompts links open it and
  move to the new address. The unlinked film-starter page moves to /films.
- Each preview keeps its video's aspect ratio (16:9, 9:16, 1:1, 4:5) with a
  ratio badge, laid out as masonry.
- The category filter picks one category at a time.
- Previews download and play only near the screen and pause off it; cards
  shimmer until the first frame arrives. With reduced motion they show a still
  and play on hover or focus.
- The template list is kept for the session, so reopening the page is instant.
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
motionly Ready Ready Preview Oct 16, 2026 3:48am UTC

@PromSereyreaksa
PromSereyreaksa merged commit e88373c into main Oct 16, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4973b84d Deployed Oct 16, 2026 by vercel[bot]
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