Unpoly 0.56: Better performance, .up-current changes, new animation engine
This release includes major performance improvements and a new animation engine.
Beware of the breaking change with
.up-current on all links turned out to be a major performance bottleneck, so we had to make some breaking changes:
.up-currentclass 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
You can also globally configure selectors for your navigational elements in
- The normalized URLs of
[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.
- When performing an animated page transition Unpoly will no longer create copies of the old and new fragment versions. The animation will instead be performed on the fragment elements themselves.
- When animating an element with an existing CSS transition, Unpoly will now pause the CSS transition in its current state, perform the animation, then resume the CSS transition.
- Unpoly now does less work when animation is disabled globally through
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.
- When Unpoly cannot find the viewport of an element, it will now always considers
documentto be the viewport.
up:fragment:destroyedevent is now emitted after the fragment has been removed from the DOM. The event is emitted on the former parent of the removed fragment.
- Fix a bug where
truefor a function value
- Fix a bug where
up.util.only()did not copy properties inherited from a prototype
- Partially remove jQuery from internal code for performance reasons. We want to eventually remove jQuery as a dependency.
- Cache the results of feature detection for performance reasons.
- Unpoly is now more efficient when selecting elements from the DOM.
- Unpoly is now more efficient when reacting to mouse events.