Skip to content

Svelte 5 REPL: reload button #1126

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

Open
7nik opened this issue Jun 7, 2024 · 5 comments · May be fixed by #1300
Open

Svelte 5 REPL: reload button #1126

7nik opened this issue Jun 7, 2024 · 5 comments · May be fixed by #1300

Comments

@7nik
Copy link
Contributor

7nik commented Jun 7, 2024

Describe the problem

While messing with REPLs, I often want to "reload the page" / reset the state. However, the only way to do this currently is to add or remove a meaningless space in a code.

Describe the proposed solution

Add a button that "reloads the page" / resets the state.

Importance

nice to have

@Conduitry
Copy link
Member

Because the contents of all of the files are serialized into the URL, you can already just use the browser's refresh button for this, which seems sufficient to me.

@7nik
Copy link
Contributor Author

7nik commented Jun 8, 2024

Reloading the browser page will trigger re-fetching resources (compiler, bundler, imported modules, etc) and their initialization. The workaround with a space is more efficient and sometimes even faster.

@Rich-Harris
Copy link
Member

I can relate to this. I'd even venture to suggest intercepting Cmd+R/Ctrl-R keypresses while the output window is focused (maybe that's a step too far).

Design question though: where should the button go? It doesn't really make sense to have it in the space to the right of 'AST Output' since it only applies to the 'Result' tab, and it can't obscure the content. Maybe inside the 'Result' button?

@7nik
Copy link
Contributor Author

7nik commented Jun 8, 2024

I also think it should be inside the Result button. Otherwise, it becomes unclear what it reloads.

@7nik
Copy link
Contributor Author

7nik commented Jan 25, 2025

It should be moved to svelte.dev repo.

@Rich-Harris Rich-Harris transferred this issue from sveltejs/svelte Jan 26, 2025
@7nik 7nik linked a pull request Apr 14, 2025 that will close this issue
3 tasks
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 a pull request may close this issue.

3 participants