Add manual width/height input for selected stickers (SP-008)#21
Merged
Conversation
- Add unitToCanvasPixels in shared-types and setSelectedSize handle in react-canvas-designer - Wire width/height inputs with aspect-ratio lock on docs /stickpak demo - Bump shared-types to 0.2.2 and react-canvas-designer to 0.2.31 Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Implements SP-008: let users set a selected sticker's size by typing exact width and/or height in mm/cm/in, with optional aspect-ratio lock. Adds engine APIs in
@jeffgo10/shared-typesand@jeffgo10/react-canvas-designer, plus a demo on the docs/stickpakpage.Changes
Packages (
@jeffgo10/*)shared-types@0.2.2—unitToCanvasPixels()(inverse ofcanvasPixelsToUnit)react-canvas-designer@0.2.31—computeScaleFromUnitDimensions(),CanvasDesignerHandle.setSelectedSize(); respectsminResizeSizeMmand canvas margin clampingCanvas designer
lockAspectRatio(default true) — changing one axis scales the other proportionallyDocs app (
apps/docs)/stickpak— width/height number inputs when one sticker is selected (blur or Enter to apply)onSelectionDimensionsChangeDocs / agent tooling
docs/stickpak/engineering-notes.md,phase-1.md— SP-008 entry and version pins.cursor/rules/ls-foundry-core.mdc— pin table updatedCommits
cf0c97fTest plan
pnpm test --filter=@jeffgo10/shared-types --filter=@jeffgo10/react-canvas-designerpnpm run build:packagespnpm run dev --filter=@ls-foundry/docs→/stickpak— select sticker, type new width/height, confirm canvas resize + aspect lock toggleNotes / follow-ups
masterwill deploy@jeffgo10/shared-types@0.2.2and@jeffgo10/react-canvas-designer@0.2.31setSelectedSize+onSelectionDimensionsChange(sticker-print-app)Made with Cursor