Skip to content

Add undo support to the editor#63

Open
JustABiologist wants to merge 1 commit into
dionyziz:masterfrom
JustABiologist:bounty-undo-23
Open

Add undo support to the editor#63
JustABiologist wants to merge 1 commit into
dionyziz:masterfrom
JustABiologist:bounty-undo-23

Conversation

@JustABiologist
Copy link
Copy Markdown

Summary: Adds Ctrl/Cmd+Z undo support backed by the existing NFA view serialization. Records checkpoints before structural editor changes including state creation/deletion, state movement, transition edits, accepting-state changes, start-state changes, and label edits. Clears transient selection/input state after an undo so restored automata render cleanly. Verification: node -c site/js/editor.js; node-based smoke test for undoing state creation, accepting toggle, state rename, and transition label edit. Closes #23. If accepted for the listed bounty, PayPal payout can be sent to stab.me.papi@gmail.com.

@JustABiologist
Copy link
Copy Markdown
Author

Manual test matrix for the undo bounty:

  • Create a state, undo, and confirm the state is removed.
  • Toggle accepting state, undo, and confirm the accepting flag is restored.
  • Rename a state, undo, and confirm the original label is restored.
  • Edit a transition label, undo, and confirm the original label is restored.
  • Syntax check passed for site/js/editor.js; I also ran a Node smoke test across these undo paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add undo ability

1 participant