Skip to content

Vaadin Flow 24.0.0.beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@vaadin-bot vaadin-bot released this 03 Feb 14:37
77af6e3

Changes since 24.0.0.alpha17

All changes

This is a Flow 24.0 beta pre-release for Vaadin 24.0.

Flow 24.0 is based on Jakarta EE 10 / Servlet 6.0 specifications, uses Spring Framework 6.0 / Spring-boot 3.0 and requires JDK 17+.

Breaking changes

  • Jakarta 10 EE / Servlet 6.0 / support
    This requires package names change from javax.* to jakarta.*, as well as upgrading to a new specification versions and later versions of servlet containers/app servers compatible with Jakarta EE 9 / 10.
    See Vaadin 23-24 upgrade instruction for easier upgrade.

  • Spring Framework 6.0 and Spring-boot 3.0 support
    Spring Framework 5 and Spring-boot 2.7 are no longer supported, because of Servlet API version. See the upgrade instruction mentioned above for easier upgrade.

  • Flow 24.0 requires Java 17+

  • Remove V14 legacy bootstrap support
    Commit · Pull request

    This still retains BootstrapHandler as the web component bootstrapping depends on it.

  • Delete webpack 4 support
    Commit · Pull request

  • Removal of deprecated code from V24
    Commit · Pull request

    See the list of removed API #15665 .

  • Upgrade to SLF4J 2.0
    Commit · Pull request

    Spring Boot 3 depend on SLF4J 2.

  • Remove VaadinWebSecurityConfigurerAdapter
    Commit · Pull request

    WebSecurityConfigurerAdapter was removed in spring-projects/spring-security#10902

  • Do not perform type checking for TS files from jar files (#15700)

    The TS files that come from JAR files are not under control of the project developer so enforcing project TS rules on them does not make sense. This is similar to "skipLibCheck" used for TS files that are in node_modules. If your project contains a customisations to tsconfig.json file, Vaadin will ask you to manually redo these changes after this file is updated automatically.

  • Use authorizeHttpRequests instead of deprecated authorizeRequests
    Commit · Pull request

    This requires all applications to also change any usage of authorizeRequests to authorizeHttpRequests.

  • Require Node 18 (npm 8.6)
    Commit · Pull request

    Node 18 is the latest LTS version and what everbody should at least have going forward.

  • Enable license checking for flow-polymer-template
    Commit · Pull request

    The built-in support for Polymer templates is removed in Vaadin 24. Polymer support is still available in Vaadin 24 for Prime and Enterprise customers under a commercial license. Vaadin 24 provides the conversion tool that can assist you in converting Polymer to Lit templates by automating part of the effort, see https://github.com/vaadin/flow/tree/master/flow-polymer2lit .

  • Remove feature flag for old license checker which is no longer available
    Commit · Pull request

  • Build for production

    • Running build-frontend in Maven or Gradle will automatically set the project into production mode. There is no need to separately specify a productionMode parameter for these (any value specified is ignored)

    • If you have earlier run both prepare-frontend and build-frontend in development mode, you should delete the build-frontend execution or move it to a production profile.

  • Use servlet context path as the default logout url
    Commit · Pull request

    With a root mapped servlet, this changes nothing. For a servlet with a context path, it assumes that you have the whole application in that context and logging out should take you to the root of that application This is a breaking change for applications where you want the logout path to be / even if Vaadin is deployed as /something and you then need to set the logout path explicitly to /.

  • Rename enableDevServer
    Commit · Pull request

    Rename enableDevServer to frontendHotdeploy as devServer can at the moment mean too many things.

New features

  • New development mode with pre-compiled front-end bundle for faster start-up (aka Express Build mode)

    The build and start-up time of Vaadin application can be improved significantly if no front-end installation or compilation is made. This means not installing the tools Node.js, npm/pnpm and not downloading npm packages, nor running the Vite development server.

    If your project uses only the standard Vaadin Flow components or third-party Vaadin add-ons (e.g., from Vaadin Directory) without client-code, Vaadin skips front-end compilation and uses the default themes and front-end files shipped with the Vaadin platform.

    This is a default mode in Vaadin 24.0. It gives a benefit of faster start-up time, but it doesn't have a hot redeploy feature that is useful in case of heavy front-end development, e.g. in case of custom web components developed with a Lit template. The old development mode with the Vite development server can be turned ON with the configuration property frontend.hotdeploy.

    See https://vaadin.com/docs/next/configuration/development-mode for more information.

  • Allow every component to have styles
    Commit · Pull request

    All components are capable of having class names yet you must remember to implement HasStyle every time you create a new component or the class API is missing. The only known exception is a text node which cannot have classes. It is fine if this edge case, which is almost never used, throws an exception from the API

  • Register AtRoute classes for Spring native automatically
    Commit · Pull request

  • Add polymer2lit converter
    Commit · Pull request · Issue

    Introduces a mvn vaadin:convert-polymer Maven command that converts Polymer-based source files into Lit. The following arguments are supported:
    -Dvaadin.useLit1 forces the converter to use lit-element rather than lit imports.
    -Dvaadin.disableOptionalChaining disables the usage of the optional chaining operator which can be helpful for projects still based on Webpack.
    -Dvaadin.path=/path/to/directory/or/file allows specifying the path to a file or directory that needs to be converted. By default, the converter scans all **/.js and **/.java files in the project.
    Note: When testing this command in the Flow repo, run the command mvn flow:convert-polymer instead.

  • Add Gradle support for polymer2lit
    Commit · Pull request

    Adds a ./gradlew vaadinConvertPolymer Gradle task that converts Polymer-based sources to Lit. The following parameters are supported:
    -Dvaadin.useLit1 forces the converter to use lit-element rather than lit imports.
    -Dvaadin.disableOptionalChaining disables the usage of the optional chaining operator which can be helpful for projects still based on Webpack.
    -Dvaadin.path=/path/to/directory/or/file allows specifying the path to a file or directory that needs to be converted. By default, the converter scans all **/.js and **/.java files in the project.

  • Basics for Spring native support
    Commit · Pull request

    This is the foundation to make Spring native work. It does not cover dynamic use like Route classes.

  • Add the Authentication Context bean to the Vaadin Web Security
    Commit · Pull request · Issue

    • AuthenticationContext is a concrete class that gets access to the authenticated user and allows performing logout integrated with Spring Security - AuthenticationContext is an injectable managed bean - Developers can plug additional LogoutHandlers in VaadinWebSecurity.addLogoutHandlers() - VaadinWebSecurity configures a LogoutSuccessHandler with a redirect strategy that can handle also XHR UIDL requests (UidlRedirectStrategy)
  • Add refresh flag to navigation event
    Commit · Pull request · Issue

    Add the isRefreshEvent to BeforeEnterEvent and AfterNavigationEvent to be make it possible to distinguish if the event is for a refresh of a preserve on refresh view.

  • Added a shorthand to remove a component from its parent
    Commit · Pull request

    Reduces coupling between UI components (and/or ugly code)

Fixes

  • Use correct SecurityContextRepository for stateless authentication
    Commit · Pull request · Issue

    The shared objects need to be available when other configurers are run and because of spring-projects/spring-security#12579 a workaround is needed to actually apply the correct SecurityContextRepository

  • Fix problems in Hilla native compilation
    Commit · Pull request

    Caused by resource or classes not always being available

  • Do not perform type checking for TS files from jar files
    Commit · Pull request · Issue

    The TS files that come from JAR files are not under control of the project developer so enforcing project TS rules on them does not make sense. This is similar to "skipLibCheck" used for TS files that are in node_modules.

Known issues

  • Embedded web components are not rendered properly
    Issue

    To workaround this issue, enable Vite development server mode (default development mode in Vaadin 23) with a property vaadin.frontend.hotdeploy=true in application.properties (for Spring-based applications) or by setting vaadin.frontend.hotdeploy to true in the vaadin-maven-plugin or as a system property (for non-Spring applications). This will be fixed in the next beta releases.