- TextPath positioning is handled by the path data, not x/y coordinates
- Removed x={el.x} and y={el.y} from TextPath to prevent coordinate corruption
- Removes drag handlers from TextPath since curves are centered on canvas
- Text now properly persists when toggling between curved and straight
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Initialize curvedPath: null when creating text elements
- Ensures all text elements have the curvedPath property from creation
- Prevents text loss when toggling curved text on/off
- Text content is now properly preserved when switching between curved and straight
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove Group wrapper that was preventing TextPath from receiving click events
- Make TextPath directly draggable and selectable with proper event handlers
- TextPath now supports: clicking to select, dragging to move, position persistence
- Users can now properly interact with curved text on the canvas
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Wrap TextPath in Group container to enable dragging of curved text
Previously curved text couldn't be moved on canvas. Now users can:
• Add curved text
• Move it by dragging
• Update position is saved correctly
- Confirm curved text is per-element: Each text element has its own
curvedPath property, so you can mix curved and straight text on the
same design (Font 1: circle, Font 2: wave, Font 3: straight, etc.)
- TextPath uses listening={false} since Group handles all interactions
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix: Redirect users back to product page after login by passing 'next' parameter
in LoginPromptModal. Previously users were redirected to /account and lost
design context. Now they return to where they started (e.g., /made-to-order/
classic-t-shirt) where design drafts are restored from localStorage.
- Fix: Clear design draft from localStorage only AFTER successful cart addition,
not immediately. This ensures draft persists if user needs to login mid-design.
- Feature: Add Font Properties boxes (Font 1, Font 2, etc.) similar to Image
Dimensions. Each text element now displays with editable controls for:
• Text content
• Font family (dropdown with all fonts)
• Font size (slider 10-80pt with display)
• Text color (color picker)
• Rotation (slider 0-360 degrees)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove Reference Size input fields from customer design page
- Rulers now use product.referenceWidthCm and product.referenceHeightCm
- Reference size is set by admin when editing product (not customer)
- Simplify Add to bag validation - only check for design elements
- Remove reference size state from DesignCanvas component
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add Reference Size (cm) section with Width and Height inputs
- Rulers now use reference size instead of product print area dimensions
- Measurements scale to garment size specified by user
- Add to bag button disabled until reference sizes are provided
- Rulers span full canvas and show custom scale (e.g., 0-40cm x 0-60cm)
- Reference size required for personalization checkout
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add printAreaWidthMm and printAreaHeightMm to ProductDTO type
- Include these fields in toProductDTO conversion function
- Refactor ruler calculations to use simple for loops
- Rulers now display correctly showing 2cm increments on both axes
- Position & Size panel now shows accurate cm measurements
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add product parameter to PrintSurface component props
- Pass product to both front and back PrintSurface calls
- Allows rulers to access product.printAreaWidthMm for cm calculations
- Fixes ReferenceError: product is not defined
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Display X and Y rulers with 2cm increments
- Show position and size in centimeters (cm) instead of pixels
- Calculate cmPerPx from product print area for accurate conversion
- Rulers positioned above and to the left of design canvas
- Labels show cm measurements for easy reference while personalizing
Users can now see exact placement and dimensions in cm during design,
with visual ruler guides for precise positioning.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Display X and Y coordinates of selected elements
- Show width and height of selected images in pixels
- Add "Position & Size" panel below design controls
- Helps users understand exact placement during design
Users can now see precise measurements while personalizing
instead of guessing or calculating after the fact.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Create LoginPromptModal component for authentication encouragement
- Check customer authentication before adding items to cart
- Show modal for non-logged-in users with options to create account, log in, or continue as guest
- Allow guests to add items (stored in IndexedDB) while prompting to sign up
- Implemented in both StandardProductView (ready-made products) and DesignCanvas (personalized items)
- Add server action checkCustomerAuth() for authentication checks
Addresses user request: prompt guests to create account or log in when adding items to cart.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>