Releases: Polymer/polymer
Preview Release v2.0.0-rc.6
Meaningful Changes
- Start supporting compilation with Closure Compiler in 'ADVANCED' mode
- Allow
setProperties
to set readOnly propertiesthis.setProperties({readOnlyProp: value}, true)
- Prevent properties from reverting to default value after boot when the property has no observers
Raw Notes
-
[ci skip] Fix API docs (commit)
-
Guard against overwriting bound values with hasOwnProperty. Fixes #4540 (commit)
-
[ci skip] reduce warnings (commit)
-
fix globals for goog.reflect.objectProperty -> JSCompiler_renameProperty swap (commit)
-
[ci skip] remove outdated externs file (commit)
-
lint and compile successfully (commit)
-
update dependencies (commit)
-
Rename
setPrivate
->setReadOnly
(commit) -
Add
setPrivate
arg tosetProperties
(commit) -
Never accidental test change (commit)
-
Fix jsdoc warnings. (commit)
-
jsdoc fixes. (commit)
-
Fix jsdoc issues. (commit)
-
Fix jsdoc issues. (commit)
-
Enable error on jsdoc mistake. (commit)
-
fix @license comments & shadycss imports. Remove custom style from externs (commit)
-
closure advanced compilation (commit)
Stable Release v1.9.1
Meaningful Changes
- Fix use of
this.resolveUrl()
function in theproperties
block - Fix hybrid use of
dom-if
,dom-bind
, anddom-repeat
with 2.x wrapper elements to stamp content above the wrapper
Example:
<!-- content should be stamped here -->
<dom-bind>
<template is="dom-bind">
<!-- content -->
</template>
</dom-bind>
Raw Notes
-
Remove use of ES6 API. (commit)
-
Remove use of ES6 API. (commit)
-
Ensure optimization uses hybrid parentNode (commit)
-
Use local
parentNode
(commit) -
Capture hybridDomRepeat. (commit)
-
Fix dom-if detachment (commit)
-
Add dom-if test for add/remove. (commit)
-
Add test for add & remove (commit)
-
Add 2.x hybrid affordances for stamping template content. Fixes #4536 (commit)
-
Fix lint (commit)
-
Make tests more strict. (commit)
-
Use
_importPath
inresolveUrl
so it available early. Fixes #4532 (commit) -
[ci skip] update Changelog (commit)
v2.0.0-rc.5
Meaningful Changes
- Add more override points for controlling template stamping
- Adds override points for _parseBindings and _evaluateBinding
- Adds support for runtime template binding
- Moves ready(), _hasAccessor tracking, and instance property swizzle at ready time to PropertyAccessors
- Other refactoring and cleanup
- More information on using binding overrides at #4510 (comment)
- Add
$
id map todom-bind
elements - Refactor
PropertyEffects
mixin with a more usable API - Support listening to Gesture events with
dom-bind
elements
Raw Notes
-
Eliminate rest args for better perf on stable chrome. (commit)
-
Fix perf regressions. (commit)
-
Move second tap test to the correct spot. (commit)
-
Add GestureEventListeners to dom-bind. (commit)
-
Add more comments (commit)
-
[ci skip] Fix comment. (commit)
-
alias another way (commit)
-
use chrome beta (commit)
-
Add more HTMLImports.whenReady (commit)
-
Address feedback from review: * Refactor
_bindTemplate
to remove problematichasCreatedAccessors
* Remove vestigialdom
from_bindTemplate
call * Rename_unstampTemplate
to_removeBoundDom
* AddinfoIndex
tonodeInfo
(and renamed parent & index) * Add test to ensure runtime accessors created for new props in runtime stamped template * Changed custom binding test to use different prop names * Added test for #first count after removing bound dom (commit) -
Fix lint error. (commit)
-
Ensure prototype wasn't affected by runtime effects. (commit)
-
Add tests for adding/removing runtime property effects. (commit)
-
Added tests for custom parsing, effects, and binding. (commit)
-
Add initial runtime stamping tests. (commit)
-
Fix changelog generation (commit)
-
Address feedback based on review. * PropertyAccessors must call
_flushProperties
to enable * Avoid tearing off oldProps (unnecessary) * AddaddBinding
docs * Merge notifyListeners intosetupBindings
* Add comment re: path-bindings not being overridable * Removedom
argument from_bindTemplate
* Rename_stampBoundTemplate
back to_stampTemplate
(commit) -
Put $ on dom, and assign to element as needed. Eliminate _templateInfo reference. (commit)
-
Fix _hasAccessor for readOnly. Collapse addBinding & addBindingEffects (commit)
-
Improvements to binding API: - Adds override points for _parseBindings and _evaluateBinding - Adds support for runtime template binding - Moves ready(), _hasAccessor tracking, and instance property swizzle at ready time to PropertyAccessors (commit)
Stable Release v1.9.0
New Features
Two new properties were added to all Polymer elements for forward-compatibility with 2.0 (for use in "2.0 hybrid" elements): importPath
and rootPath
.
The importPath
property defaults to the element's HTMLImport document URL path.
The rootPath
property defaults to the main document URL's path but may be globally overridden via Polymer = { rootPath: '...' }
prior to loading polymer.html
.
Inside element templates, users can now use property binding (e.g. src$="[[importPath]]foo.jpg"
or src$="[[rootPath]]foo.png"
) to explicitly declare what the URL is relative to, rather than relying on Polymer 1.x's automatic URL rewriting, which has been removed in 2.x.
It may be useful to override rootPath
to provide a stable application mount path when using client side routing so that an element template can refer to "application absolute" paths.
Raw Notes
-
[ci skip] skip looking in build log, again (commit)
-
[ci skip] backport changelog fixes (commit)
-
- allow setting
rootPath
- disallow setting
importPath
(this is supported in 2.x but not 1.x) (commit)
- allow setting
-
Add
importPath
androotPath
to support 2.x hybrid compatible elements. (commit) -
[ci skip] Update Changelog (commit)
-
Add missing semicolon after variable assignment (commit)
-
Update PRIMER.md (commit)
v2.0.0-rc.4
Meaningful Changes
- Reintroduce
beforeRegister
to install dynamic property effects. In a difference from 1.x,is
property cannot be set in this function. - Maintain 1.x ordering of
ready()
lifecycle call, where children will alwaysready()
before the parent. - Implement
disable-upgrade
feature from 1.x - Implement new
lazy-upgrade
feature with a mixin to lazily upgrade elements marked withdisable-upgrade
- In this example, the
<x-disabled>
children of<x-lazy>
will upgrade asynchronously, but in the order of$.a
,$.c
, and then$.b
<dom-module id="x-lazy"> <template> <!-- x-disabled will automatically be upgraded asynchronously --> <x-disabled id="a" disable-upgrade lazy-upgrade="1"></x-disabled> <x-disabled id="b" disable-upgrade lazy-upgrade="3"></x-disabled> <x-disabled id="c" disable-upgrade lazy-upgrade="2"></x-disabled> </template> <script> class XLazy extends Polymer.LazyUpgrade(Polymer.Element) { static get is() { return 'x-lazy' } } customElements.define(XLazy.is, XLazy); </script> </dom-module>
- In this example, the
- Allow elements to override template binding functions
Raw Notes
-
fix lint error (commit)
-
Only style elements with templates (commit)
-
[ci skip] note safari bugs (commit)
-
Various Safari 10.1 fixes (commit)
-
Add
@memberof
annotation for Polymer.Debouncer (commit) -
Import mutable-data.html in dom-bind (commit)
-
Correct changelog version title (commit)
-
Fix readme. (commit)
-
tighten up custom-style-late test (commit)
-
Fixes #4478 by adding a better warning for attributes that cannot deserialize from JSON. (commit)
-
Adds back the
beforeRegister
method. Users can no longer set theis
property in this method; however, dynamic property effects can still be installed here. (commit) -
Fixes #4447. Re-introduce the
hostStack
in order to maintain “client before host” ordering when_flushProperties
is called beforeconnectedCallback
(e.g. as Templatize does). (commit) -
Fix custom-style-late tests (commit)
-
Add test for ensuring complicated mixin ordering is correct (commit)
-
move lazy-upgrade out to separate mixins repo (commit)
-
Only check bounding client rect on clicks that target elements (commit)
-
Adds tests from #4099. The other changes from the PR are no longer needed. (commit)
-
clean up code, factor processing lazy candidates, better docs (commit)
-
Update templatize.html (commit)
-
Doc fix (correct callback name) (commit)
-
Fixed tempaltize -> templatize typo (commit)
-
Work around IE/Edge bug with :not([attr]) selectors (commit)
-
Remove support for lazy-upgrade inside dom-if and dom-repeat (commit)
-
Fix image in README (commit)
-
Remove useless id check on mixins (commit)
-
move dom-change listener for lazy-upgrade before
super.ready()
(commit) -
[ci skip] Update doc (commit)
-
[ci skip] Update doc (commit)
-
Add API docs. (commit)
-
nodeInfo -> nodeInfoList (commit)
-
Updates based on PR feedback. API docs in progress. (commit)
-
- ensure element cannot return to “disabled” state after upgrading. * ensure nested
beforeNextRender
calls always go before the next render * ensure nestedafterNextRender
are called after additional renders (commit)
- ensure element cannot return to “disabled” state after upgrading. * ensure nested
-
Fixes #4437. Ensure
_registered
is called 1x for each element class usingLegacyElementMixin
. Ensure that a behaviors’sregistered
method is called for any extending class. (commit) -
Separate binding-specific code from template stamp. Expose override points. (commit)
-
Use webcomponents-lite for test (commit)
-
add lazy-upgrade tests (commit)
-
make a mixin for lazy upgrading (commit)
-
implements
disable-upgrade
attribute which prevents readying an element until the attribute is removed. (commit)
Preview Release v2.0.0-rc.3
Meaningful Changes
- Allow properties, behaviors, observers, hostAttributes, and listeners to be set in
Polymer({})
calls - Behaviors can only be set on the element prototype
Raw Notes
-
add properties, behaviors, observers, hostAttributes, listeners on prototype (commit)
-
[skip ci] update test comments (commit)
-
better comment (commit)
-
get behaviors only from prototypes (commit)
-
behaviors ONLY on the prototype (commit)
-
add instance behaviors (commit)
-
[ci skip] minor doc edits. (commit)
-
[ci skip] expand range of dependencies to all rcs (commit)
Preview Release v2.0.0-rc.2
Meaningful Changes
- Hybrid elements can make template instances with mutable data
- Fire
dom-change
events with the composed flag
Raw Notes
-
another test fix. (commit)
-
fix behavior warn test. (commit)
-
update to latest webcompnents rc. (commit)
-
move mutable data mixin to be loaded by polymer.html (commit)
-
Fix 4387. Ensure
dom-change
fired withcomposed: true
. (commit) -
Allow hybrid elements (like iron-list) to make template instances with mutable data (commit)
-
Don't override the goog namespace if it already exists (commit)
-
Use correct version (commit)
-
Fix spelling error (commit)
-
[ci skip] Fix note re: transpilation (commit)
-
[ci skip] Remove obsolete note re: pre-upgrade attribute vs. property priority (commit)
-
[ci skip] Fix note re: attached (commit)
-
[ci skip] Add back intro README content from 1.x, updated to 2.x syntax. (commit)
Preview Release v2.0.0-rc.1
Meaningful Changes
The following notable changes have been made since the 2.0 Preview announcement.
-
The
config
getter on element classes has been replaced by individualproperties
and
observers
getters, more closely resembling the 1.x syntax.static get properties() { return { aProp: String, bProp: Number } } static get observers() { return [ '_observeStuff(aProp,bProp)' ] }
-
1.x-style dirty checking has been reinstated for better performance. An optional mixin is
available for elements to skip dirty checking of objects and arrays, which may be more easy to
integrate with some state management systems. For details, see
Using the MutableData mixin in Data system concepts. -
Support for dynamically-created
custom-style
elements has been added. -
Support for the external style sheet syntax,
<link rel="import" type="css">
has
been added. This was deprecated in 1.x, but will be retained until an alternate solution is
available for importing unprocessed CSS. -
New properties
rootPath
andbasePath
were added toPolymer.Element
to allow authors
to configure how URLs are rewritten inside templates. For details, see the
Update URLs in templates in the Upgrade guide.
Stable Release v1.8.1
Meaningful Changes
- Fix for UC browser's non-standard
properties
property on instances ofHTMLElement
: #4314 - Experimental feature to avoid inlining
<style include>
and instead use multiple<style>
elements- Only usable with native ShadowDOM
- Can be enabled with
preserveStyleIncludes
flag, but requiresdom=shadow
setting
Raw Notes
- Exclude SD polyfill tests for Edge due to lack of workarounds for Edge DocFrag bugs. (commit)
- [ci skip] Update comment to include reference to problem browser. (commit)
- Check documentElement instead of body to guarantee it's there. (commit)
- add tests (commit)
- Adds a setting
preserveStyleIncludes
which, when used with a shadow dom targeted css build and native custom properties, will copy styles into the Shadow DOM template rather than collapsing them into a single style. This will (1) allow the browser to optimize parsing of shared styles because they remain intact, (2) reduce the size of the css build resources when shared styles are used since they are not pre-collapsed. This option does perform registration runtime work to add included styles to element templates. (commit) - Fix test failures by feature detecting instance
properties
accessors. Can't rely on__proto__
on IE10, but that browser doesn't need to avoidproperties
. (commit) - Read properties off of proto during configuration. (commit)
- remove cruft. (commit)
- Ensure disable-upgrade elements are not "configured". Fixes #4302 (commit)
- change lastresponse to last-response in dom-bind example (commit)
Stable Release v1.8.0
New Features
Suppress notification events
- New global setting:
Polymer = { suppressTemplateNotifications: true }
- suppresses
dom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddom-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/dom-repeat
instances.
- suppresses
- New global setting:
Polymer = { suppressBindingNotifications: true }
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
(which is generally unnecessary since the host element doing the binding can use afoo
observer) or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound. We attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this in corner-case scenarios. Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag.
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
disable-upgrade
attribute
Adds a disable-upgrade
attribute API for all Polymer elements when global opt-in setting Polymer = { disableUpgradeEnabled: true }
is set. This is a lightweight feature useful for performance tuning an application, giving fine-grained control over individual element instantiation cost.
When an element is marked with the disable-upgrade
attribute, its createdCallback
will return early without performing any of the normal Polymer element initialization steps (e.g. stamping template, setting default properties, running observers, etc.). The element will behave similar to an element that has not had its definition loaded, except that it will actually have the correct prototype (as such, methods should not be called on the element until its disable-upgrade
attribute has been removed).
Removing the disable-upgrade
attribute will then cause the element to boot up, initialize its properties, stamp its template, etc.
Note this feature is implemented as an attribute API only. There is no corresponding disableUpgrade
property. As such, any bindings should be via attribute bindings, e.g. <my-element disable-upgrade$="{{!loggedIn}}">
.
Meaningful Changes
<template strip-whitespace>
The strip-whitespace
attribute is now recursive to descendant templates, stripping whitespace from nested <template is="dom-repeat">
and <template is="dom-if>
elements.
Raw Notes
- Add comment. (commit)
- Only keep
disable-upgrade
attribute if it is an attribute binding. (commit) - spacing. (commit)
- Update webcomponentsjs dependency (commit)
- Change
isInert
todisable-upgrade
and feature is now supported only via thedisable-upgrade
attribute. (commit) - Add tests for
is-inert
(commit) - Prevent annotator from removing the
is-inert
attribute. (commit) - fixes for users of Polymer.Class (commit)
- Add support for
isInert
to allow elements to boot up in an inert state. e.g.<x-foo is-inert></x-foo>
. SettingxFoo.isInert = false
causes the element to boot up. (commit) - Small typos updated (commit)
- work around older firefox handling of the "properties" property on HTMLElement prototype (commit)
- improve comments (commit)
- Add comments. Behavior fast copy flag changed to
_noAccessors
. (commit) - Fix tests on IE10 and simplify constructor shortcut. (commit)
- Make dom-module work on older Safari. (commit)
- micro-optimizations: (1) favor mixin over extends where possible, (2) unroll behavior lifecycle calls, (3) avoid creating a custom constructor when not used, (4) provide
_skipDefineProperty
setting on behaviors which copies properties via assignment rather thancopyOwnProperty
(commit) - Ensure done. (commit)
- Test positive case of suppressBindingNotifications (commit)
- Add notifyDomBind to dom-bind. (commit)
- Test Polymer.Settings inside test. (commit)
- Revert unnecessary change. (commit)
- Fix test lint issue. (commit)
- Add global flags to suppress unnecessary notification events. Fixes #4262. *
Polymer.Settings.suppressTemplateNotifications
- disablesdom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddon-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/don-repeat
instances. *Polymer.Settings.suppressBindingNotifications
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound (we attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this). Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag. (commit) - Fix
strip-whitespace
for nested templates. (commit) - [ci skip] update changelog v1.7.1 (commit)
- Close backtick in ISSUE_TEMPLATE.md (commit)