github vaadin/flow 24.3.0.beta1
Vaadin Flow 24.3.0.beta1

latest releases: 24.6.0.alpha4, 24.5.4, 24.6.0.alpha3...
pre-release11 months ago

Changes since 24.3.0.alpha7

All changes

New features

  • New Navigation Access Control API
    Pull request · Docs in draft

    Adds the URL-based access checker in addition to existing Vaadin view-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 view-based access checker (e.g. where custom access logic is implemented) to secure Vaadin routes when navigation is done with RouterLink, Anchor and server-side navigation.

  • Add React router integration for Flow routes
    Pull request

    Makes it possible to add and use Flow routes in Vaadin Hilla + React applications.
    To enable navigating to Flow routes, one needs to add the following to frontend/routes.tsx file:
    Import for server-side routes object:

    import {serverSideRoutes} from "Frontend/generated/flow/Flow";

    child entry for server-side routes:

    export const routes = [
       {
            element: <MainLayout />,
            handle: { title: 'Main' },
            children: [
                  { path: '/', element: <HelloWorldView />, handle: { title: 'Hello World' } },
                  ...serverSideRoutes
            ],
        },
    ] as RouteObject[];
  • Show error view on action exception
    Commit · Pull request · Issue · Docs

    If 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 · Docs

    Adds setResetFocusOnActiveElement, resetFocusOnActiveElement and isResetFocusOnActiveElement to ShortcutRegistration 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.

  • Default I18N provider
    Commit · Pull request · Issue · Docs

    Add 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.

  • Add AccessDeniedException for ViewAccessChecker
    Commit · Pull request · Issue · Docs

    ViewAccessChecker is changed to throw AccessDeniedException instead of NotFoundException by default when access is denied. Added default error page RouteAccessDeniedError for the AccessDeniedException. Page is same as RouteNotFoundError by default (extends AbstractRouteNotFoundError). Added AccessDeniedErrorRouter annotation to
    customise rerouting of access denied error per route with AccessDeniedErrorRouter#rerouteToError.

  • Add getActiveViewLocation and getActiveRouterTargetsChain to UI
    Commit · Pull request · Issue

    Adds new public API for already existing features in UIInternals. UI#getActiveViewLocation() is shortcut to UIInternals#getActiveViewLocation() and UI#getActiveRouterTargetsChain() is shortcut to UIInternals#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 · Issue

    Adds a getter for RouteParameters in AfterNavigationEvent.

  • Add Component/Element to ErrorEvent
    Commit · Pull request · Issue · Docs

    Now 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 · Issue

    Extends DefaultI18NProvider (#5917) for Spring. VaadinApplicationConfiguration defines DefaultI18NProvider bean and initializes it with locales based on translation properties files found in the classpath under '/vaadin-i18n' path.

  • Reuse the production bundle if no changes
    Commit · Pull request · Issue

    Makes 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 devBundle from build folder
    Commit · Pull request · Issue

    Move devBundle to build folder and create a single compressed file for devBundle that can be committed into the versioning system.

  • Restrict debug websocket connection to loopback addresses by default
    Commit · Pull request

    Using 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

Fixes

  • Redirect to error view by default for errors in RPC-handling
    Commit · Pull request

  • Postpone commands scheduled with runWhenAttached for detached nodes
    Commit · Pull request · Issues 1434, 18020

    When detach listeners are called, the node still has a parent set, causing commands scheduled with runWhenAttached to be executed immediately. This change make runWhenAttached postpone the command by registering an attach listener, if the node has been detached during the same roundtrip.

  • RangeInput orientation: add support for Chrome, Edge and Safari
    Commit · Pull request

Don't miss a new flow release

NewReleases is sending notifications on new releases.