Keep rich text when a form is sent before Editor.js has loaded (#42) #45
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/42-description-before-editor-ready"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #42.
Summary
A guide, category or step form sent before Editor.js has loaded has no
description/contentfield. The server used to read that as empty and store SQL NULL. A missing rich text field now means "unchanged":linesfield still fails as before.Evidence
e2e/richText.spec.tsblocks the script chunks that contain Editor.js, then saves:getByText('You need a radiator key.')andgetByText('Use citric acid, not vinegar.')are not found, because the description and the step content were wiped.After:
2 passed.src/richText/submission.test.ts: a form withoutdescriptiongives{unchanged : true};description=""gives{json : null}.access.spec.ts(#43).Merge Danger
Door: two-way
No schema change or migration. Reverting restores the old behaviour.
Blast Radius: saving
Affects only saving guides, categories and steps. Risk: a client that leaves the field out on purpose to clear a document would now keep it. No form does that today; clearing sends an empty editor document.
🤖 Generated with Claude Code