feat(storefront): design both sides of the garment - #44
Merged
Conversation
The Design Studio can now print BOTH the front and back of one piece (the same artwork, placed independently per side), and the cart shows each case. Studio: - StudioConfig models the active side (placement/scale/transform) plus a stashed otherSide; `switchView` turns the garment over, keeping each side's print. `collectSides` yields the printed sides. - Placement chips are filtered to the side being viewed; the view toggle shows a dot per printed side; a "leave this side blank" clears the active side when the other stays printed; the summary lists every printed side. - add-to-bag carries per-side geometry in `designSides`. - Share URL round-trips both sides (o-prefixed params); an old single-side link viewing the back migrates its print to the other side. Cart: - Each line already drew front + back; now each side renders from its own designSides entry. Front-only → front·art/back·blank; back-only → front·blank/back·art; both → front·art/back·art with a "Both sides" tag. - Line identity + saved-design signature fold in every printed side, so distinct one/two-sided compositions never merge. Verified in-browser end-to-end: designed front, turned to back, printed it, added to bag — the line stored both sides and the cart drew art on both. Gate green: format, lint, typecheck, 290 storefront tests, build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the two-sided design flow. Builds on the merged cart-both-sides work (#39).
What
The Design Studio can now print both the front and back of one piece (the same artwork, placed independently per side), and the cart draws each case:
Studio
StudioConfigmodels the active side (placement/scale/transform) plus a stashedotherSide;switchViewturns the garment over, keeping each side's print.collectSidesyields the printed sides.designSides.o-prefixed params); an old single-side link viewing the back migrates its print to the other side (no silent loss).Cart
designSidesentry (falls back to the single-side fields for product / older lines).Verification
Driven in-browser end-to-end: default front print → turned to back (chips switched to back-only, "blank" prompt) → printed back (both view dots lit, summary "front · Small · back · Medium") → add to bag. The stored line carried
designSides: { front: {left-chest, small}, back: {back, medium} }, and the cart drew two art images (front + back) with a "Both sides" tag. Front-only and back-only lines still render one side each.Gate green: format, lint, typecheck, 290 storefront tests (two-sided model, switchView/collectSides, two-sided URL round-trip, cart identity), build.
Note
Rebased onto current main (which gained #42/#43 from parallel work); no overlap with those files.
🤖 Generated with Claude Code