Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Undo button to revert to user state after clicking on Solve #216

Open
Barbapapazes opened this issue Aug 6, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Barbapapazes
Copy link

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

  1. Go to https://demo.tutorialkit.dev/forms-tutorial/introduction/welcome/
  2. Change something in the editor
  3. Click on solve
  4. 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

@AriPerkkio AriPerkkio added the bug Something isn't working label Aug 6, 2024
@Nemikolh
Copy link
Member

Nemikolh commented Aug 6, 2024

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.

@Nemikolh Nemikolh added enhancement New feature or request and removed bug Something isn't working labels Aug 6, 2024
@Nemikolh Nemikolh changed the title editor does not keep changes after clicking on solve Add an Undo button to revert to user state after clicking on Solve Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants