Skip to content

Canvas: plugin scaffold, nav item, and pan/zoom surface #345

Description

@KrasForge

Summary

Foundation for the Canvas view plugin: register an installable plugin that adds a Canvas nav item and route, and render an empty infinite pan-and-zoom canvas surface. No cards or connections yet.

Part of #342.

Contribution point

View: a full workspace view plus a nav item, provided by an installable plugin (builtin: false, not pre-installed).

Scope

  • Register with the plugin runtime as a lazy-loaded builtin: ctx.addView({ id: 'canvas', label: 'Canvas', icon: (a frame or layout icon), order, component }).
  • Add a marketplace catalog entry in plugins.ts and a load in catalog.ts with builtin: false.
  • Render an infinite canvas surface with pan and zoom, using a view {x,y,k} transform. Reuse the interaction approach from GraphView rather than adding a new dependency.
  • Zoom and fit controls consistent with the graph view.

Out of scope

Implementation notes

  • Plugin runtime: frontend/src/features/workspace/plugins/.
  • Reference interactions (pan, zoom, drag, the view transform): frontend/src/features/workspace/GraphView.tsx.
  • Catalog: plugins.ts and catalog.ts.

Acceptance criteria

  • Installing the plugin adds a Canvas nav item and route; uninstalling removes both.
  • The canvas pans and zooms smoothly; zoom and fit controls work.
  • 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