rspace-online/modules/rsocials/components
Jeff Emmett e34eec649f feat(canvas): unified rApp canvas interaction — keyboard + space-to-grab
Phase A.5: bring rApp mini-canvases to parity with the main rSpace canvas
on keyboard shortcuts and Space-to-grab behavior, plus ship reusable
primitives for fit-view and zoom chrome.

shared/canvas-interaction.ts — extend CanvasInteractionController:
  • enableSpaceToGrab — Space sets grab cursor and flips isSpaceHeld()
  • enableKeyboardShortcuts — 0 fit, +/- zoom, arrows pan, Ctrl+Z/Y
    undo/redo, Delete/Backspace delete (with shadow-DOM-aware text
    input detection so inline editors still work)
  • zoomByFactor() helper for chrome +/- buttons

shared/canvas-viewport.ts (new):
  • fitViewToRects / fitViewToNodes — standard fit algorithm matching
    the main canvas (40px padding, 0.1–1.5 clamp default)
  • persistViewport / restoreViewport — localStorage under
    rspace_viewport:<key> with finite-value validation

shared/components/rspace-canvas-chrome.ts (new):
  • <rspace-canvas-chrome> web component — zoom out/in/fit buttons +
    percent indicator + optional grid toggle. Emits canvas-zoom-*
    events. Available as drop-in for new/future canvases.

Migrate 8 rApp canvases to opt into space-to-grab + keyboard fit:
rsocials planner (keeps existing isEnabled gate), rsocials workflow,
rminders automation, rflows, rgov circuit, rnetwork CRM graph,
applet-circuit-canvas. rTime skips enableSpaceToGrab because it has
its own Space tracking integrated with node-drag state.

Bump asset cache versions so browsers pick up the new JS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 18:18:49 -04:00
..
campaign-planner.css feat(rsocials): board view + planner UX fixes 2026-04-17 17:53:28 -04:00
campaign-wizard.css fix(ui): theme-adaptive rSocials buttons + device link textbox 2026-03-25 11:39:14 -07:00
campaign-workflow.css fix(layout): viewport-filling rApp layout — eliminate body scroll 2026-03-31 10:57:09 -07:00
folk-campaign-manager.ts fix: comprehensive memory leak and performance fixes across 44 files 2026-04-10 22:26:24 -04:00
folk-campaign-planner.ts feat(canvas): unified rApp canvas interaction — keyboard + space-to-grab 2026-04-17 18:18:49 -04:00
folk-campaign-wizard.ts feat(rsocials): campaign planner polish 2026-04-16 16:13:20 -04:00
folk-campaign-workflow.ts feat(canvas): unified rApp canvas interaction — keyboard + space-to-grab 2026-04-17 18:18:49 -04:00
folk-campaigns-dashboard.ts feat(rsocials): per-platform post fields, media uploads, auth on campaigns dashboard 2026-04-17 14:16:12 -04:00
folk-newsletter-manager.ts fix: enforce subdomain routing — spaces are subdomains, never path segments 2026-04-03 14:09:53 -07:00
folk-thread-builder.ts fix: comprehensive memory leak and performance fixes across 44 files 2026-04-10 22:26:24 -04:00
folk-thread-gallery.ts fix: comprehensive memory leak and performance fixes across 44 files 2026-04-10 22:26:24 -04:00
newsletter.css fix(rsocials): replace hardcoded dark-mode colors with CSS variables for light/dark theme support 2026-03-21 13:18:13 -07:00
socials.css fix(rsocials): replace hardcoded dark-mode colors with CSS variables for light/dark theme support 2026-03-21 13:18:13 -07:00