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

feat: SSR - Reload browser automatically on hot reload #1556

Open
2 tasks
moshe5745 opened this issue Oct 28, 2024 · 2 comments
Open
2 tasks

feat: SSR - Reload browser automatically on hot reload #1556

moshe5745 opened this issue Oct 28, 2024 · 2 comments
Labels
feature A new feature or request p3 Issues that we currently consider unimportant

Comments

@moshe5745
Copy link

Description

Right now we need to manually reload the page to see the change when hot reload triggered

Think that auto-reload the browser is a crucial part of good DX

Requirements

  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.

Additional Context

No response

@moshe5745 moshe5745 added the feature A new feature or request label Oct 28, 2024
@moshe5745 moshe5745 changed the title feat: Reload browser automatically on hot reload feat: SSR - Reload browser automatically on hot reload Nov 4, 2024
@tomarra
Copy link
Contributor

tomarra commented Nov 5, 2024

Thanks for opening this issue @moshe5745 👋

This is a good suggestion and one that would make Dart Frog development feel a bit more like Flutter based development. The first feedback from the team on this is that having some kind of add in being injected when running in Debug mode that would have an open socket back to the Dart Frog server listening for server updates. When an update is received reload the page. This would have the side effect of breaking the current flow that the user is in as there wouldn't be any context saved across the page reload but overall would allow for the Hot Reload functionality.

This feels like something that our proposed Plugin system could be used for as it would be hooking into the build process at certain times. We need to get through that work before implementing this but we can leave this ticket open to try and discuss the implementation specifics and get them documented here before any code get's written.

@tomarra tomarra added the p3 Issues that we currently consider unimportant label Nov 5, 2024
@tomarra tomarra moved this from Needs Triage to Backlog in VGV Open Source 🦄 🧙🌟 Nov 5, 2024
@moshe5745
Copy link
Author

moshe5745 commented Dec 15, 2024

This would have the side effect of breaking the current flow that the user is in as there wouldn't be any context saved across the page reload

I don't think we care about "SPA like" state
If we do SSR the client state would be minimal and probably backed up in local storage(like Alpine.js do)

But there is another scenario that could be annoying
When you fill-up a form and it reset on reload
A solution to this could be to save the state of forms in the Dart Frog server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or request p3 Issues that we currently consider unimportant
Projects
Status: Backlog
Development

No branches or pull requests

2 participants