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

Refresh the view instead of reloading the page when hotswapping takes place #19262

Closed
Artur- opened this issue Apr 26, 2024 · 2 comments
Closed

Comments

@Artur-
Copy link
Member

Artur- commented Apr 26, 2024

Describe your motivation

When a class has been hotswapped, Flow currently refreshes the whole page. This reloads all JS files etc which is typically not needed, causes flickering and takes time.

Describe the solution you'd like

Flow could re-render the component tree for the current view instead of reloading. The implementation needed for this sounds like exactly what is requested in #19244 although that is a different use case

@tepi
Copy link
Contributor

tepi commented May 17, 2024

Needs #19261 to be implemented first

mcollovati added a commit that referenced this issue Jun 18, 2024
Adds API to integrate with hotswap agents and to allow plugging class change
reload plugins.
The hotswapper also tries to refresh the views instead of reloading the
page, if PUSH feature is enabled.

Part of #19261
Part of #19262
mshabarov added a commit that referenced this issue Jun 26, 2024
* feat: add a common API to intergrate with hotswap tools

Adds API to integrate with hotswap agents and to allow plugging class change
reload plugins.
The hotswapper also tries to refresh the views instead of reloading the
page, if PUSH feature is enabled.

Part of #19261
Part of #19262

* don't refresh is navigation has not yet happened

* apply review suggestions

* ignore events after VaadinService is destroyed

* Update flow-server/src/main/java/com/vaadin/flow/router/internal/RouteRegistryHotswapper.java

---------

Co-authored-by: Mikhail Shabarov <[email protected]>
@mshabarov mshabarov assigned tepi and unassigned tepi Jul 1, 2024
@mshabarov mshabarov added this to Roadmap Jul 1, 2024
@github-project-automation github-project-automation bot moved this from September 2024 (24.5) to Under consideration in Roadmap Jul 1, 2024
@mshabarov mshabarov moved this to September 2024 (24.5) in Roadmap Jul 1, 2024
@mcollovati
Copy link
Collaborator

Releated PR #19650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Under consideration
Development

No branches or pull requests

4 participants