Add an `Undo` button to revert to user state after clicking on `Solve`
Describe the bug
Hello 👋,
The editor does not retain the changes when showing the solution.
Link to a StackBlitz project which shows the error
No response
Steps to reproduce
- Go to https://demo.tutorialkit.dev/forms-tutorial/introduction/welcome/
- Change something in the editor
- Click on
solve - Click on
reset
No more changes
Expected behavior
Maybe this is an expected behavior but having the ability to compare my solution with the provided is important in the process to learn. The reset button could still exists but to clean the editor, not to go back to the user solution.
Screenshots
No response
Platform
- TutorialKit version: [e.g. 1.0.1]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Hey @Barbapapazes! Thanks for opening this issue!
This is indeed the expected behaviour. You have a similar experience on https://learn.svelte.dev for instance.
I do think we could have an "Undo" button / feature as right now pressing Solve and then Ctrl+z will only work for the currently opened file.
I would argue that "Reset" has the intended behaviour though as being able to go back to the initial state is also very useful.
@AriPerkkio Let's mark this as an enhancement instead of a bug.