-
Print area management UI & backend (a42a00d):
- Built a full stack for managing print areas (think “where the design goes” on a shirt front or back). This includes models to store print area dimensions, controllers to handle CRUD ops, and RESTful routes to tie it all together.
- The frontend now lets users drag/drop to define print zones with responsive positioning (
position: absolute+transform: scaleto handle dynamic sizing). - Edge case: Products with multiple print areas (e.g., front + back) now render distinct configurations without clobbering state.
-
Printful service & stock syncing (7b5d817):
- Added
printful_idto product models to map Issued products to Printful’s inventory. - UI updates to display Printful sync status (green checkmarks for success, red alerts for failures).
- Added
Technical tangents
The print area system was a slow make. For example:
- To ensure designs stay within printable bounds, I had to calculate dynamic margins based on product type (e.g., a hoodie’s print area ≠ a mug’s). This involved hacking some trigonometry into the frontend to snap selections to “safe zones.”
- On the backend, I’m using ActiveRecord callbacks to validate print area dimensions against product specs. If a user tries to set a print area wider than the product allows It raises a
PrintAreaOutOfBoundserror
Future features
The actual ship flow and being able to edit multiple print areas instead of just the one
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.