Elements: Add product collection - #10644
Conversation
There was a problem hiding this comment.
ℹ️ Minor suggestions only — one placement detail worth double-checking.
Reviewed changes
product-collection.tsx— a new rotating circular product-card carousel: three products stay visible while the active one cycles through the center in the scroll window ofdurationInFrames: 150@30fps. Per-product title, image (contain/cover), price, struck original price, and promotion badges, each exposed asInteractivenodes for Studio.element-definitions.ts— newcommerce/product-collectionentry (square 1080×1080,elementWidth/Height: 1020,safeArea: 30, Inter font dependency, poster/video preview URLs); shape matches the neighboringproduct-discount-callout/product-offerentries.index.mdx+element-registry.ts+elements.test.ts— docs page, Commerce gallery category/display-name, and sidebar expectation all wired consistently.
The carousel wrap/cosine math (slotPosition wrapping via count/2, the [1.02, 1.18] → [1, 0] visibility band keeping ~3 cards visible, and the final-slot rest on the last product) holds up across the transition range, and the repeated interactive names inside .map() instances match the established pattern used by other mapped Elements.
I have one placement observation inline — everything else reads as intended.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| <div | ||
| style={{ | ||
| height: 560, | ||
| left: 360, |
There was a problem hiding this comment.
Horizontal-centering note: each card sits at left: 360 with width: 300, so the resting-card cluster is centered at x = 510 — 30px left of the 1080 canvas center (540) where the "Featured Collection" heading is centered below. If that leftward offset is deliberate (e.g. to compensate for the perspective(100px) depth), ignore this; otherwise centering the stack on 540 is a one-line change.
…ement # Conflicts: # packages/docs/src/test/elements.test.ts

Summary
Preview
Video preview
Product Collection page
Verification
bun run buildbun run stylecheckcd packages/docs && bun test src/test/elements.test.tscd packages/docs && bun run render-element-previews --element=commerce/product-collectionCloses #9349