Posted 8 days ago. Visible to the public. Auto-destruct in 52 days

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!

Maintaining the .up-current on all links turned out to be a major performance bottleneck, so we had to make some breaking changes:

  • The .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

  • 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.
  • The up.morph() function has been demoted from stable to experimental.
  • up.motion.finish() now longer queries the DOM when there are no active animations.

Application layout

  • When Unpoly cannot find the viewport of an element, it will now always considers document to be the viewport.

Fragment updates

  • The 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.

Utility functions


  • 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.


  • New stable selector .up-destroying. This CSS class is assigned to elements before they are destroyed or while they are being removed by a transition.
  • Fix a bug where up.first() would sometimes find an element that is being destroyed.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Author of this card:

Henning Koch
Last edit:
8 days ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev