Repository navigation
templates(feat): motion on the gallery surfaces + varied inner-page heroes - #358
Conversation
The /templates gallery and detail pages were the only static surfaces left in the template showcase — all the motion lived inside the previews. This brings motion.dev to the two pages visitors actually land on first, functionally. Gallery: - Category filtering is now layout-animated. TemplateGalleryFilter owns which cards are mounted (the page still builds them on the server and hands them over as rendered elements, so every concept ships in the initial HTML and the showcase registry stays out of the client bundle). AnimatePresence with mode="popLayout" pulls exiting cards out of flow, survivors glide to their new grid slots via layout="position", and arrivals fade in — the visitor sees what changed instead of a snap. - Staggered first-paint entrance: 45ms apart on a near-critically-damped spring, whole set settled in ~500ms. - Springed poster hover lift, gated on (hover: hover) and (pointer: fine). - A role="status" result count announces the reflow. Detail: - Below-fold section content rises once via the new TemplateReveal. The hero, the live preview, and the concept disclosure never animate. - Recipe rows swap their ordinal for an outbound arrow on hover and keyboard focus, reinforcing that every chip resolves to a real installable block. - Palette swatches deal themselves in. Contracts held: the gallery still mounts zero iframes and the detail page one; transform/opacity only; reduced motion zeroes every transition and template-surface-motion.css pins the finished frame pre-hydration; SSR and client render the same tree (the transition is branched, never the JSX). The first-paint gallery entrance is deliberately transform-only — the cards carry a filled primary CTA and axe scans mid-animation, so an opacity fade there would alpha-composite that button toward the page background and fail AA transiently. Co-Authored-By: Claude Opus 5 <[email protected]>
Three of the six concepts get one motivated inner-page hero each; the other three keep hero-basic throughout on purpose. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Static snapshot whose tree is identical to dev, parented on both branches so the promote PR is mergeable despite squash-promote history divergence. Includes the full templates program through #358.
dev bumped saas-launch/agency-studio to revision 4 and commerce-brand to 3 independently (#358), landing on the same values this branch had chosen, so git auto-merged the identical lines and silently swallowed this change's bump. Re-bump to 5/5/4 and re-mint saas-launch-product, whose baseline now also has to carry dev's new inner-page hero. Co-Authored-By: Claude Opus 5 <[email protected]>
…base These two were minted before rebasing onto dev's new inner-page hero (#358), so they carried the old hero. Re-minted on the CI renderer; the run rewrote only these two files, confirming the rest of the Linux template set already reproduces exactly. Co-Authored-By: Claude Opus 5 <[email protected]>
dev bumped saas-launch/agency-studio to revision 4 and commerce-brand to 3 independently (#358), landing on the same values this branch had chosen, so git auto-merged the identical lines and silently swallowed this change's bump. Re-bump to 5/5/4 and re-mint saas-launch-product, whose baseline now also has to carry dev's new inner-page hero. Co-Authored-By: Claude Opus 5 <[email protected]>
…base These two were minted before rebasing onto dev's new inner-page hero (#358), so they carried the old hero. Re-minted on the CI renderer; the run rewrote only these two files, confirming the rest of the Linux template set already reproduces exactly. Co-Authored-By: Claude Opus 5 <[email protected]>
…Label (#360) * components(feat): give stats-proof and content-quote an optional logoLabel The stats-proof and content-quote demo twins hard-coded a customer-logo stand-in — a literal NORTHWIND wordmark and an h-6 w-20 grey bar — where the installable block takes a Media upload. Every template concept that composed stats-proof therefore had to attribute its proof quote to Northwind regardless of its own client fiction, or hide the wordmark from its scoped theme. Both blocks now take an optional `logoLabel` text field that renders when no `logo` upload is set, so the wordmark is editor content on both sides of the demo-twin contract: - source config + Component for StatsProof and ContentQuote - the mirrored twins and the demo-content types - the Content model tables on both doc pages - manifests bumped 0.1.0 -> 0.2.0 (additive optional field), with content-quote's componentEntries version now read from the manifest instead of a hand-kept literal Template concepts supply their own client names and drop the theme-level workarounds: agency-studio's visible mismatch is fixed (HOLLIS & CRANE, matching the quote it attributes), commerce-brand names the café, fintech-trust badges INITECH, saas-launch FERROWATT. portfolio-solo and event-conference's blind-review section simply omit the field, which removes portfolio-solo's display:none rule, fintech-trust's grey-bar restyle, and commerce-brand's sliver-bar rule. Darwin baselines re-minted for the 15 renders the change actually moves; revisions bumped on the five templates whose output changed. Posters are viewport-only captures and are unaffected (verified by recapture). Co-Authored-By: Claude Opus 5 <[email protected]> * ci(chore): let visual-baselines choose the snapshot update mode A bare `--update-snapshots` presets to Playwright's "changed", which only rewrites baselines whose diff exceeded maxDiffPixelRatio. An intended visual change that lands under the tolerance therefore keeps a stale committed baseline. Add an `update` input (default `changed`, so existing dispatches behave exactly as before) so a deliberately visual change can mint with `all`. Co-Authored-By: Claude Opus 5 <[email protected]> * test(chore): mint Linux visual baselines for the logoLabel change Cherry-picked from the visual-baselines workflow run so the linux set matches the darwin set exactly: the content-quote component preview plus the fourteen template pages the change moves. The workflow's full `update=all` output also rewrote 57 unrelated component baselines — the linux runner drifts against its own committed images the same way darwin does — so only the fifteen this change actually affects are taken here. Co-Authored-By: Claude Opus 5 <[email protected]> * templates(fix): re-bump revisions absorbed by the rebase onto dev dev bumped saas-launch/agency-studio to revision 4 and commerce-brand to 3 independently (#358), landing on the same values this branch had chosen, so git auto-merged the identical lines and silently swallowed this change's bump. Re-bump to 5/5/4 and re-mint saas-launch-product, whose baseline now also has to carry dev's new inner-page hero. Co-Authored-By: Claude Opus 5 <[email protected]> * test(chore): re-mint saas-launch-product Linux baselines after the rebase These two were minted before rebasing onto dev's new inner-page hero (#358), so they carried the old hero. Re-minted on the CI renderer; the run rewrote only these two files, confirming the rest of the Linux template set already reproduces exactly. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
Two refinements to the template showcases, building on the six-concept gallery (#340) and the per-block install actions (#349).
1. Motion on the marketing surfaces
Until now every bit of motion lived inside the template previews — the six shells and the two hero blocks. The two pages visitors actually land on first were completely static.
Layout-animated category filtering is the headline piece: filtering used to snap, now cards physically reflow.
AnimatePresence+layout="position"means exiting cards fade out, survivors glide to their new grid slots, and entering cards fade in — so you can see what changed. Plus a staggered first-paint entrance, a restrained poster hover lift (fine-pointer only), scroll reveals on the detail sections, and a recipe-row micro-interaction that swaps the ordinal for an outbound arrow on hover and keyboard focus.TemplateGalleryFiltermoved from togglinghiddenon server-rendered slots to owning the list in React — but the page still builds every card on the server and passes them as rendered elements, so all six concepts stay in the initial HTML and the template registry never reaches the client bundle. Arole="status"line announces the reflow.One deliberate deviation worth calling out: the first-paint entrance is transform-only, no fade. The cards contain a filled
bg-primaryCTA, and this repo has already been bitten by axe scanning mid-animation and failing AA transiently when an opacity fade alpha-composites a filled button toward the page background. Fading is reserved for post-interaction enter/exit, which axe never observes.2. Varied inner-page heroes — 3 of 30 pages
Every concept opened its four inner pages with the identical static
hero-basic. Rather than mechanically swapping all 24, only three changed, each with a reason:hero-product-tilthero-videohero-videoThree concepts were deliberately left entirely alone, and two of those only after building and rejecting the alternative:
hero-videowas built and reverted: the twin assumes a light theme, so on Frameworks' inverted tokensbg-foreground/70lightens and the near-black poster became a pale grey slab.hero-product-tiltwas built and reverted: the theme already gives every inner hero a ruled ledger-sheet plate, and a schematic dashboard mock is the one thing a specificity-first brand shouldn't lead with.Each new hero needed the same placeholder-plate theme work the other concepts already do (the twins are calibrated for uploads this site never ships) — all scoped under the concept's own
[data-template-theme]root, hanging off hero-only classes sohero-basicpages are untouched. Revisions bumped: saas-launch 3→4, agency-studio 3→4, commerce-brand 2→3.Verification
Full
pnpm test:release: 341 int passed, 69 components-visual, 62 templates-visual, 91 templates functional/a11y/geo. Both tracks independently ran axe (wcag2a/2aa/21a/21aa) at zero serious/critical, drove the filter in real Chromium across every category chip plus deep links, and confirmed reduced-motion renders the finished frame with zero[data-template-motion]nodes below opacity 1.Assets: only the 3 affected page posters changed (the other 33 came out byte-identical — the capture tool is deterministic) and only the 6 corresponding darwin baselines. Track B pixel-diffed the untouched Home and inner pages before/after: 0 differing pixels, so the theme rules don't leak.
Known unrelated failure
tests/e2e/blog-visual.e2e.spec.tsfails 2 cases (blog-index-desktop/-mobile) on darwin only. Verified pre-existing on a cleanorigin/devcheckout, and #348's own linux release-gate passed, so CI is unaffected. The diff shows different articles in different positions, which suggests date-dependent rendering rather than stale pixels — filed separately, since blindly re-minting a time-dependent snapshot just resets the timer.Post-merge
Linux baselines needed for the 3 changed pages: dispatch
visual-baselineswith spec"templates-visual".🤖 Generated with Claude Code