Releases: vaadin/flow
Vaadin Flow 24.5.2
Changes since 24.5.1
Fixes
-
Client route collisions (#20327)
Commit · Pull requestcollision to not take into account client layouts as they are not route targets.
-
Add types to fix some TS warnings in vite.generated.ts (#20270)
Commit · Pull request
Vaadin Flow 24.5.1
Changes since 24.5.0
New features
- Enable easier override for SpringServlet (#20276)
Commit · Pull request · Issue
Fixes
-
Use capture for dragLeave (#20291)
Commit · Pull request -
Support client route parameters in auto layout path matching (#20284)
Commit · Pull request · IssueImproves navigation path matching with client route templates. Adds support for matching with route parameters to find automatic Flow main layout for client routes.
-
Check for client route conflicts (#20188)
Commit · Pull request · Issue -
Clear CurrentInstance before invoking new session tasks (#6349) (#20255)
Commit · Pull request · IssueCommands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService). Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.
-
Prevent possible error on embedded component disconnect (#20260)
Commit · Pull request
Vaadin Flow 24.4.10
Changes since 24.4.9
Fixes
-
Clear CurrentInstance before invoking new session tasks (#6349) (#20255)
Commit · Pull request · IssueCommands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService). Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.
-
Prevent possible error on embedded component disconnect (#20260)
Commit · Pull request -
Force hotdeploy with hilla (#20251)
Commit · Pull request -
Resolve route parameters when rerouting and forwardin with query parameters (#20210)
Commit · Pull request · Issue -
VaadinSessionScopes for all sessions are destroyed when any single session expires #20092 (#20103)
Commit · Pull request -
Perform server navigation roundtrip only when client side navigation is completed (#20187) (CP: 24.4)
Commit · Pull request · Issue -
Always fetch reactEnabled from service (#20125) (CP: 24.4)
Commit · Pull request -
Consider layout prefixes when checking for route and alias paths (#20126)
Commit · Pull request · Issue -
Allow null response in logout (#20057)
Commit · Pull request · IssueDon't throw NullPointerException in case of null VaadinServletResponse in AuthenticationContext#logout. Tolerate null response better in case when running with @Push(transport = Transport.WEBSOCKET), or when response is null for some other reason. Makes logout also work in WEBSOCKET mode by automatically switching to WEBSOCKET_XHR for one additional request that executes logout.
Vaadin Flow 24.3.19
Changes since 24.3.18
Fixes
-
Clear CurrentInstance before invoking new session tasks (#6349) (#20255)
Commit · Pull request · IssueCommands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService). Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.
-
Resolve route parameters when rerouting and forwarding with query parameters (#20210) (CP: 24.3)
Commit · Pull request · Issue -
Consider layout prefixes when checking for route and alias paths (#20126)
Commit · Pull request · Issue -
Allow null response in logout (#20057) (CP: 24.3)
Commit · Pull request · IssueDon't throw NullPointerException in case of null VaadinServletResponse in AuthenticationContext#logout. Tolerate null response better in case when running with @Push(transport = Transport.WEBSOCKET), or when response is null for some other reason. Makes logout also work in WEBSOCKET mode by automatically switching to WEBSOCKET_XHR for one additional request that executes logout.
Vaadin Flow 23.5.7
Changes since 23.5.6
Fixes
-
Clear CurrentInstance before invoking new session tasks (#6349) (#20255)
Commit · Pull request · IssueCommands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService). Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.
-
Resolve route parameters when rerouting and forwarding with query parameters (#20210) (CP: 23.5)
Commit · Pull request · Issue -
Consider layout prefixes when checkin for route and alias paths (#20126) (CP: 23.5)
Commit · Pull request · Issue
Vaadin Flow 2.11.2
Changes since 2.11.1
Fixes
-
Clear CurrentInstance before invoking new session tasks (#6349) (#20255)
Commit · Pull request · IssueCommands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService). Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.
Vaadin Flow 24.5.0
All Changes since Vaadin Flow 24.4
New features
-
Automatic Flow main layouts
DocsVaadin Flow automatically adds the Flow and Hilla routes to the router layout that is marked with
AtLayout
new annotation:// Main Layout: @Layout @AnonymousAllowed public class MainLayout extends AppLayout { } // Flow route: @PermitAll @Route("flow") // no layout reference is needed public class FlowView extends VerticalLayout { }
Includes the following commits:
-
Automatic Flow layout
Commit · Pull requestAutomatically match layout for both flow and hilla route. format Add server layout usage information to routes.tsx template This reverts commit bad2fec. Have OutletElement as a tsx file in flow-react jar Add javadoc for auto layout getParentLayout method.
-
Generate layout.json
Commit · Pull requestGenerate a layout.json for Hilla to automatically enable server layouts part of vaadin/hilla#2709.
-
-
Dynamic menu items in Flow main layout
DocsCollects and provides
AtMenu
annotated Flow routes and Hilla views filtered by access control resolutions, can be used in the Flow main layout to render links in the navigation bar in a generic way without explicit Java classes for routes:// Use dynamic menus in layout class: List<MenuEntry> menuEntries = MenuConfiguration.getMenuEntries(); menuEntries.forEach(entry -> { sideNav.addItem(new SideNavItem(entry.title(), entry.path(), new SvgIcon(entry.icon())); }; // Flow route @Menu(title = "Flow view", icon = "vaadin:group") @Route("flow") public class FlowView extends VerticalLayout { } // Hilla view export const config: ViewConfig = { menu: { title: "Hilla User page", icon: 'vaadin:user' } }; export default function Hilla() { }
-
Add collectMenuItemsList() to MenuRegistry
Commit · Pull request · Issue -
Get menu views api
Commit · Pull request · IssueCreate MenuRegistry for getting automatic menu views for population.
-
Filter client routes by authentication and role
Commit · Pull requestAdd filtering of menu client routes by checking authentication and roles. Do not check for routes in ClientRoutesProvider as the results are generated from the same source data as the data read/generated by MenuRegistry.
-
-
Flow components as children for React-based component
Doc · Commit · Pull request · IssueAllows having Flow Components as children in a ReactAdapterComponent (Flow wrapper for React component).
// Example of main layout in React with a Flow component as a content in this layout: @Layout @JsModule("./ReactLayout.tsx") @Tag("react-layout") public class ReactLayout extends ReactAdapterComponent implements RouterLayout { @Override public void showRouterLayoutContent( HasElement content) { if (content != null) { // bind Flow component to React element with the "flowContent" key getContentElement("flowContent").appendChild(content.getElement()); } } }
// Main Layout in React class ReactLayoutElement extends ReactAdapterElement { protected render(hooks: RenderHooks) { const content = hooks.useContent('flowContent'); return ( <div style={{flexGrow: 1, padding: '20px'}}> <AppBar position="fixed"> <Toolbar> <Typography variant="h6" component="div"> React Layout </Typography> </Toolbar> </AppBar> {content} </div> ) } } customElements.define('react-layout', ReactLayoutElement);
-
HotSwap improvements
Provides a single endpoint for hotswap tools that internally chooses the best strategy of UI update - full page reload or UI component reload.
Includes the following commits:
-
API for reloading current route target
Commit · Pull request -
Add a common API to integrate with hotswap tools
Commit · Pull request
-
-
Record support in Binder
Docs · Commit · Pull requestProvides an API to use Java Records as bean types for read-only beans in Binder.
-
Support for nonce-based strict Content Security Policy
DocsVaadin Flow isn’t generally compatible with strict CSP rules, however, with some effort, nonce-based strict CSP can be used with Vaadin Flow applications. See the linked documentation for how to set it up.
-
Add alternative translate methods to I18NProvider
Commit · Pull request · IssueAdds static
I18NProvider#translate
methods for alternative way to get translation. Compares to calling getTranslation viaVaadinService.getCurrent().getInstantiator().getI18NProvider()
.translate
methods throws IllegalStateException without active VaadinService. -
Speedup startup time by excluding jars
Commit · Pull request · IssueOptimize class scanning of VaadinServletContextInitializer by excluding some commonly used jars and add support for vaadin.blocked-jar boolean property in META-INF/VAADIN/package.properties to exclude whole jar content from the class scanner.
-
Added HasLabelAsText interface to NativeButtonElement.
Commit · Pull request -
Filterable class scanning of JAR
Commit · Pull request · IssueThis change improves optimization of class scanning of
VaadinServletContextInitializer
by reading optional configuration file within a JAR dependency. Configuration file is a regular properties file that can containvaadin.allowed-packages
orvaadin.blocked-packages
to exclude/include packages being scanned byVaadinServletContextInitializer
. Package exclusion/inclusion effects only classes in the JAR/module whereMETA-INF/VAADIN/package.properties
is located at. Notice that this is only affecting the performance of the class scanning of Vaadin specific annotations and types and this feature is not meant to be used for excluding packages from the whole application. E.g. excludingVaadinServiceInitListener
in a Spring application is not stopping Spring and Vaadin initializing it anyway, although some time-consuming actions likeDevModeServletContextListener
would still exclude it for optimization. -
Add raw html table and related components
Commit · Pull request -
Create converters for numeric values from NumberField
Commit · Pull request · IssueThis pull request introduces converter classes which converts between Numeric data types. This change addresses the need for such converters as outlined in issue #5134. With the availability of a NumberField in Vaadin, it is essential to have converters that facilitate the use of various number formats with this component.
-
Add ValueContext.getBinder()
Commit · Pull requestoriginal authors: @archiecobbs and @mstahv
-
Load Lumo utility CSS by default
Commit · Pull requestThe imports have been manually defined in all new starter projects for a long time so this is not supposed to break much anything.
-
Upgrade to TypeScript 5.5
Commit · [Pu...
Vaadin Flow 24.6.0.alpha1
Changes since 24.5.0
Breaking changes
-
Wrap each enum on a separate line when there are many of them
Commit · Pull request -
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.
New features
-
Add drag image for DragSource
Commit · Pull request · IssueAdds
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.
Vaadin Flow 24.5.0.rc2
Changes since 24.5.0.rc1
Fixes
-
Add usage stats for dynamic menu entries (#20212)
Commit · Pull request · Issue -
Add usage stats for automatic menu (#20224)
Commit · Pull request · Issue -
Menu page header path check (#20228)
Commit · Pull requestcheck the actual full path for the view and not the view path. For client entries the AvailableViewInfo.path is only the "route" for the file and not the whole path from parents.
-
Resolve route parameters when rerouting and forwardin with query parameters (#20210)
Commit · Pull request · Issue -
Check parent layouts only if path has a layout (#20214)
Commit · Pull requestPrevents NPE during hotswap when checking if changed classes are layouts for current active target.
-
Use correct encoding when sending translations (#20211)
Commit · Pull request -
VaadinSessionScopes for all sessions are destroyed when any single session expires #20092 (#20103)
Commit · Pull request
Vaadin Flow 24.5.0.rc1
No changes since 24.5.0.beta7