Skip to content

feat(template): make PDP variants instant - #518

Draft
laugharn wants to merge 3 commits into
mainfrom
feat/hydrogen-pdp-variants
Draft

feat(template): make PDP variants instant#518
laugharn wants to merge 3 commits into
mainfrom
feat/hydrogen-pdp-variants

Conversation

@laugharn

Copy link
Copy Markdown
Collaborator

Summary

  • keep the PDP's coherent cached route shell and server-resolved initial variant
  • use Hydrogen's product form store to resolve same-product option selections immediately from encoded availability plus sparse adjacent variants
  • keep option controls as real links while replacing the URL after client selection, preserving refresh and no-JavaScript behavior
  • document the hybrid server/client variant model

Why

The PDP intentionally remains a blocking, coherent product route rather than exposing a generic loading shell. Once the product is loaded, however, variant interaction should not be paced by a route round trip when Shopify already provides enough encoded and sparse variant data to resolve it locally.

Verification

  • pnpm --dir apps/template format — passed
  • pnpm --dir apps/template codegen — passed
  • pnpm --dir apps/template exec next typegen — passed
  • pnpm --dir apps/template exec tsc --noEmit — passed
  • pnpm --dir apps/template lint — passed
  • pnpm --dir apps/template build — passed

pnpm --dir apps/template exec hydrogen gql check --fail-on-warn is currently blocked by Hydrogen/gql.tada under the workspace's TypeScript 7: TypeError: a.parseConfigFileTextToJson is not a function. The repository GraphQL codegen validated and generated the changed documents successfully.

The session's tracked apps/template/lib/shopify/transforms/image-placeholders.test.ts does not exist on main; it belonged to the earlier demo branch and could not be run here.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
shop-docs Ready Ready Preview, v0 Aug 22, 2026 4:21pm
shop-template Ready Ready Preview, v0 Aug 22, 2026 4:21pm

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