Changes since 24.1.0
This is a Flow 24.2 GA release for Vaadin 24.2.
Flow 24.2 is based on Jakarta EE 10 / Servlet 6.0 specifications, uses Spring Framework 6 / Spring-boot 3 and requires JDK 17+.
New features
-
Server-side API for Web Push Notifications
Acceptance CriteriaVaadin provides an API in Flow to send Web Push Notifications from the server to the client's browsers.
Read more about Web Push API in our online documentation and try base starter or CRM example project, that shows how to store Web Push subscriptions in database. -
Incremental Gradle builds for vaadinPrepareFrontendTask
Commit · Pull request · Issue · Acceptance CriteriaDefines the inputs and outputs for
vaadinPrepareFrontendTask
of Vaadin Gradle plugin making it possible to skip the task and reduce build time in development mode if inputs and outputs are not changed, e.g. if project configuration not changed and no clean-up made, givingUP-TO-DATE
result, according to incremental builds feature.Can be turned off with:
vaadin { alwaysExecutePrepareFrontend = true }
Read more about this feature in our online documentation.
-
Faster server reloads for Spring-based applications
Acceptance CriteriaServer reload time in Vaadin 24.2 is less by ~53% in average than for Vaadin 24.1, which gives a better developer experience for live-reload of Java changes.
This was made by caching the various internal Flow data between server reloads and by optimising File Watcher time intervals.
The caching is something already implemented in Flow, so no actions from developers are needed, whereas the later depends on the project and IDE. Read our recommendations for a better tuning of time intervals in your project. -
Dev Tools plugin support
Commit · Pull requestYou can implement a Dev Tools plugin, i.e. a tab or component that is accessible in Vaadin's Dev Tools window when you run in development mode, by
- Adding a class that implements
DevToolsMessageHandler
to handle messages from the browser - Annotate the class with
@JsModule(value="./my-plugin.ts", developmentOnly = true)
to load the client side part - Add a service loader metadata file
src/main/resources/META-INF/services/com.vaadin.base.devserver.DevToolsMessageHandler
with the name of the class The client side part needs to register itself using
const plugin: DevToolsPlugin = { init: function (devToolsInterface: DevToolsInterface): void { // Add a tab using the interface, store the reference for communication later } }; (window as any).Vaadin.devToolsPlugins.push(plugin);
See documentation for more details.
- Adding a class that implements
-
Upgrade Node.js to v20.8.0 (#17744)
Pull request -
Upgrade Vite to 4.4.11 (#17780)
Pull request -
Add API for Web Storage
Commit · Pull request · IssueAdd server-side API for Browser's Web Storage (
window.localStorage
&&window.sessionStorage
). -
Theme Editor input overlays
Commit · Pull request -
Introduce Theme Editor tests
Commit · Pull request · IssueCreate test module for a Theme Editor.
-
Theme Editor undo/redo shortcuts
Commit · Pull request · IssueSupport undo/redo shortcuts for a Theme Editor.
-
Support for vaadin-custom-field, vaadin-upload in Theme Editor
Commit · Pull request -
Theme Editor Grid and TreeGrid support, fixed issue with Java Parser and unsupported Records
Commit · Pull request -
Allow modifying QueryParameters
Commit · Pull request · Issue -
Fail fast when Vaadin Plugin is used with an unsupported version of Gradle
Commit · Pull request · IssueChecks the Gradle version when applying the plugin and fails fast if it is unsupported.
-
Add deactivate event for Dev Tools tabs
Commit · Pull request -
Introduce manual validation mode for manual control of invalid state
Commit · Pull request -
Prevent logging of ignored exceptions
Commit · Pull request · IssueFlow default error handler logs all caught exceptions. However, there may be exceptions thrown by servlet container that are meant to be tracked only at debug level (e.g. Jetty QuietException implementors). This change prevents logging of similar 'quiet' exception, unless the DefaultErrorHandler logger level is set to debug or higher.
-
Track Hilla version in the usage statistics file
Commit · Pull request -
Add Platform::getHillaVersion() method
Commit · Pull request -
Development mode only scripts using AtJsModule(developmentOnly=true)
Commit · Pull requestGoal is to enable to load dev tools related scripts.
-
Overloaded RouteParam constructor with Integer and Long
Commit · Pull request · Issue -
Added shorthands for QueryParameters class
Commit · Pull request · Issue -
Improve error messages in Text methods
Commit · Pull request · IssueMake sure that calling methods inherited from HasStyles and that doesn't make sense in Text, throw a UnsupportedOperationException with a descriptive message. The methods that got better error messages are those that could update a component: addClassName, removeClassName, setClassName, addClassNames, removeClassNames.
-
Dispatch popstate event on server-side navigation
Commit · Pull request -
Grid-pro metadata, minor grid metadata update
Commit · Pull request -
Overlay resolver, metadata for overlay components
Commit · Pull request -
Upgrade Pnpm version to latest 8.6.11
Pull request -
Update navigation method signatures
Commit · Pull request · IssueThis change makes UI#navigate, BeforeEvent#rerouteTo and BeforeEvent#forwardTo methods more consistent without changing the existing API:
- adds new methods in BeforeEvent that accepts route parameters.
- adds new methods in BeforeEvent that accepts query parameters.
- improves forwardTo and rerouteTo to accept route parameters being part of the location String (same way as UI#navigate does it already).
-
Record usage statistics when incremental build feature is disabled
Commit · Pull request -
Added methods to prevent default and stopping propagation
Commit · Pull request · Issue
Fixes
-
Prevent deadlock when accessing FeatureFlags
Commit · Pull request · Issue -
Synchronise cache maps in SpringLookupInitializer
Commit · Pull requestTo avoid possibility to get ConcurrentModificationException.
-
Delay requests to dev-server during restart
Commit · Pull request · IssueThe dev-server may restart itself when some resources are modified. In this situation incoming requests fails with a connection exception until the server is ready again. This change introduces a check that delays requests that happen during dev-server restart until the reboot operation has completed.
-
Update types.d.ts if needed
Commit · Pull requestIf the content for types.d.ts has updated update the file contents even if it already exists.
-
Fix setItems error message to be compliant with the current implementation
Commit · Pull request · IssueIn HasLazyDataView.setItems the error message says: "Trying to use exact size with a lazy loading component without either providing a count callback for the component to fetch the count of the items or a data provider that implements the size query. Provide the callback for fetching item count with component.getLazyDataView().withDefinedSize(CallbackDataProvider.CountCallback); or switch to undefined size with component.getLazyDataView().withUndefinedSize();" Since 2020 the API has changed. This fixes javadoc to be consistent with the implementation.
-
Generate d.ts for dev tools so plugins can use it
Commit · Pull request -
Load Vaadin version from pom.properties
Commit · Pull request · Issuevaadin-core-versions.json
file is present both invaadin-core.jar
andhilla.jar
. For hybrid projects, the outcome ofPlatform.getVaadinVersion()
is un-deterministic. This causes the function to parsepom.properties
file instead. -
Avoid clearing Vaadin UI-scoped Spring beans on re-sync
Commit · Pull request · IssueSpring beans scoped with 'vaadin-ui' scope name (UIScope annotated) are normally cleared when VaadinUIScope detach handler is called. Usually its done when UI is closing. Re-synchronization is an exception. With this fix, resync will call VaadinUIScope detach handler as before, but it doesn't clear bean storage unless UI is marked explicitly for closing.
-
Only import theme files from the active theme
Commit · Pull request · Issue -
Add support for Java Time types for Element properties
Commit · Pull request · IssueAllows POJOs with Java Time members to be serialized as Element JSON properties. To avoid breaking changes, the Object mapper WRITE_DATES_AS_TIMESTAMPS feature is left as default, so some types such as LocalTime, LocaDate and LocalDateTime are serialised as arrays of numbers, as documented in Jackson JavaTimeModule.
-
Do not force chokidar version
Commit · Pull requestThe old chokidar version was used by Webpack 4.
-
Set restart monitor before checking for dev server connection
Commit · Pull requestIf hot reload is enabled, e.g. with Spring Dev Tools, during Java server restart the check for active dev-server connection may temporarily fail because the dev-server is restarting. This change finds and sets the currently active restart monitor before checking for dev-server connection, so that the check will wait for a potential restart to complete.
-
Disable Java live reload if theme editor is opened
Commit · Pull request · IssueEnabled Java live reload closes theme editor which in turn leads to loosing user context.
-
Fail when adding null component event listener
Commit · Pull requestCurrently, it is possible to add component event listeners pointing to a null reference. At runtime an NPE is thrown, but for an internal wrapper class, making difficult to spot where the null reference comes from. This change will throw immediately if null is given as a component event listener.
-
Fixed issue with using child selector, accordion metadata updates
Commit · Pull request -
Do not register requests while flush in progress
Commit · Pull requestThis change replaces the flush request canceling approach using a "flush in progress" flag. While a registered flush is triggered, until it ends, no other flush requests will be registered. With this change, any edge cases regarding registering multiple flush requests during the same round-trip should be dealt properly.
-
Do not include dev dependencies when locking versions using package.json
Commit · Pull request · Issue -
Add webpush to flow-bom
Commit · Pull requestUpdate bad error handler message.
-
Remove frontend directory from prepare frontend output list
Commit · Pull request -
Binder throws NPE and eats a relevant exception
Commit · Pull request -
Set Kotlin language version
Commit · Pull request · IssueSet the Kotlin language version to be the same as java.
-
Update Gradle to support JDK 20
Commit · Pull request · IssueUpdate tests and Gradle wrapper so that it can be run with JDK 20.
-
Use released commons-fileupload2
Commit · Pull request · IssueSwitch to using the released
commons-fileupload2-jakarta
instead of the old self maintained copyflow-commons-upload
. -
Added class can be with / (#17783)
Commit · Pull requestOn windows at least the added class can come in the format com/example/application/Hello in which case the cache throws a IndexOutOfBounds exception for the range [0, -1].
-
Be less verbose when Vite is not running (#17730)
Commit · Pull request · Issue -
Disable the Vite public directory to not interfere with a folder named 'public' (#17732)
Commit · Pull request -
Do not override user npm dependency version (#17661)
Commit · Pull request · Issue