Repository navigation
feat: handle blank canvas state in Diagram Editor - #535
kumaradityaraj wants to merge 9 commits into
Conversation
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
🦋 Changeset detectedLatest commit: 1b97f39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for openworkflow-editor ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
🟡 Changes recommended
Loading a workflow through the ref from a blank editor leaves the canvas hidden, while missing backgrounds make empty and loading state text unreadable in dark mode on white hosts.
2 open issues
What changed in this PR
Adds blank-canvas handling to the Diagram Editor for issue #418, giving users guidance when workflow content is empty.
Changes:
- Adds localized empty-state guidance and a loading status.
- Tracks parse completion to avoid transient parsing errors.
- Tests blank-content transitions and updates dual-editor test mocks.
| File | Description |
|---|---|
packages/open-workflow-diagram-editor/tests/test-utils/render-helpers.tsx |
Adds parse-completion state to mock context. |
packages/open-workflow-diagram-editor/tests/diagram-editor/DiagramEditor.test.tsx |
Tests blank content and empty/populated transitions. |
packages/open-workflow-diagram-editor/src/styles.css |
Styles empty and loading states for both themes. |
packages/open-workflow-diagram-editor/src/store/DiagramEditorContextProvider.tsx |
Tracks content processed through props and imperative loading. |
packages/open-workflow-diagram-editor/src/store/DiagramEditorContext.tsx |
Exposes processed content in the context type. |
packages/open-workflow-diagram-editor/src/i18n/locales/en.ts |
Adds English empty-state and loading messages. |
packages/open-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx |
Selects empty, loading, error, or diagram views. |
packages/dual-editor/tests/DualEditor.test.tsx |
Replaces state-based textarea mocks with ref-backed mocks. |
Review effort: Balanced
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the tests check only the post-effect DOM and cannot rule out a transient parsing-error alert during the blank-to-valid transition.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
|
Thanks @kumaradityaraj , one very small comment on wording |
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
|
@lornakelly ready for review again. |

closes - #418
Summary
Screenshot