Releases: vaadin/flow
Vaadin Flow 24.6.0.beta3
No changes since 24.6.0.beta2
Vaadin Flow 24.6.0.beta2
Changes since 24.6.0.beta1
New features
-
Generate PWA icons at build time
Commit · Pull request · IssueGenerates PWA icons during the production build, preventing the need to use AWT APIs at runtime and making first requests to the application faster. Also prevents potential issues caused by loading AWT native library in native images.
Fixes
-
Vaadin/router added with react-router
Commit · Pull request · IssueExclude vaadin/router when runing in react mode. Without exclusion vaadin/router gets added from the vaadin-core.json package in platform.
-
Attach element when used in drag source
Commit · Pull request · IssueAttach elemnt to dom and move it outside of the viewport to have it visible as a drag image. Image can be used without attaching to dom. Hidden elements are also not shown so throw exception when using one as dragImage. Log attach as debug now that the
-
Exclude project maven dependencies from isolated class loader
Commit · Pull requestIf the user project directly or transitively depends on maven artifacts, mojos can fail at runtime because of Maven API loaded from both isolated class loader and maven.api realm. This change prevents maven artifacts from being added to the isolated class loader.
-
Prevent blocking when closing ViteWebSocketConnection
Commit · Pull request · IssueThis change prevent ViteWebSocketConnection to wait indefinitely on close waiting for the client websocket to close request to complete.
-
Production also with file extensions
Commit · Pull requestAlso use file extensions with production build.
-
Fix class and resource loading in maven plugin
Commit · Pull request · Issues 19616, 19009, 20385Run Flow mojos using an isolated class loader that includes both project and plugin dependencies, with project dependencies taking precedence. This ensures that classes are always loaded from the same class loader at runtime, preventing errors where a class might be loaded by the plugin's class loader while one of its parent classes is only available in the project’s class loader (see #19616). Additionally, this approach prevents the retrieval of resources from plugin dependencies when the same artifact is defined within the project (see #19009). This refactoring also introduces caching for ClassFinder instances per execution phase, allowing multiple goals configured for the same phase to reuse the same ClassFinder. It also removes the need to instantiate a ClassFinder solely for Hilla class checks, reducing the number of scans performed during the build.
Vaadin Flow 24.6.0.beta1
All Changes since Vaadin Flow 24.5
Breaking changes
-
Upgrade minimum supported Gradle version to 8.7
Commit · Pull requestJackson 2.18 is incompatible with Gradle 8.4 because it contains classes compiled with Java 22. This change bumps Gradle minumum supported version to 8.7 that supports Java 22.
-
WebPush Subscription Wrapper and feature flag removal
Commit · Pull request
New features
-
Add drag image for DragSource
Commit · Pull request · Issue · DocsAdds
DragSource#setDragImage(ComponentDragImage )
andDragSource#setDragImage(Component dragImage, int offsetX, int offsetY)
. API is used to set image component as a drag image for drag source component. Follows specification of HTML Drag and Drop API for DataTransfer#setDragImage() method.
Examples:CardComponent card = new CardComponent(); // use Image component as a drag image card.setDragImage(new Image("/cards/ace_of_spades.png", "Ace of Spades"));
// use an arbitrary Flow component as a drag image // needs to be present in the DOM Span dragImage = new Span("Drag Image Component"); Style dragImageStyle = dragImage.getElement().getStyle(); dragImageStyle.setPosition(Style.Position.ABSOLUTE); dragImageStyle.setTop("-100px"); dragImageStyle.setLeft("-100px"); add(dragImage); dragSource.setDragImage(dragImage);
-
Extend WebPushMessage with the custom settings
Commit · Pull request · Issue · DocsAdds a Java API for setting the custom options as described in https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification#parameters.
Note that this isn't an experimental feature anymore.WebPushAction webPushAction = new WebPushAction("dashboard", "Open Dashboard"); WebPushOptions webPushOptions = new WebPushOptions(body, List.of(webPushAction), "This is my data", "https://example.com/my-icon.png"); webPush.sendNotification(subscription, new WebPushMessage(title, webPushOptions));
-
Enable easier override for SpringServlet
Commit · Pull request · Issue · DocsCan be done by providing a custom Spring configuration class, see linked docs for more details.
-
Add support for customizable projectFileExtensions
Commit · Pull request · Issue -
Opt-out web components from package.json
Commit · Pull request · DocsAdds new property
npm.excludeWebComponents
(ornpmExcludeWebComponents
in Maven configurations). By default, it'sfalse
and everything works as before.true
will exclude all Vaadin web component dependencies frompackage.json
for development mode (Vite/dev bundle) and production bundle build. Excluded dependencies are all Vaadin core components (e.g. button, grid, login, etc.) and commercial components (e.g. charts, rich-text-editor, etc.), but not lumo/material themes. -
Fire an event when all hotswap operations have completed
Commit · Pull request
Contributions 🏅
-
Calling VaadinService.access or accessSynchronously leaks UI ThreadLocals by @archiecobbs
Pull Request · Issue -
VaadinSessionScopes for all sessions are destroyed when any single session expires by @archiecobbs
Pull Request · Issue -
Add nodeVersion in gradle plugin settings by @mrk-andreev
Pull Request · Issue -
Add support to customizable the projectFileExtensions by @oliveryasuna
Pull Request · Issue
Vaadin Flow 24.6.0.alpha6
Changes since 24.6.0.alpha5
Breaking changes
- WebPush Subscription Wrapper and feature flag removal
Commit · Pull request
Fixes
- Refresh locations arrays also
Commit · Pull request
Vaadin Flow 24.6.0.alpha5
Changes since 24.6.0.alpha4
Fixes
-
Do not log 'send XHR' for each request
Commit · Pull request -
Add missing reflection hints for menu
Commit · Pull request · Issue -
Delay session expiration handling to prevent canceling ongoing navigation
Commit · Pull requestAttempts to fix the synchronization issue related to the usage of the Login reported in #12640. The Login component sends the UIDL request for the login event to the server and concurrently submits the form. If processing the form submission performs a session ID change and a request redirect, the UIDL requests might fail with a session expiration response. The Flow client then can cancel the first redirect because it reloads the page due to the session expiration. Lastly, the beacon request hits again a valid session, but a resynchronization is triggered because the previous UIDL request was rejected. This change delays a bit the session expiration handling on Flow client, to allow a potential redirect to complete without being cancelled. However, the client application is immediately set in TERMINATED state.
Vaadin Flow 23.5.9
Changes since 23.5.8
Fixes
-
Delay session expiration handling to prevent canceling ongoing navigation (#19983)
Commit · Pull requestAttempts to fix the synchronization issue related to the usage of the Login reported in #12640. The Login component sends the UIDL request for the login event to the server and concurrently submits the form. If processing the form submission performs a session ID change and a request redirect, the UIDL requests might fail with a session expiration response. The Flow client then can cancel the first redirect because it reloads the page due to the session expiration. Lastly, the beacon request hits again a valid session, but a resynchronization is triggered because the previous UIDL request was rejected. This change delays a bit the session expiration handling on Flow client, to allow a potential redirect to complete without being cancelled. However, the client application is immediately set in TERMINATED state.
Vaadin Flow 24.5.5
Changes since 24.5.4
Fixes
-
Add missing reflection hints for menu (#20476)
Commit · Pull request · Issue -
Delay session expiration handling to prevent canceling ongoing navigation (#19983)
Commit · Pull requestAttempts to fix the synchronization issue related to the usage of the Login reported in #12640. The Login component sends the UIDL request for the login event to the server and concurrently submits the form. If processing the form submission performs a session ID change and a request redirect, the UIDL requests might fail with a session expiration response. The Flow client then can cancel the first redirect because it reloads the page due to the session expiration. Lastly, the beacon request hits again a valid session, but a resynchronization is triggered because the previous UIDL request was rejected. This change delays a bit the session expiration handling on Flow client, to allow a potential redirect to complete without being cancelled. However, the client application is immediately set in TERMINATED state.
-
Reconnect web components after session expiration (#20407) (CP: 24.5)
Commit · Pull request · Issue -
Client side value binding logic (#20431)
Commit · Pull request · IssueChanges client side value binding logic so that if the user modifies the value during server round-trip, the value earlier sent to the server no longer overwrites user's changes once the round-trip finishes. Instead, user's changes are preserved. However, if the server-side value change handling logic actually changes the value and returns the new value to the client, that value will override any user input during round-trip.
Vaadin Flow 24.4.12
Changes since 24.4.11
Fixes
-
Support serialization of Vaadin scoped beans (#20394)
Commit · Pull request · IssueMakes sure that VaadinSession and UI thread locals are available during both serialization and deserialization, to allow other libraries to perform inspection and injection of Vaadin scoped beans. Also refactors VaadinRouteScope to be independent from VaadinService when fetching RouteScopeOwner annotation for the bean, and replaces VaadinSession.unlock() calls with direct access to the lock instance to prevent unwanted push during bean lookup. Part of vaadin/kubernetes-kit#140
-
Delay session expiration handling to prevent canceling ongoing navigation (#19983)
Commit · Pull requestAttempts to fix the synchronization issue related to the usage of the Login reported in #12640. The Login component sends the UIDL request for the login event to the server and concurrently submits the form. If processing the form submission performs a session ID change and a request redirect, the UIDL requests might fail with a session expiration response. The Flow client then can cancel the first redirect because it reloads the page due to the session expiration. Lastly, the beacon request hits again a valid session, but a resynchronization is triggered because the previous UIDL request was rejected. This change delays a bit the session expiration handling on Flow client, to allow a potential redirect to complete without being cancelled. However, the client application is immediately set in TERMINATED state.
-
Reconnect web components after session expiration (#20407) (CP: 24.4)
Commit · Pull request · Issue -
Client side value binding logic (#20431)
Commit · Pull request · IssueChanges client side value binding logic so that if the user modifies the value during server round-trip, the value earlier sent to the server no longer overwrites user's changes once the round-trip finishes. Instead, user's changes are preserved. However, if the server-side value change handling logic actually changes the value and returns the new value to the client, that value will override any user input during round-trip.
-
Resume client to server communication after web socket reconnection (#20283)
Commit · Pull request · IssueWhen a websocket PUSH connection is closed and re-established because of a network failure, the RequestResponseTracker.hasActiveRequest is not reset, prenvint the Flow client to send additional messages to the server. This change will reset the flag on reconnection. It also will track unsent PUSH message over websocket, to retry the delivery once the connection is re-established, preventing client resynchronization. In addition, it sets a default value of 12 for the Atmospehere maxWebsocketErrorRetries setting, to ensure that the Flow client will attempt to reconnect with web socket transport several times, instead of immediately downgrade to long-polling after first failed connection.
Vaadin Flow 2.11.3
Changes since 2.11.2
Fixes
- Delay session expiration handling to prevent canceling ongoing navigation (#19983) (CP: 2.11)
Commit · Pull request
Vaadin Flow 24.6.0.alpha4
Changes since 24.6.0.alpha3
New features
-
Add support for customizable projectFileExtensions
Commit · Pull request · Issue -
Opt-out web components from package.json
Commit · Pull requestAdds new property
npm.excludeWebComponents
(ornpmExcludeWebComponents
in Maven configurations). By default, it'sfalse
and everything works as before.true
will exclude all web component dependencies frompackage.json
for development mode (Vite/dev bundle) and production bundle build. Excluded dependencies are all Vaadin core components (e.g. button, grid, login, etc.) and commercial components (e.g. charts, rich-text-editor, etc.), but not lumo/material themes.
Fixes
-
Client side value binding logic
Commit · Pull request · IssueChanges client side value binding logic so that if the user modifies the value during server round-trip, the value earlier sent to the server no longer overwrites user's changes once the round-trip finishes. Instead, user's changes are preserved. However, if the server-side value change handling logic actually changes the value and returns the new value to the client, that value will override any user input during round-trip.
-
Reconnect web components after session expiration
Commit · Pull request · IssueAfter session expiration, Flow client in webcomponent mode send a GET request to the server to re-initialize itself with a valid session cookie. However, the XHR call is done with the withCredentials flag set to false, making the browser ignore the Set-Cookie header in the response. This change forces the withCredential flag to true for resync request so that the new cookie can be handled by the browser and reused in the subsequent request that re-intitializes the embedded component. If PUSH is enabled, it also restores the connection after resynchornization request to make sure pending invocation queue, and especially the webcomponent connected events, can be flushed correctly and sent to the server. Also temporarily suspends hearbeat during resynchronization request to prevent issue with concurrent requests, potentially causing duplicated session expiration handling on the client.