github vaadin/flow 25.1.0-beta2
Vaadin Flow 25.1.0-beta2

latest releases: 24.9.14, 25.0.8
pre-release12 hours ago

Changes since 25.1.0-beta1

All changes

New features

  • Add setTestId/getTestId convenience methods to Component (#23775)
    Commit · Pull request · Issue

  • Add SignalBinding with rich BindingContext for bind methods (#23670)
    Commit · Pull request

    All Element bind methods (bindText, bindEnabled, bindVisible, bindProperty, bindAttribute, etc.), and Style.bind(), bindWidth(), bindHeight(), ThemeList.bind(), HasStyle.bindClassNames(), and HasTheme.bindThemeNames() now return SignalBinding object instead of void. SignalBinding exposes an onChange callback that receives a BindingContext with the old value, new value, whether it's the initial run, and the bound element/component. ElementEffect.bind() creates the SignalBinding internally and wires the effect registration into it so callers can control the effect lifecycle.

  • Allow setProperty if signal write callback is present (#23732)
    Commit · Pull request · Issue

    This change allows setting element property value if signal binding's write callback is present (not null). Each Element setProperty method is updated to change the signal value with the same logic as with a property value change from the client did before (and same logic as in HasValue#bindValue two-way binding). One-way binding, with null write callback, works same as before and throws BindingActiveException.

  • Add content-hash cache busting for Stylesheet URLs (#23544)
    Commit · Pull request

    • In production mode, append a ?v-c=<8-char-sha256> query parameter to StyleSheet URLs so browsers reload only when file content changes, enabling aggressive caching with Cache-Control: max-age=31536000, immutable for versioned requests. - Content hashing is applied in both the AppShell path (AppShellRegistry.addStyleSheets) and the component dependency path (UidlWriter.dependencyToJson), covering all StyleSheet usage. - StaticFileServer now returns a 1-year immutable cache header when the v-c query parameter is present in production mode, instead of the default short-lived cache.

Fixes

  • Shared Signal.get() should throw outside reactive context with fallback transaction (#23760)
    Commit · Pull request · Issue

    The reactive context check in AbstractSharedSignal.get() used Transaction.inTransaction() which returns true when a session-scoped fallback transaction is active. This caused shared signals to silently allow get() calls outside reactive contexts when the session lock was held (e.g. in onAttach), unlike local signals which correctly threw. Changed the check to use Transaction.inExplicitTransaction() so that only explicitly started transactions (via runInTransaction) count as a valid reactive context, matching the behavior of local signals.

  • Skip validation on signal effect initial run in Binder (#23749)
    Commit · Pull request · Issue

    The reactive signal effect created by initInternalSignalEffectForValidators() was firing validation on its initial run when deferred to component attach, causing required fields to be marked invalid immediately on navigation. Use the context-aware Signal.effect() variant and skip fireValidationEvents on the initial run, so validation only triggers on actual value changes.

  • Preserve scroll position of all scrollable elements after hot-swap (#23722)
    Commit · Pull request · Issue

    Capture and restore scroll positions of all scrollable elements during hot-swap UI refresh and full page reload. Elements are identified by CSS selector paths built from nth-of-type selectors anchored to the nearest ancestor with an ID, so elements without explicit IDs are also supported. The window scroll position uses a special window key. Only elements with non-zero scroll are captured, keeping the snapshot small. Both code paths are updated: the vaadin-dev-tools TypeScript (used for dev server WebSocket-triggered refreshes and full reloads via sessionStorage) and the Hotswapper Java inline JS (used for the vaadin-refresh-ui custom event).

  • Add SignalBindingFeature by default for text state node
    Commit · Pull request

    Supporting SignalBindingFeature by default removes danger to get IllegalStateException when using StateNode#getFeatureIfInitialized(Class) to get SignalBindingFeature.

  • Use absolute path for Aura CSS resource availability check
    Commit · Pull request

    The isResourceAvailable call used the relative path "aura/aura.css" which, after URI resolution, was passed unchanged to ServletContext.getResource(). The Servlet specification requires paths to start with "/" and the missing leading slash caused a MalformedURLException, making the check always fail and flooding logs with warnings on every page load.

  • Exclude duplicate flow-build-tools JAR from WAR packaging
    Commit · Pull request

    The maven-shade-plugin replaces the main artifact's file reference with shaded content during reactor builds, causing both flow-build-tools.jar and flow-build-tools-shaded.jar (byte-identical) to end up in test WAR WEB-INF/lib directories. This produces hundreds of duplicate-class warnings from Jetty's AnnotationParser. Add a packagingExcludes regex to the maven-war-plugin configuration in the root POM's pluginManagement to exclude the non-shaded JAR while keeping the shaded one.

Tests

Don't miss a new flow release

NewReleases is sending notifications on new releases.