Skip to content

Pinia store + basic builder canvas #25

@tbssnch

Description

@tbssnch

With the data layer proven and the drag-and-drop interaction validated, wire them together into the actual builder UI. This sets up the Pinia store as the single source of truth and renders the form tree on a canvas with working drag-and-drop.

Pinia store

  • Holds the XLSFormDocument
  • Exposes actions:
    • addNode(parentId, index, type)
    • moveNode(nodeId, newParentId, newIndex)
    • removeNode(nodeId)
    • updateNode(nodeId, patch)
    • addChoiceList(listName) / addChoice(listName, choice) / removeChoice(listName, index)
  • Undo/redo via structuredClone()
  • No component mutates the tree directly. All mutations go through store actions

Builder canvas

  • Renders the survey tree recursively
  • Each node renders as a card/row showing type icon + label + name
  • Groups and repeats render as containers with their children indented inside
  • Drag-and-drop wired up via vue-draggable-plus (using patterns validated in Nested drag-and-drop prototype #24)
  • Clicking a node selects it (selection state in the store for the property panel in a later issue)

Question palette sidebar

  • List of available question types (text, integer, select_one, note, group, repeat, etc)
  • Draggable items. Node is created on drop not on drag start

Export button

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions