Description
Dependency: #48
Add the parsed workflow model 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 and clearing it when the component unmounts.
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
Diagram component will handle deserialization and, if successful, initialise the store with the resulting model.
Definition of Done
Description
Dependency: #48
Add the parsed workflow model 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 and clearing it when the component unmounts.
Motivation
The editor needs a central place to hold the workflow model so that all components can access it without prop drilling.
Proposed Implementation
DiagramEditorcomponent 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 theDiagramcomponent.Diagramcomponent will handle deserialization and, if successful, initialise the store with the resulting model.Definition of Done