Changes since 24.2.0
This is the Vaadin Flow 24.3 GA release for Vaadin 24.3.
Vaadin Flow 24.3 is based on Jakarta EE 10 / Servlet 6.0 specifications, uses Spring Framework 6 / Spring-boot 3 and requires JDK 17+.
Breaking changes
-
Upgrade to Spring-Boot 3.2
Pull requestUpgrades Vaadin Spring add-on to use Spring-Boot 3.2. This upgrade shouldn't bring any breaking changes to Vaadin Flow applications, but might need a migration for other dependencies, e.g. H2 database or Hibernate. See Release Notes for breaking changes, features and deprecations in this version.
-
Replace outdated WebPush dependency
Commit · Pull requestUpgrades to another WebPush implementation
dev.blanke.webpush:webpush
, which is better maintained.nl.martijndwars.webpush.Subscription
andnl.martijndwars.webpush.Keys
need calls to the methods, not to the fields: e.g. before -subscription.endpoint;
, after -subscription.endpoint();
. -
Upgrade to Vite 5
Commit · Pull requestVite 5 is based on Rollup v4. The major breaking change there is dropping support for Node < 18 which does not affect Flow. There might be other potential plugin issues though. Vite 5 also drops support for accidentally importing styles twice, i.e.
ts import styles from 'hello.css'
To import styles and apply globally, you should dots import 'hello.css'
and to import styles as a string you need to dots import styles from 'hello.css?inline';
-
Implement HasPlaceholder
AddsHasPlaceholder
interface that can be used in components with placeholder property.This changes also the result type of
Input.getPlaceholder()
fromOptional<String>
toString
to unify the return type forInput
and for all other components, e.g.TextField
.Commit · Pull request · Issue
New features
-
Flow-Hilla Hybrid Applications
Pull request · DocsMakes it possible to add and use Vaadin Flow routes in Vaadin Hilla + React applications and vice versa.
Please follow the steps in the linked documentation to try it in your applications. -
New Navigation Access Control API
Pull request · DocsAdds the URL-based access checker in addition to existing Vaadin annotation-based access checker.
Allows to add custom access checkers and customise overall access control configuration.
URL-based access checker is mainly for cases when Spring URL-based security is used with no Vaadin annotation-based access checker (e.g. where custom access logic is implemented) to secure Vaadin routes when navigation is done withRouterLink
,Anchor
and server-side navigation. -
Reuse the production bundle if no changes
Commit · Pull request · IssueMakes a copy of the production bundle in
src/main/bundles/prod.bundle
zip file to make it possible to reuse it without recreating same unchanged bundle again. When prod.bundle exists, it will be used as a primary source for stats.json file. -
Use dev-bundle from build folder
Commit · Pull request · IssueMove devBundle to build folder and create a single compressed file for devBundle that can be committed into the versioning system.
-
Default I18N provider
Commit · Pull request · Issue · DocsAdd implementation for a I18N provider that is loaded if there are translation properties files in the defined classpath folder
vaadin-i18n
. If a custom I18N is set, default will never be loaded. -
Show error view on action exception
Commit · Pull request · Issue · DocsIf there is a error view for the thrown exception during RPC handling update view to error view. Using the util class enables custom error handlers to also opt in to the feature.
-
Reset focus on active element in ShortcutRegistration
Commit · Pull request · Issue · DocsAdds
setResetFocusOnActiveElement
,resetFocusOnActiveElement
andisResetFocusOnActiveElement
toShortcutRegistration
class to optionally reset focus on active element (focused element in browser). Resetting means calling blur() and focus() on the active element to ensure that input fields with ValueChangeMode ON_CHANGE will fire value change event before shortcut handler is run.This ensures any pending input value change events for that focused element are submitted before a shortcut is activated.
-
Add AccessDeniedException for ViewAccessChecker
Commit · Pull request · Issue · DocsViewAccessChecker
is changed to throwAccessDeniedException
instead ofNotFoundException
by default when access is denied. Added default error pageRouteAccessDeniedError
for theAccessDeniedException
. Page is same asRouteNotFoundError
by default (extendsAbstractRouteNotFoundError
). AddedAccessDeniedErrorRouter
annotation to
customise rerouting of access denied error per route withAccessDeniedErrorRouter#rerouteToError
. -
Add getActiveViewLocation and getActiveRouterTargetsChain to UI
Commit · Pull request · IssueAdds new public API for already existing features in
UIInternals
.UI#getActiveViewLocation()
is shortcut toUIInternals#getActiveViewLocation()
andUI#getActiveRouterTargetsChain()
is shortcut toUIInternals#getActiveRouterTargetsChain()
. -
Add Div constructor that accept text content
Commit · Pull request · Issue -
Log JavaScript exceptions in production mode
Pull request · Issue -
Add RouteParameters to AfterNavigationEvent
Commit · Pull request · IssueAdds a getter for RouteParameters in AfterNavigationEvent.
-
Add Component/Element to ErrorEvent
Commit · Pull request · Issue · DocsNow it is possible to query for the element/component that threw the exception leading to the ErrorEvent.
-
Add default I18N provider bean for Spring
Commit · Pull request · IssueExtends DefaultI18NProvider (#5917) for Spring.
VaadinApplicationConfiguration
definesDefaultI18NProvider
bean and initializes it with locales based on translation properties files found in the classpath under '/vaadin-i18n' path. -
Restrict debug websocket connection to loopback addresses by default
Commit · Pull requestUsing the
devmode.hostsAllowed
property, you can define additional addresses (comma separated list using */? wildcards) that are allowed to use the debug websocket connection. -
Implement RangeInputElement
Commit · Pull request · Issue -
Anchor handling for react-router (#18141)
Commit · Pull requestAdd anchor handling so we do not loose all data for flow navigation.
-
Show informative page during dev-bundle creation (#18140)
Commit · Pull request · IssueWhen a new dev-bundle is required, the server startup is blocked until the bundle creation completes. This change allow the server startup to complete, showing an informative page to the user until the bundle creation is completed.
Fixes
-
Throw for missing server routes (#18242)
Commit · Pull request · IssueIf serverSideRoutes is missing from the routes.tsx then log error on what to do and throw exception.
-
Consider theme variants from JAR in bundleImports (#18248)
Commit · Pull request · IssueBundleUtil computes import paths for component theme variants from npm packages, but it does not consider variants from JAR add-ons. This change applies the same import rules for both variants from npm packages and JAR unpacked in the fronted generated folder.
-
Also show drag over style when effect is undefined (#18171)
Commit · Pull request -
Generate files to Frontend (#18241)
Commit · Pull request · IssueGenerate the App.tsx and routes.tsx to Frontend and correct the import in index.ts.
-
Remove old bundle in clean-frontend goal or task (#18179)
Commit · Pull request