Skip to content

feat: Add model to store as source of truth #49

@lornakelly

Description

@lornakelly

Description

Dependency: #48

Add the parsed workflow model and errors to the store as the single source of truth for the editor. The store should expose a way to set and clear the model, and be accessible to components throughout the editor. For the read-only MVP, the store needs to handle updating the model when the content prop changes.

Motivation

The editor needs a central place to hold the workflow model so that all components can access it without prop drilling.

Proposed Implementation

  • The DiagramEditor component should act as the entry point and wrapper for the editor. It is responsible for accepting raw workflow json/yaml and passing it down to the Diagram component.
  • The DiagramEditorContextProvider component will parse workflow and initialise the store with the resulting model.

Definition of Done

  • Implementation: Fully implemented according to the Serverless Workflow spec.
  • Unit Tests: Comprehensive unit tests are included and passing.
  • Integration Tests: Verified within the monorepo and target environments (Web/VS Code).
  • Documentation: Updated README.md, ADRs, or official docs.
  • Performance: No significant regression in editor responsiveness.
  • Accessibility: UI changes comply with accessibility standards.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions