Skip to content

Releases: vaadin/flow

Vaadin Flow 24.5.0

16 Oct 07:35
324cc03
Compare
Choose a tag to compare

All Changes since Vaadin Flow 24.4

New features

  • Automatic Flow main layouts
    Docs

    Vaadin 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 request

      Automatically 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 request

      Generate a layout.json for Hilla to automatically enable server layouts part of vaadin/hilla#2709.

  • Dynamic menu items in Flow main layout
    Docs

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

      Create MenuRegistry for getting automatic menu views for population.

    • Filter client routes by authentication and role
      Commit · Pull request

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

    Allows 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:

  • Record support in Binder
    Docs · Commit · Pull request

    Provides an API to use Java Records as bean types for read-only beans in Binder.

  • Support for nonce-based strict Content Security Policy
    Docs

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

    Adds static I18NProvider#translate methods for alternative way to get translation. Compares to calling getTranslation via VaadinService.getCurrent().getInstantiator().getI18NProvider(). translate methods throws IllegalStateException without active VaadinService.

  • Speedup startup time by excluding jars
    Commit · Pull request · Issue

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

    This 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 contain vaadin.allowed-packages or vaadin.blocked-packages to exclude/include packages being scanned by VaadinServletContextInitializer. Package exclusion/inclusion effects only classes in the JAR/module where META-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. excluding VaadinServiceInitListener in a Spring application is not stopping Spring and Vaadin initializing it anyway, although some time-consuming actions like DevModeServletContextListener 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 · Issue

    This 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 request

    original authors: @archiecobbs and @mstahv

  • Load Lumo utility CSS by default
    Commit · Pull request

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

Read more

Vaadin Flow 24.6.0.alpha1

17 Oct 06:20
1937249
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0

All changes

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 request

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

    Adds DragSource#setDragImage(ComponentdragImage ) and DragSource#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

14 Oct 06:17
4a9d126
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.rc1

All changes

Fixes

Vaadin Flow 24.5.0.rc1

10 Oct 06:01
2538e4d
Compare
Choose a tag to compare
Pre-release

No changes since 24.5.0.beta7

Vaadin Flow 24.5.0.beta7

09 Oct 13:31
419622e
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.beta6

All changes

New features

  • Add a helper method for menu's page title (#20165)
    Commit · Pull request · Issue

    Adds a new static helper method that gives a page title for views shown using menu.

Fixes

Vaadin Flow 24.5.0.beta6

09 Oct 08:46
7ea97e1
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.beta5

All changes

Fixes

  • Update document title for client route (#20184)
    Commit · Pull request

    Updates document title for client view with flow layout based on ViewConfig.title and when not overridden by server's HasDynamicTitle.

  • Navigatin to client view from server (#20151)
    Commit · Pull request

    Navigation to the client view using server navigate should work normally and not try to add layout for non layout client view.

  • Reintroduce static methods used by Hilla (#20168)
    Commit · Pull request

    Reintroduces static methods used by Hilla in FlowModeAbstractMojo, preserving the ClassFinder creation improvements for Flow mojos.

  • Fix auto layout hotswap
    Commit · Pull request

    Refactor hotswap logic and tests to align with changes introduced by #20120.

  • Reload route configuration upon layout changes
    Commit · Pull request · Issue

    When a [At]Layout annotated class is modified, the changes are not propagated to the route registry after hotswap happens. This change updates Route registry layouts configuration and re-registers routes potentially impacted by the change to apply the new settings. It also checks the route target chain for active UIs in order to trigger a page refresh if the layout changes should be applied.

Chore

Vaadin Flow 24.5.0.beta5

07 Oct 13:53
75328a1
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.beta4

All changes

New features

Fixes

  • Cache ClassFinder for reuse in mojo execution (#20148)
    Commit · Pull request · Issue

    Creates ClassFinder once per mojo execution, preventing eccessive and useless scans.

  • Access-controlled layout (#20120)
    Commit · Pull request

    Remove layout name from deny context.

  • Always create AvailableViewInfo.menu (#20136)
    Commit · Pull request · Issue

    Create always MenuData in AvailableViewInfo.menu to avoid need for extra null checking in automatic menu in Hilla. This change affects only code that reads available client routes from Hilla generated json file.

  • Change blank icon to null in MenuData (#20137)
    Commit · Pull request · Issue

Vaadin Flow 24.5.0.beta4

03 Oct 06:51
736ecc8
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.beta3

All changes

Fixes

  • Always fetch reactEnabled from service (#20125)
    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 · Issue

    Don'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.5.0.beta3

30 Sep 06:42
06c7707
Compare
Choose a tag to compare
Pre-release

Changes since 24.5.0.beta2

All changes

New features

Fixes

  • Add nodeVersion in gradle plugin settings (#20059)
    Commit · Pull request

    Prior to this fix, the settings declared in Gradle were not being passed to the plugin. For example, changing the nodeVersion in build.gradle did not update the actual nodeVersion used.

  • Queued navigate with React Router (#19985)
    Commit · Pull request · Issue


  • Store layout packages (#20075)
    Commit · Pull request · Issue

    Store layout packages in development mode reload cache as layouts may not be in same packages as routes.

  • Layout should be collected as entyrpoint (#20076)
    Commit · Pull request · Issue

    Layout annotated classes should be collected as entrypoints for production builds.

  • Update title after navigation (#20047)
    Commit · Pull request · Issue

    Update the page title after navigation has ended to not have the wrong title in history.

  • Hide root output element (#20040)
    Commit · Pull request · Issue

    Ensures that root output element added for React router in Flow.tsx doesn't accidentally change the main layout with CSS rules targeting it.

Vaadin Flow 24.4.9

30 Sep 06:43
0afec75
Compare
Choose a tag to compare

Changes since 24.4.8

All changes

New features

Fixes

  • Queued navigate with React Router (#19985)
    Commit · Pull request · Issue

  • Add nodeVersion in gradle plugin settings (#20059)
    Commit · Pull request

    Prior to this fix, the settings declared in Gradle were not being passed to the plugin. For example, changing the nodeVersion in build.gradle did not update the actual nodeVersion used.

  • Update title after navigation (#20047) (CP: 24.4)
    Commit · Pull request · Issue


  • Close overlay drawer on click (#19984)
    Commit · Pull request · Issue

    Close the overlay drawer even when clicking on same link and no actual navigation happens. This in case the flag has for some reason not been reset after a click.

  • Do not throw if re-setting the login view (#19996)
    Commit · Pull request · Issue

  • Fail fast if view defines same path for route and route alias (#19977)
    Commit · Pull request · Issue

  • Forward with optional callback (#19959)
    Commit · Pull request · Issues 19794, 19822

    Also fixes #19813 in a more coherent way. Relevant test is com.vaadin.flow.uitest.ui.PreserveOnRefreshForwardingIT

  • Evaluate target not active (#19945)
    Commit · Pull request · Issue

    For deciding what action to take we should evaluate where we are going and not the current active path.