Changes since 25.1.0-beta2
Breaking changes
-
Make localeSignal() read-only on VaadinSession and UI (#23828)
Commit · Pull requestReturn Signal instead of SharedValueSignal/ValueSignal from localeSignal() so that all locale changes go through setLocale(), which handles UI propagation and LocaleChangeObserver notification. Add javadoc showing two-way binding pattern with bindValue and setLocale. Add tests for bindValue-based locale switching, UI locale independence from session, and session setLocale with per-UI override.
-
Split computed into separate cached and direct versions (#23822)
Commit · Pull requestPreviously, the
computedmethod was just one out of many ways of creating a computed signal with the distinction that this computed signal was also caching. This made it difficult to understand when to use the method. computed signal and introducing a separatecachedmethod that creates a cached signal out of any other signal. signals
New features
-
Apply ElementEffect once when created (#23824)
Commit · Pull request · IssueElementEffect is executed immediately once when created. This affects all Signal.effect calls with an owner component. Immediate execution ensures that exceptions can be thrown eagerly when e.g. bindText(signal) is called, not later when component is attached.
-
Throw binding exception if setItems is called while an active signal binding (#23807)
Commit · Pull request · Issue -
Add bindItems to HasDataProvider components (#23761)
Commit · Pull request
Fixes
-
Skip ElementEffect callback on reattach when no signals changed (#23771)
Commit · Pull request · IssueAdd passivate/activate lifecycle to Effect so that ElementEffect can preserve tracked Usage instances across detach/attach cycles. On reattach, activate checks whether any dependency has changed since passivation: if so, the callback re-runs with isInitialRun=true; if not, only the dependency listeners are re-registered without invoking the callback, avoiding redundant work and confusing double invocations.
-
Allow local signal reads in computed callbacks triggered from transaction commit (#23791)
Commit · Pull request · IssueDuring the StagedTransaction commit phase, listener callbacks that re-evaluate computed signals could not read local signals because inExplicitTransaction() still returned true. The transaction is no longer staging commands at that point, so local signal access is safe.
-
Move import statements to top in generated web component imports file (#23817)
Commit · Pull requestAbstractUpdateImports.process()already reordersimportlines to the top forgeneratedFlowImports, but the same sorting was not applied togeneratedFlowWebComponentImports. This caused interleavedimportand non-import lines (e.g.injectGlobalWebcomponentCss()calls mixed withimportstatements) in the web component output. Extract a reusablemoveImportsToTop()method and apply it both inprocess()for main imports and inmergeWebComponentOutputLines()after merging and deduplicating the web component sources. Related to #23689 (comment) -
Improve npm resolution for non-windows (#23810)
Commit · Pull requestAdds another potential path to the npm resolver algorithm to make it compatible with node installation performed by frontend-maven-plugin
-
Detect router-link attribute in ancestor elements during click navigation (#23786)
Commit · Pull requestWhen a nested element (e.g., Button) inside a RouterLink is clicked, the navigation trigger was incorrectly reported as CLIENT_SIDE because only the direct click target was checked for the router-link attribute. Traverse the composed path instead so any ancestor with router-link is correctly identified as a ROUTER_LINK trigger.
Tests
-
Migrate flow-polymer-template tests to JUnit 6 (#23625)
Commit · Pull request -
Migrate flow-build-tools tests to JUnit 5 (#23623)
Commit · Pull request -
Migrate flow-data tests to JUnit 5 (#23599)
Commit · Pull requestConvert 71 test files from JUnit 4 to JUnit 5: - Replace JUnit 4 imports with JUnit 5 equivalents - Before/After -> BeforeEach/AfterEach - Test(expected=X.class) -> assertThrows(X.class, ...) - ExpectedException Rule -> assertThrows + message assertions - Assert.xxx() -> static imports from Assertions - Message-first assertions reordered to message-last - RunWith(Parameterized.class) -> ParameterizedTest + ValueSource for DataCommunicatorTest and DataCommunicatorAsyncTest - Visibility adjustments for cross-package inheritance
-
Migrate vaadin-dev-server tests to JUnit 6 (#23622)
Commit · Pull request