Changes since 24.2.0
New features
-
Add handleDisconnect method to plugin
Commit · Pull requestAdd the possibility to be notified when the devTools is disconnected from the client.
-
Add ConditionalOnMissingBean for ServletRegistration
Commit · Pull request -
Add Div constructor that accept text content
Commit · Pull request · Issue -
Allow to check changes for a specific binding
Commit · Pull request · IssueAllows to check if a specific binding has uncommitted changes. Overloads the existing Binder#hasChanges method.
-
Add AccessDeniedException for ViewAccessChecker
Commit · Pull request · IssueViewAccessChecker
is changed to throwAccessDeniedException
instead ofNotFoundException
by default when access is denied. Added default error page RouteAccessDenie
dError for the AccessDeniedException. Page is same asRouteNotFoundError
by default (extendsAbstractRouteNotFoundError
). AddedAccessDeniedErrorRouter
annotation to
customize rerouting of access denied error per route withAccessDeniedErrorRouter#rerouteToError
. --------- -
Add getActiveViewLocation and getActiveRouterTargetsChain to UI
Commit · Pull request · IssueAdds new public API for already existing features in
UIInternals
.UI#getActiveViewLocation()
is shortcut toUIInternals#getActiveViewLocation()
andUI#getActiveRou terTargetsChain()
is shortcut toUIInternals#getActiveRouterTargetsChain()
. -
Reset focus on active element in ShortcutRegistration
Commit · Pull request · IssueAdds setResetFocusOnActiveElement, resetFocusOnActiveElement and isResetFocusOnActiveElement to ShortcutRegistration class to optionally reset focus on active element (fo
cused element in browser). Resetting means calling blur() and focus() on the active element to ensure that input fields with ValueChangeMode ON_CHANGE will fire value chang
e event before shortcut handler is run. Updates ClickNotifier#addClickShortcut(Key,KeyModifier...) to reset focus on active element by default for click shortcuts. -
Default I18N provider
Commit · Pull request · IssueAdd implementation for a I18N provider that is loaded if there are translation properties files in the defined classpath folder
vaadin-i18n
. If a custom I18N is set def
ault will never be loaded. -
Add RouteParameters to AfterNavigationEvent
Commit · Pull request · IssueAdds a getter for RouteParameters in AfterNavigationEvent.
-
Show error view on action exception
Commit · Pull request · IssueIf there is a error view for the thrown exception during rpc handling update view to error view. Using the util class enables custom error handlers to also opt in to the
feature. Default handler has feature behing featureFlag Use propertyenableErrorHandlerRedirect
for opting in to the redraw feature. Test that only matching exception in
handled Test that setError is called Test that parent is initialized Test that content is added to UI --------- -
Provide an API to make router ignore an anchor
Commit · Pull request · IssueAnchors in Vaadin are simply broken if the url happens to be relative. With this API that can be fixed. ---------
-
Allow specifying
devDependencies
withAtNpmPackage
.
Commit · Pull request · IssueThis PR adds a dev property to the AtNpmPackage annotation. Setting
dev = true
adds the package to devDependencies instead of dependencies. -
Cache all classes from JARs
Commit · Pull request -
Adds a VaadinRequestInterceptor abstraction
Commit · Pull requestVaadinRequestInterceptor simulates an around aspect around processing of a request.
Fixes
-
Exit disconnect if disconnection already happened
Commit · Pull request · Issue -
RouteAlias hides Route value
Commit · Pull request · Issue -
Consume output from postinstall executions
Commit · Pull request · IssueExecution of postinstall tasks can lead to a deadlock if the subprocess produces more output on stdout than can fit in the pipe buffer. This change ensures that the outpu
t of the subprocess if correctly consumed. -
Readding component that on detach removes components
Commit · Pull request · Issueto the same parent and at the same time in a detachListener removes components from the parent.
-
Push event allows redirects for expired session
Commit · Pull request · IssueThis change makes sure that when handling push connection without an active session (which was closed by other request), for a disconnected atmosphere resource, response
will not trigger location change as it does normally. This allows any active redirects to be handled properly as push handler is not canceling them anymore so eagerly. This
is done by tracking disconnected resource UUIDs and checking that disconnected resource is not producing a response that triggers another reload when session is not availa
ble. -
Jsx files are not taken into front-end build from add-ons
Commit · Pull requestWe already support tsx, but the more trivial jsx files don't seem to work. Something that people probably try first, especially if the embedded component is only using JS
... -
Handle shadow DOM stylesheets in production and dev bundle
Commit · Pull request · IssueThe legacy shadow DOM stylesheets that can potentially be present in the 'theme//components/' folder are not considered when deciding if a new bundle needs to
be created, so the application may miss custom components styles. This change checks for existence of theme components CSS, and it triggers a bundle rebuild if any is found
. -
Do not passivate child keys with active&expanded parents
Commit · Pull request · Issue -
Update role checkers to work in same way
Commit · Pull request · IssueAdded AuthenticationUtil#getSecurityHolderRoleChecker(String rolePrefix) method that works now in same way as SecurityContextHolderAwareRequestWrapper#isGranted(String ro
le). Role prefix is set and read in VaadinRolePrefixHolder bean by SpringViewAccessChecker#getRolesChecker(VaadinRequest). -
Add reachable classes to child route
Commit · Pull requestWhen child entrypoint has no AtRoute annotation, but it's parent class does have, the reachable classes from parent class are added to the child entrypoint, so frontend m
odules are added as well and bundle chunk is generated with all needed web-components. -
Added class can be with /
Commit · Pull requestOn windows at least the added class can come in the format com/example/application/Hello in which case the cache throws a IndexOutOfBounds exception for the range [0, -1]
-
Improve LitTemplateParser to find correct content
Commit · Pull request · IssueChanges regex in LitTemplateParser to find correct template content in case when lit template code contains "return html`" template also after the render function.
-
Ignore servlet registrations without server-class definition
Commit · Pull request · IssueServletDeployer performs several checks on servlet registrations to determine if the Vaadin Servlet must be registered automatically. However, as of servlet 3.0, <servlet
-class> is optional in declaration in web.xml, and in this case ServletDeployer fails with a NPE. With this change ServletDeployer ignores servlet registration wi
thout a servlet-class definition. -
Be less verbose when Vite is not running
Commit · Pull request · Issue -
Disable the Vite public directory to not interfere with a folder named 'public'
Commit · Pull requestIf you create a
src/main/resources/static/public
folder with static files, you will see a lot offiles in the public directory are served at the root path. Instead of /public/images/logo.jpg, use /images/logo.jpg.
when trying to access the files. This is because the default "publcDir" of Vite is "public" and the Vite server is que
ried for resources before loading from the class loader -
Detach should be sent for node
Commit · Pull request · IssueDo not clean the node id or hasAttached state too early as then we do not send the detach event for the node.
-
Do not override user npm dependency version
Commit · Pull request · Issues [17654](https://github.com/vaadin/flow/issues
/17654), 17528, 17639Bumps com.nimbusds:nimbus-jose-jwt from 9.34 to 9.35. - [Changelog](https://bitbucket.org/connect2id/nimbus-jose-jwt/s
rc/master/CHANGELOG.txt) - Commits --- updated-dependencies: - dependency-name: com.nimbusds
:nimbus-jose-jwt dependency-type: direct:production update-type: version-update:semver-minor ... when postponing a router-link as the navigation goes through the vaadin-rou
ter. This is the first step to make the tests for all components in theme-editor. This PR also adds setup/tearDown support to the theme-editor Testbench tests. a side effec
t of this change is that the checking of the values in the file is deferred and then the dev server can write to the file before we try to read it. -
Use build timestamp for Push script request
Commit · Pull request