Releases: TimvdLippe/iron-lazy-pages
Small documentation updates
Some small issues are fixed in the documentation of the element.
<dom-if> support
<dom-if>
is now supported:
<iron-lazy-pages
attr-for-selected="data-route"
selected="{{route}}"
loading="{{loading}}"
hide-immediately>
<template is="dom-if" data-route="foo" restamp>
Leaving this tab and coming back will loose input value due to restamp<br/>
<input type="text"/>
</template>
<template is="dom-if" data-route="bar">
Leaving this tab and coming back will keep input value<br/>
<input type="text"/>
</template>
</iron-lazy-pages>
Fix resolving when the parentNode of iron-lazy-pages is not the element host
If the parentNode of iron-lazy-pages is a different element,
for example an app-skeleton element, we should not resolve by the parentNode
but by the host instead.
Update documentation for webcomponents.org
The inline demo should work properly now on https://www.webcomponents.org/element/TimvdLippe/iron-lazy-pages
Polymer Hybrid
There are several breaking changes when upgrading from 1.0 to 2.0:
iron-lazy-page
has been removed.
There are two reasons for this. First of all type extension is not supported by all major browsers.
It is therefore not possible to rely on <template is="...">
extensions.
Secondly, upgrading from iron-pages
to iron-lazy-pages
was quite intrusive
and the template syntax was confusing to users.
To upgrade, see the following example of before and after:
Before
<iron-lazy-pages attr-for-selected="data-route">
<template is="iron-lazy-page" data-route="foo" path="foo.html">
Foo page
</template>
<template is="iron-lazy-page" data-route="bar" path="bar.html">
<bar-page></bar-page>
</template>
</iron-lazy-pages>
After
<iron-lazy-pages attr-for-selected="data-route">
<span data-route="foo" data-path="foo.html">Foo</span>
<bar-page data-route="bar" data-path="bar.html"></bar-page>
</iron-lazy-pages>
As you can see, the templates are removed. Instead of path
on iron-lazy-pages
,
every page must now set data-path
instead. This also removes compatibility for
plain text nodes (e.g. previously you could add plain text in a iron-lazy-page
).
You must wrap the text in a <span>
or <div>
to once again display.
Paths are resolved relative to the parent of iron-lazy-pages
Given the following project structure:
src
|-- pages-user.html
|-- lazy-loaded.html
In 1.0 path="src/lazy-loaded.html"
. This has been changed to data-path="lazy-loaded.html"
. This is more logical from a usage perspective and also allows iron-lazy-pages
to be used in reusable components where the absolute URL is not known for all applications.
Note: this works if iron-lazy-pages
is a direct child of a custom element.
neon-lazy-pages
has been removed
neon-animation
has been deprecated and the maintenance burden of this element was too impactful for iron-lazy-pages
. Moreover, numerous issues were raised regarding animation timing, animation inconsistency and therefore not living up to the expectations of developers. Thus I decided to remove the element, as it was not serving the purpose that it should have been and maintaining would be too costly for me.
Fix issue for analyzing with the polymer-analyzer
The annotation for the PolymerBehavior was wrong, see https://github.com/Polymer/polymer-linter/issues/70
Add selective restamp for pages
Fix timing issue with multiple stamps
Fixes a timing issue with multiple stamps as described in #41
Fix missing import of Polymer
v1.4.3 v1.4.3
Light dom elements are stamped to the user of the wrapper
Previously styling was impossible in the element that declared the pages, e.g. the user of the wrapper light dom. Now with light dom the pages are stamped to the user of the wrapper.