Changes since 24.1.0.alpha3
Breaking changes
-
Add DataProvider API for refreshing without clearing selection
Commit · Pull request · IssueAdds new method DataProvider#refreshItems(boolean) as a replacement for DataProvider#refreshAll() to allow choosing to either clear or keep selection. DataChangeEvent has new method isClearSelection() that DataProvider change listeners can utilize.
-
Bump pnpm version to a supported versions (8.3.1)
Commit · Pull requestpnpm 8 dropped node 14 support which has no impact on Flow. There are changes to the lockfile and local store format but pnpm should upgrade or redownload as needed. pnpm 8.3.1 also works with Node 20
-
Remove fallback chunk
Commit · Pull request · IssueThe fallback chunk contained all JavaScript and CSS for classes which cannot be reached from an entry point (route or exported web component). By removing it we improve performance as we do not need to scan all classes, only the reachable ones. We also fix issues with the license checker as it did not really know how to behave with commercial components that may or may not be used. The drawback of removing the fallback chunk is that if you are using a component which is not reachable, as determined by the scanner, then your JS/CSS for the component will be missing. The typical case for this is having a factory that can create components using reflection. The scanner is not able to find the referenced classes as they only appear as a string in the source code. For this case, you need to add
@Uses(SomeComponent.class)
to the factory, for each component it can create using reflection. To be able to detect unreachable components in development mode, you should set thedevmode.optimizeBundle
property totrue
.
New features
-
Support lazy loading of route dependencies
Commit · Pull requestAdds a
@LoadDependenciesOnStartup
annotation you can set on yourAppShellConfigurator
class to define for which routes the dependencies should be loaded eagerly when the application is first visited, e.g.@LoadDependenciesOnStartup(MyMainView.class)
Defining only@LoadDependenciesOnStartup
causes all dependencies to be loaded eagerly Not defining any@LoadDependenciesOnStartup
annotation uses the Flow default, which currently is to load everything eagerly but is bound to be changed to load""
and"login"
routes, if defined, eagerly and dependencies for the remaining views on demand. Also adds a@DependencyTrigger
that overrides which class triggers loading of the dependencies for a route not loaded on startup. It is meant to be used internally to create the default production bundle. It is not meant for any other usage. -
Use default prod bundle if possible
Commit · Pull request · Issues 16627, 16671Re-uses re-bundle checker in production mode. Copies default bundle files from JAR to application's resource folder in target and skips re-bundling or executes usual frontend build codes if it sees any customisations. Uses class finder to look for frontend resources from flow plugin.
-
More eager cleanup for UIs using Beacon API
Commit · Pull requestNotifies server about closed UIs using a beacon request on pagehide event. At the same time unifies behaviour in certain edge cases, where Safari maintained the state when brought back from page cache. Previously Safari in some situations kept the state. Tested manually with Safari, Chrome, Firefox and validated results using VisualVM. Closes #6293
-
Add feature flag for the SideNav component
Commit · Pull request -
Warn about JavaScript that is not found in production
Commit · Pull requestIf you at runtime use a component with
@JsModule
that refers to a url that was not included in the bundle even though it should have, this prints a warning like "The component class com.vaadin.flow.component.notification.Notification includes '@vaadin/notification/src/vaadin-notification.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a@Uses(Notification.class)
where it is used."
Fixes
-
Handling cases when theme.json change is not triggering dev bundle build
Commit · Pull requestFixing some cases when theme.json change is not triggering a dev bundle build and so stat.json is not reflecting those changes, covered with unit tests, so will be easier next time (if needed) to check for other specific cases. Fixes # (issue) #16419. Co-authored-by: Marco Collovati marco@vaadin.com
-
Only include generated web component files into generated-imports
Commit · Pull request -
TaskUpdatePackages should use finder
Commit · Pull request · IssueThe tasks should use finder for getting resources instead of using a XYZ.class.getClassLoader() as that doesn't contain required content.
-
Clean Frontend/generated folder
Commit · Pull requestClean the frontend generated folder on prepare-frontend task (maven/gradle) Closes #16640
-
Only include one theme again
Commit · Pull request · IssueReverts FullDependenciesScanner changes from #16568
-
Try polling again on connection refused
Commit · Pull requestThis should fix problems with the dev mode not ready page showing forever on startup
-
Do not encode special characters in CSS
Commit · Pull request · Issue -
Form a correct path for the project folder when on Windows
Commit · Pull request · Issue -
Use spring-framework-bom 6.0.8 to resolve vulnerability
Commit · Pull requestvulnerability report: https://nvd.nist.gov/vuln/detail/CVE-2023-20863 the matching spring-boot hasn't been released yet.