Skip to content

Canvas: note cards (add, drag, persist, open) #346

Description

@KrasForge

Summary

Place note cards on the canvas: add existing notes from a picker, drag cards to position them, persist their layout, and open a note by double-clicking its card.

Part of #342. Depends on the canvas scaffold and pan/zoom surface.

Behavior

  • Add existing notes to the canvas from a picker; render each as a card.
  • Drag a card to reposition it within the canvas transform.
  • Double-click a card to open its note (switch to the notes view with that note selected).
  • Card positions persist client-side, consistent with how the note tree and plugin install state are stored.

Implementation notes

  • Read notes from data.notes (the WorkspaceViewProps the runtime passes to a view).
  • Persist card positions to localStorage, keyed per canvas.
  • Reuse the node-drag handling from GraphView for card dragging under the view {x,y,k} transform.
  • Cross-view navigation to open a note: switch the active view to notes with the target note selected, matching how nav and selection are wired in Workspace.tsx and NotesView.tsx.

Acceptance criteria

  • Cards can be added from a picker and dragged; their positions survive a reload.
  • Double-clicking a card opens the note in the notes view with it selected.
  • Renders correctly in light and dark themes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions