github vaadin/flow 23.2.0
Vaadin Flow 23.2.0

2 years ago

Changes since 23.1.6

All changes

Breaking changes

  • Remove fusion-endpoint and related IT modules
    Commit · Pull request

    Hilla-related modules are transferred from Flow to Hilla repo.

  • Rename dev mode gizmo to dev tools
    Commit · Pull request

  • Add constructors to Router Link without text
    Commit · Pull request · Issue
    Usage of RouterLink(null, MyView.class) is ambiguous, for creating router link without text, please use RouterLink(MyView.class) or other overloaded constructors.

  • Fully enable new license checker
    Commit · Pull request

    The new license checker is triggered also for production builds and requires an offline license for development in an offline environment. It no longer relies on third party cookies to resolve all browser compatibility issues.

  • Use Vite as a primary tool
    Commit · Pull request · Issue

    Uses Vite by default, make Webpack a deprecated tool behind feature flag. This may break an existing application, if it uses custom Webpack configuration. If your project has such a config, consider migrate it to Vite or fallback to Webpack.

  • Use first deployed VaadinServlet to serve static resources (#13795)
    Commit · Pull request · Issues 14239, 13190

    Changes static files loading so that: 1. The overall behavior is reverted to that in 23.0, i.e. static files are loaded from /context/servlet/VAADIN instead of /context/VAADIN 2. When using Vite in dev mode, uses the first deployed VaadinServlet to serve static resources. If you have both a /foo/* and a /bar/*mapped servlet, then if /foo is the servlet deployed first, also /bar/ requests will use /foo/VAADIN for static resources. This reverts commit af97538 If multiple servlets are registered, use the first one If multiple mappings are present on the servlet, sort and use the first one. The servlet mappings are not returned in order so we cannot use the first registered one.

  • Throw exception if webpack config file contains custom config and running with Vite
    Commit · Pull request · Issue

    Warns developers to pay attention on the Webpack configuration when upgrading to Vaadin 23.2: throws exception with an explanatory message and prevents application from start if webpack.config.js file with custom configurations exists in the project and the application is running with Vite (default). If the default webpack.config.js exists, just warn the user about its existence, but do not prevent the application startup.

New features

  • Improving UX of Query parameters
    Commit · Pull request · Issue

    made it easier to use both query and URL parameters shorthand to create URL parameters from single key-value pair

  • Find a parent component with a given type
    Commit · Pull request · Issue

    Add a helper method to seek the parent component of a given type from the component tree.

  • Make the Router lookup method available for others to use
    Commit · Pull request

    When building a navigation menu component that is not based on RouterLink, there is the same need as RouterLink has: to create links to certain views. That requires a Router reference.

  • Enable components to notify binder when validation state changes
    Commit · Pull request

  • Add API to modify a view after UI.navigate
    Commit · Pull request

    Allows users to configure the target view, with a proper Java API provided by the target view itself, instead of forcing them to use query/path parameters (which ruins the power of having a language like Java in use).

  • Notify component about identifier provider changes
    Commit · Pull request

    Components like Grid or MultiSelectComboBox are supposed to reuse the identifier provider of the Flow data classes to identify items, for example, to manage a selection state. However retrieving the identifier provider from a component is problematic at the moment as developers can set an identifier provider on any data view, and there is no way to react to that apart from extending individual implementations of data view classes to implement a custom notification mechanism that the setIdentifierProvider method was called. This change introduces an IdentifierProviderChangeEvent that is fired when the developer sets an identifier provider on a data view. Components like Grid or MultiSelectComboBox can listen for this event, and retrieve the new identifier provider from it.

  • Support @NonNullApi to define @Nonnull for all methods in a package
    Commit · Pull request

  • Support view access checking in background threads with Spring
    Commit · Pull request

    Requires the spring context to be properly set up for the background thread. Based on #13674

  • Remove validation status change listener upon unbind
    Commit · Pull request · Issue

    Listener removal was missing when unbind was happening.

  • Support Object type keys in Component#getTranslation
    Commit · Pull request · Issue

  • Add feature flag for Hilla multi-module engine
    Commit · Pull request · Issue

  • Add a feature flag for new field validation behavior
    Commit · Pull request

    This PR adds a feature flag for the new field validation behavior. The flag will be used by Flow field components. For more information about the new behavior, please refer to vaadin/platform#3066. Part of vaadin/platform#3066

  • Swallow exceptions on unparseable NPM package versions
    Commit · Pull request

    When checking for new NPM package versions, do not replace versions that we do not understand. Closes #14217

  • Introduce getListeners(eventType) method on com.vaadin.flow.component.ComponentEventBus
    Commit · Pull request · Issue

    Introduced com.vaadin.flow.component.ComponentEventBus.getListeners(Class<? extends ComponentEvent>) together with corresponding shorthand method (on Component) and static helper (on ComponentUtil).

  • Provides collection based methods for HasComponents
    Commit · Pull request · Issue

    Added Collection based add / remove methods for com.vaadin.flow.component.HasComponents

  • Add configuration to TaskGenerateHilla
    Commit · Pull request

  • Provide collection based append/remove methods for Node
    Commit · Pull request · Issue

    Added Collection based appendChild / appendVirtualChild / insertChild / removeChild / removeVirtualChild methods for com.vaadin.flow.dom.Node

  • Improving DX ValidationResult
    Commit · Pull request

    Improves DX when using ValidationResult, by adding equals, hashcode and toString implementations

  • Allow disabling validation status change listener registration on binder
    Commit

    Add binder-level flag to allow disabling of validation status change listener registration for HasValidator fields. Related to #13940 (comment) and #13940 (comment)

  • Introduced component-based security configuration for Spring
    Commit · Pull request · Issue

    Introduced component-based security configuration for Spring.

  • Allow to set a feature flag using a system property
    Commit · Pull request

  • Give an access to ViewAccessChecker in subclasses
    Commit · Pull request

    Makes ViewAccessChecker be accessible in the VaadinWebSecurity subclasses, for example, to be able to override the security configuration for SSO.

  • Check license also for jars with cvdlName
    Commit · Pull request

Fixes

  • Separate core and commercial components version files
    Commit · Pull request · Issue

    Previously, the vaadin_versions.json contained both core and commercial components listed which led to including them all in package.json even if the user only used vaadin-core. Now platform generates vaadin-core-version.json in vaadin-core and vaadin-version.json to include commercial components in vaadin artifact. This commit will adopt having separate files while generating package.json and pinning the platform dependencies.

  • Do not rely on web components calling the license checker
    Commit · Pull request

  • Let DataCommunicator#flush keep track of which StateTree is supposed to execute its flushRequest
    Commit · Pull request

  • Add empty export to vaadin-featureflags.ts
    Commit · Pull request

  • Always generate themes in frontend 'generated' directory subfolder
    Commit · Pull request · Issue

    Forces generated themes files to be stored in 'generated' folder under frontend directory, instead of using the 'generatedTsFolder' setting. Also fixes relative paths assuming frontend directory to be './frontend', and maven and gradle plugins to clean the 'frontendDirectory/generated' folder.

  • Override connectedCallback in customElements.define
    Commit · Pull request

    This is needed for the override to take effect, at least in Chrome

  • Request Desktop Site feature with only MajorVersion
    Commit · Pull request

    Request Desktop Site feature is enabled. At this time the version only consists of the major version. part of #13921

  • Ensure internal parent set to null when node is detached
    Commit · Pull request

    This is a pure side observation found when investigating other thing, where I first thought I would need this, but eventually not related. This is however something that may pop up later. At this point of time we do not have known logic that would suffer from this bug. But it is somewhat a bug nevertheless.

  • Add missing general styles to webcomponents shadow dom
    Commit · Pull request · Issue

    The document that is generated by WebComponentBootstrapHandler was missing the needed CSS to be added to the shadow dom while using Vite.

  • Regenerate theme files if not existing during Vite resolution
    Commit · Pull request

    It may happen that when Vite analyses imports for theme.js file, they are not yet generated of filesystem and this make compilation fail. This change checks for theme.js imports existence, and if not present forces theme generation process Should fix ThemeSwitchLiveReloadIT flakiness.

  • Use rollup-plugin-postcss-lit with Vite
    Commit · Pull request · Issue

    Added rollup-plugin-postcss-lit and configured it to handle all CSS files except those under theme folder. Note the extra entry with ? is necessary until umbopepato/rollup-plugin-postcss-lit#49 fixed. Another entry added to excludes to workaround umbopepato/rollup-plugin-postcss-lit#52

  • Fix removal of windows junctions
    Commit · Pull request · Issue

    symlink and Windows junction directory contents are not deleted also. Closes #11177

  • Allow windowResize during modality
    Commit · Pull request · Issue

    Allow window resize events when modal component is set.

  • Handle theme files creation and deletion with Vite
    Commit · Pull request · Issue

    Vite 'handleHotUpdate' hook is invoked only for file changes, not for creation nor deletion. This change adds a watcher as well for those events and triggers theme regeneration when theme file are added or deleted

  • Let Vite process theme also on theme.js changes
    Commit · Pull request

    Flow theme plugin for Vite processes themes only on changes on files in active theme directory. This preventes regeneration with java live reload when changing value of Theme annotation. This change triggers theme processing also for updates on theme.js file.

  • Not show warning if no poll listener
    Commit · Pull request

  • Make findAncestor return Object for backward compatibility
    Commit · Pull request

  • Handle duplicated root entries in manifest
    Commit · Pull request

    Duplicated root entry in manifest happens when running application in development mode but after a frontend build. This change removes the entry potentially added by flow if compile-time manifest already added it

  • Support import without url keyword in theme generator
    Commit · Pull request

    With Vite it may happened that 'import url(...)' in CSS are rewritten as 'import ...', that is a valid CSS statement. Currently the theme generator does not handle the case and this prevents the resource to be added to the head section. A warning is also logged on browser console, stating import rules not allowed when creating stylesheets. This change updates the importMatcher regex to handle import without url

  • Provide correct devMode flag to theme-generator with Vite
    Commit · Pull request · Issue

    devMode flag was hard-coded to false in theme options, preventing the theme generator plugin to work correctly when styles.css does not exist

  • Build the service worker without writing it to FS
    Commit · Pull request · Issues 13123, 14022

    Prevents restart of application during startup.

  • Make Vite work with custom frontend directory
    Commit · Pull request · Issues 14046, 14102

    Also rewrite theme css to resolve urls for assets defined in theme.json

  • Fix ServiceWorker path requests in dev mode
    Commit · Pull request · Issue

  • Run TaskGenerateHilla after npm install
    Commit · Pull request · Issue

  • Fix asset handling in Vite production mode
    Commit · Pull request

  • Support Alpine by detecting OS using /etc/alpine-release
    Commit · Pull request · Issue

    musl is Experimental so using the experimental download root

  • Make frontend servlet check more tolerant
    Commit · Pull request

  • Hange prefix to vaadin. for feature flag system properties
    Commit · Pull request

    I'm amending #14408 here. I realised that it is way more common to use dots than dashes as separator in system property names. While there is no change in functionality, I'd prefer to follow the standards.

  • Not modify browser history if location has no hash
    Commit · Pull request · Issue

    if no segment with hash is present in the location, while navigating between Flow and legacy views/components, the update of the browser history is not needed.

  • Initialize PwaHandler only once
    Commit · Pull request

  • Execute PushRequestHandler before DevModeHandler
    Commit · Pull request

    When an application with PUSH enabled tries to re-establish the push connection after a server restart, it may happen that the dev mode handler responds to the push request with HTML contents (dev-mode-not-ready.html). In this situation, an error is shown on the browser page, a manual page reload is required to make the application work again. This changes the request handlers order so that the PushRequestHandler is executed before DevModeHandler

  • Postpone http request on online listener
    Commit · Pull request · Issue

    It sometimes happens that when window online listener is invoked, http request to sw.js fails anyway with net::ERR_INTERNET_DISCONNECTED error, even if navigator.onLine flag is true. To reduce the possibility of a network failure in the online event listener, the request is postponed by a little number of milliseconds.

  • Never cache the "waiting for frontend build" page
    Commit · Pull request · Issue

  • Skip checking library code for TypeScript errors
    Commit · Pull request · Issue

  • Do not handle Vite special URLs in the service worker
    Commit · Pull request · Issue

  • Print a warning instead of failing when importing from lit without a .js extension
    Commit · Pull request

  • Add compression for sw.js
    Commit · Pull request · Issue

    Service worker javascript file is generated by a separated rollup execution, causing it not to be found by the brotli plugin. In addition, sw.js is post processed to inject build resource into self.__WB_MANIFEST, but this happens in closeBundle hook, so after the brotli execution that occurs in writeBundle hook. Unfortunately, currently writeBundle and closeBundle hooks are executed in parallel and cannot be configured to run sequentially. There's a discussion for this on Vite repository https://github.com/vitejs/vite/discussions/9442 This change moves the "build WS", "inject manifest" and "SW compressing" executions into one single run inside buildSWPlugin, so they happens in order.

Don't miss a new flow release

NewReleases is sending notifications on new releases.