-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[feat] Track unsaved files in REPL #6153
Conversation
The site was migrated to SvelteKit, so this would need to be rebased I'm curious your thoughts between this and #6251 since it seems like we would only need one of the two functionalities |
I think this feels better (and safer) than #6251. This would need a rebase though. |
d51103b
to
05a1841
Compare
i've rebased the branch, looks good now. Need to publish a new version of the REPL after sveltejs/svelte-repl#156, before merging this branch |
acbf4fc
to
938ca7f
Compare
I pushed a new version with updated REPL, but the site won't load now. Hopefully Vite 2.7 will fix this or at least give a better error message. I can't easily test with pnpm overrides because I'm not sure how to update our crazy codemirror setup in |
I tracked down the error to an issue in the REPL change: sveltejs/svelte-repl#188 |
938ca7f
to
eaf7202
Compare
Fixes sveltejs/svelte-repl#117
If a user has unsaved changes in the REPL and navigates away, all changes are lost. This has bit me quite a few times.
This PR adds a warning "There are unsaved changes" to prevent any the data loss.
This change is in conjunction with sveltejs/svelte-repl#156.
I'm opening this PR so that we can discuss if this method is correct or if we should a different path.
Before submitting the PR, please make sure you do the following
Tests
npm test
and lint the project withnpm run lint