Releases: vaadin/flow
Releases · vaadin/flow
Production mode and bugfixes
New features
- When not in production mode,
frontend://
URLs will be resolved based on the assumed location of the original file instead of resolving to a URL in/es6/
or/es5/
. Thanks to this, changes to the application's own template files are used immediately without any separate build steps. - New
flow-server-production-mode
dependency that automatically sets the app to run in production mode if present on the classpath.
Fixes
- All traces of Polymer 1 have been removed.
- Model objects exposed to JavaScript are created with the standard
Object
prototype so that e.g.toString
is available. - Model objects exposed to JavaScript will no longer have enumerable properties for Flow metadata.
- Removed excessive logging about excessive imports.
- Fixed an IE11 compatibility issue
- The
UI.getElement()
now works as any other element.
Breaking changes
com.vaadin.flow.dom.EventRegistrationHandle
has been renamed tocom.vaadin.shared.Registration
for consistency with Vaadin Framework 8.Node.attachExistingElement
has been removed.- Prerendering has been removed
Demos
- All demos updated to not need rebuilding to pick up changes to HTML template files
Tutorials
- Updated Maven setup tutorial to reflect recent changes
All changes
Primitives in model lists and Polymer 2.0.0
New features
- Model lists can now use "primitive" types in addition to beans. In particular,
List<String>
is now fully supported as the type of model properties. - Polymer 2.0.0 is used in all demos and examples.
Fixes
- No longer setting the
async
attribute property for HTML imports because of browser compatibility issues List.clear()
can be used for model list proxies even if the item type doesn't have a default constructor.- The mechanism for resolving
@Id
elements has been improved to work consistently in all browsers.
Breaking changes
@Id
does no longer work with elements where theid
attribute has been set dynamically: theid
value must be present in the HTML template file.
Demos
- Added a Todo list demo that uses
@Id
.
All changes
Binding components inside PolymerTemplates
New features
- Now it is possible to bind components from PolymerTemplate by using the
@Id
annotation - Elements created by Javascript at the client-side can be manipulated at the server side
Fixes
- Non-blocking loading of dependencies changed to Lazy loading, and now behaves like expected
- ES6 support detection is now more strict for Edge browsers
- Allow empty lists in Polymer property bindings
Breaking changes
- The
blocking
parameter on resource annotations (like@HTMLImport
) and the imperative API (likeaddHtmlImport()
) was replaced by theLoadMode
enum.
Tutorials
- Replaced Non-blocking Importing tutorial for Lazy Loading
- Added Binding components from PolymerTemplate
All changes
Non blocking dependencies
New features
- Added possibility to load dependency in non-blocking mode
- Added BootstrapListener mechanism to Flow so that the contents of the generated head tag can be modified
Fixes
- Child components inside ShadowRoot should find the UI through
Component.getUI()
Breaking changes
- RouterLink attribute has been changed from
routerlink
torouter-link
Demos
- Example web site demo updated with an added BootstrapListener
Tutorials
- Added Non-blocking Importing
- Added Modifying bootstrap page
- Updated RouterLink tutorials (
routerlink
torouter-link
)
All changes
Shadow root introduced in Flow
New features
- Added a possibility to attach shadow root to custom elements from server side
- Now Flow collects all custom element tags for PolymerTemplates on startup in order to prepare Flow to deal with template in template cases
Fixes
- Fixed a potential issue that caused dynamically created polymer elements not sending value updates for two-way bindings
Breaking changes
None
Demos
- Created a demo for shadow dom usage demonstration
- Hello World repository updated to use modern Flow features, like Polymer templates and ES5 transpilation
- Updated polymer minesweeper demo so that it works in IE11 now
Tutorials
- Updated ES5 compilation tutorial
- Added shadow root tutorial
All changes
Maintenance Flow release
New features
- Property change server side events for Polymer elements with two-way data bindings.
- Support for ES6 and ES5 files simultaneously.
Fixes
RouterLink
supports the root view (defaulthref
attribute value is not removed)- routerLinks work in polymer templates
Demos
No changes, except adjustments caused by the breaking changes.
Tutorials
- Binding Model Data in a PolymerTemplate tutorial is updated to show how to use property change listener for two-way data bindings.
All changes
First Vaadin Flow release
New features
- Project renamed from
Hummingbird
toFlow
. @EventHandler
parameter can be a sub-item or list from the model using@ModelItem
.- Typically used to get the
<dom-repeat>
item, but can also get other items.
- Typically used to get the
- Structural changes to lists in the model are now sent to the client.
- Polymer template model values and element property values are now kept in sync with each other.
Fixes
- Default values from the server-side model will now override client-side defaults.
Breaking changes
- All
hummingbird
words are replaced withflow
, including package names, file names, artefact names etc. TemplateModel
interface forAngularTemplate
has been moved to thecom.vaadin.flow.template.angular.model
package.PolymerTemplate
should still useTemplateModel
from the previous package.
Demos
No changes, except adjustments caused by the breaking changes.
Tutorials
- Updated the event handlers tutorial to demonstrate the
@ModelItem
usage
All changes
Template usability improvements
New features
- List inside List property support:
List<List<?>>
@RepeatIndex
as a shorthand for@EventData("event.model.index")
for use with<dom-repeat>
.- Polymer template class methods can be annotated with
@ClientDelegate
to make them available asthis.$server
on the client. - Subproperties in two-way data bindings are now officially supported
Fixes
- Make list bindings work in SDM
Breaking changes
@EventHandler
is now only used for exportingPolymerTemplate
event handlers. Use@ClientDelegate
for exporting an RPC target into theelement.$server
namespace.- Before 0.0.23
@EventHandler
on a method in a class extendingPolymerTemplate
is exported aselement.methodName
.@EventHandler
on a method in a class extendingComponent
(but notPolymerTemplate
) is exported aselement.$server.methodName
.
- After 0.0.23
@EventHandler
on a method in a class extendingPolymerTemplate
is exported aselement.methodName
.@ClientDelegate
on a method in a class extendingComponent
(includingPolymerTemplate
subclasses) is exported aselement.$server.methodName
.
- Background: There are two different types of exported RPC targets intended for different situations. Prior to this change, it was not possible to use the
$server
approach together withPolymerTemplate
because the@EventHandler
annotation had different meaning depending on the context.element.methodName
functions are intended as Polymer event handlers. Any method parameters should be annotated with@EventData
to define what value to extract from the Polymer event.element.$server.methodName
are intended to be directly invoked from JS. Method parameters are directly encoded as JSON and made available on the server.
- Before 0.0.23
Demos
- Minesweeper demo now uses list bindings
- jQuery table demo was fixed
Tutorials
- Updated the list binding tutorial to highlight the
@RepeatIndex
usage
All changes
Advanced template features
New features
- Advanced features for
PolymerTemplate
- SubProperty data bindings, aka TemplateModel with Beans
- Lists in TemplateModel
Fixes
- Include source maps for the v1 polyfill
- Clarify JS variable use in executeJavaScript JavaDocs
- Load es6-collections for all browsers
Demos
- jQuery table integration demo has been added to the demos.
Tutorials
- Using Beans with a PolymerTemplate Model
- Two-way data binding was added to the bindings tutorial.
- Creating Template Contents Dynamically Based on a List of Items
All changes
Two-way data binding for Polymer templates
New features
PolymerTemplate
now supports two-way data bindings a server-side model. Model values updated by Polymer through a two-way{{binding}}
are automatically synchronized to the server.- Advanced features such as sub items and lists are still missing.
Fixes
- Empty model values are also sent to the client so that Polymer can discover that the property exists and use it in the template.
- HTML import loading has been fixed to work together with the v1 webcomponents polyfill. This fixes compatibility with non-Chrome browsers.
- Error message clarified when an
EventData
subclass cannot be created because it's a non-static inner class.
Demos
- Hello World using Template API has been updated to use
PolymerTemplate
instead ofAngularTemplate
. - All demos that use Polymer 2.0 have been updated to use rc1
Tutorials
- Polymer Template hello world tutorial updated to use a one-way model binding.