This release includes major performance improvements and a new animation engine.
Beware of the breaking change with .up-current
!
Maintaining the .up-current
class on all links turned out to be a major performance bottleneck, so we had to make some breaking changes:
.up-current
class is now only assigned to links with an [up-nav]
attribute, or to links within a container with an [up-nav]
attribute. You should assign the [up-nav]
attribute to all navigational elements that rely on .up-current
for styling`.You can also globally configure selectors for your navigational elements in up.status.config.navs
:
up.status.config.navs.push('.my-nav-bar')
[up-nav]
links are now cached for performance reasons.[up-nav]
links are only updated once when multiple fragments are updated in a single replacement.up.motion.config.enabled = false
.up.morph()
will now expect the new fragment version to be detached from the DOM before morphing.up.morph()
will now detach the old fragment version from the DOM after morphing.up.morph()
function has been demoted from stable to experimental.up.motion.finish()
now longer queries the DOM when there are no active animations.document
to be the viewport.up:fragment:destroyed
event is now emitted after the fragment has been removed from the DOM. The event is emitted on the former parent of the removed fragment.up.util.isBlank()
returned true
for a function valueup.util.only()
did not copy properties inherited from a prototype
If you're upgrading from an older Unpoly version you should load unpoly-migrate.js
to polyfill deprecated APIs.
Changes handled by unpoly-migrate.js
are not considered breaking changes.
See our upgrading guide for details.