Skip to content

Add mobile select-on-press and pinch zoom/rotate (SP-006)#17

Merged
jeffgo10 merged 2 commits into
masterfrom
feat/sp-006-mobile-pinch-zoom-select-on-press
Jul 2, 2026
Merged

Add mobile select-on-press and pinch zoom/rotate (SP-006)#17
jeffgo10 merged 2 commits into
masterfrom
feat/sp-006-mobile-pinch-zoom-select-on-press

Conversation

@jeffgo10

@jeffgo10 jeffgo10 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Implements StickPak Kanban SP-006: mobile select-on-press and two-finger pinch zoom/rotate on the selected sticker. Bumps @jeffgo10/react-canvas-designer to 0.2.22 with centroid-pivot pinch geometry, flicker-free live Konva updates, and live dimension labels during gestures. Also fixes docs-app hydration issues when testing /stickpak over LAN on mobile.

Changes

Packages (@jeffgo10/react-canvas-designer v0.2.22)

  • Select-on-press: Stickers select on mousedown / touchstart instead of tap/click
  • Pinch zoom + rotate: Two-finger pinch on canvas shell scales and rotates the single selected sticker around the pinch centroid (selectedStickerPinch.ts)
  • Stable gestures: Window-level touch listeners; disable drag/transformer handles during pinch; imperative Konva node updates during gesture; commit to React items once on touchend
  • Live dimension labels: SelectionDimensionLabels listens for custom pinchlive event and reads live node scale
  • createInstanceId(): Fallback when crypto.randomUUID is unavailable (non-secure HTTP / LAN dev)

Docs app (apps/docs)

  • Client-only mount guard for StickPakCanvasSection to avoid SSR bailout hydration mismatches
  • suppressHydrationWarning on root <html> / <body> for extension-injected attributes

Docs / Cursor rules

  • Engineering notes and phase-1 checklist updated for SP-006
  • Version pin table updated in ls-foundry-core.mdc

Test utils

  • Konva Transformer mock gains resizeEnabled / rotateEnabled

Commits

SHA Message
c5a444b Add mobile select-on-press and pinch zoom/rotate for selected sticker (SP-006).

Test plan

  • pnpm test --filter=@jeffgo10/react-canvas-designer
  • pnpm run build:packages
  • pnpm run dev --filter=@ls-foundry/docs/stickpak on desktop (select-on-press, transformer still works)
  • Mobile / LAN (192.168.x.x:3000/stickpak): no hydration errors; add image via Google Drive; pinch zoom/rotate selected sticker; dimension labels track edges during gesture
  • Verify minimum resize size still enforced after pinch

Notes / follow-ups

  • Bump @jeffgo10/react-canvas-designer@0.2.22 in sticker-print-app when ready to ship to storefront
  • Move SP-006 on StickPak Kanban to Done after merge
  • CI publish on merge will deploy changed packages via publish-changed.sh

Made with Cursor

jeffgo10 and others added 2 commits July 2, 2026 16:43
… (SP-006).

- Pinch around centroid with live Konva updates; commit items on touchend
- createInstanceId fallback for non-secure HTTP; live dimension labels during pinch
- Docs app hydration fixes for mobile LAN testing

Co-authored-by: Cursor <cursoragent@cursor.com>
- Enhance Konva Group/Stage mocks for pinch gesture integration tests
- Wrap dimension label event emits in act(); extend selectedStickerPinch tests

Co-authored-by: Cursor <cursoragent@cursor.com>
@jeffgo10 jeffgo10 merged commit 8a4f1c2 into master Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant