Changes since 25.2.0-alpha11
Breaking changes
-
Auto-apply context:// for @Stylesheet values
Commit · Pull request · Issue@Stylesheet currently produces broken elements when the Vaadin servlet is mapped at a non-root path (vaadin.urlMapping=/ui/* etc.): the browser resolves the bare relative href against (which points to the servlet mapping path), so a file at META-INF/resources/styles.css is fetched as /ui/styles.css and 404s. Users had to know to write @Stylesheet("context://styles.css") explicitly to step out of the servlet path. Frame the right behavior into the framework instead: - New FrontendDependencyUrlResolver.resolveToContextRoot extracts the prefix-handling rules into one place: http(s)://, //, context://, base:// pass through unchanged; "/" is treated as an absolute server path; "./" leads strip to a context-root-relative value; everything else gets a context:// prefix prepended. Path traversals are rejected. - UIInternals.addComponentDependencies normalizes @Stylesheet values through the resolver before storing them on the dependency list, so component-level @Stylesheet now renders correctly under any servlet mapping. The same normalization keys ActiveStyleSheetTracker so spelling variants of the same file (foo.css, ./foo.css, context://foo.css) deduplicate to a single . - AppShellRegistry.resolveStyleSheetHref delegates to the same resolver, replacing the inline rule set. The trailing BootstrapUriResolver call continues to expand context:// using the servlet-relative path produced by getContextRootRelativePath, so AppShell-level resolution stays consistent with the UIDL path. Test fixtures updated for the canonical context://-prefixed URLs in the dependency list. UidlWriterTest also registers inline test resources at the leading-slash path (/inline.css) to match the servlet container lookup that resolveResource produces for a context:// value.
-
Redesign Geolocation as static utility with watcher handle
Commit · Pull requestRedesigns the Geolocation API as a static utility class with a watcher handle, replacing the previous per-UI facade. API surface Geolocation.getPosition() and Geolocation.watchPosition() are static. UI is implicit (UI.getCurrent()), with explicit-UI overloads for background threads. watchPosition() returns a GeolocationWatcher handle that exposes both a callback API (addPositionListener) and a reactive Signal. The owner component drives the watcher's lifecycle: watchPosition() accepts an unattached owner and starts the underlying browser watch on first attach (so it's safe from a view constructor); the watch auto-stops on detach; stop() and resume() work explicitly. Per-UI state (the GeolocationClient and the availability signal) lives in UIInternals; static methods resolve the client there or install a default one through the GeolocationClientFactory Lookup SPI. options is now a non-null parameter — callers who want browser defaults use the no-options overloads, or pass an empty GeolocationOptions explicitly. The fields inside GeolocationOptions remain independently optional. Error model Callback exceptions thrown from onSuccess/onError in getPosition and from watcher position listeners are routed to VaadinSession.getErrorHandler() instead of being silently swallowed by CompletableFuture.whenComplete or aborting the listener loop. GeolocationError.message() is renamed to debugInfo() to make it clear the value is a free-form, non-localised string suitable for logs and bug reports — not for UI display. Test seam GeolocationClient and WatchHandle become public so external test drivers and native bridges can replace the production client through Lookup. GeolocationOutcome becomes package-private since the public API no longer exposes it. The watcher's bridge-failure error path is unchanged.
New features
-
Support explicit UI in
ComponentEventconstructor
Commit · Pull requestAllows the UI to be provided at construction time so that
getUI()can return it even when the source component is not yet attached. Related to #18818 -
Split get() into onSuccess/onError callbacks
Commit · Pull requestGeolocation.get() now takes a (onSuccess, onError) pair, mirroring GeolocationTracker.addPositionListener and the W3C getCurrentPosition(success, error) signature. The optional GeolocationOptions argument moves to the trailing position so that additional parameters can be added at the end without rearranging the common case. GeolocationOutcome is retained as the SPI sum-type returned by GeolocationClient#get; only the public facade changes shape.
Fixes
-
Loading state muting based on trigger events
Commit · Pull request · IssueThis change reverts the eager removal of loading state introduced by #23229, as it causes the indication to disappear during ongoing loading. As a replacement, it re-introduces debouncing tracking of active requests, and adds event-based silencing of the loading indication to avoid flashing the indicator for high-frequency UI interactions. In addition, instead of setting loading state using
ConnectionState.setState()directly, the proper connection state methods (loadingStarted(),loadingFinished()) are used to avoid interference with loading state for requests from other sources outside Flow client. -
Package json hash difference between linux and windows
Commit · Pull request · IssueWindows and Linux generated a different hash for the package json content as jackson default indenter used system line separator.
-
NPE when web push subscription is expired
Commit · Pull request · IssueWhen the push service reports a subscription as expired,
WebPush.sendNotificationthrewNullPointerExceptioninstead of the intendedWebPushException. Remove a leftover reference to an unassignedHttpResponselocal variable that was no longer populated after the migration tocom.interaso.webpush. -
Pin pnpm version when invoking via npx
Commit · Pull requestgetSuitablePnpm() invoked
npx --yes --quiet pnpm, letting npx resolve whatever it considered latest (or whatever was cached) rather than the DEFAULT_PNPM_VERSION constant. Passpnpm@<DEFAULT_PNPM_VERSION>so the installed version matches the constant. -
Install pnpm deps in hoisted mode + declare @babel/types
Commit · Pull request