Skip to content

v0.13.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@francoisfrisch francoisfrisch released this 02 Jul 21:02
· 2902 commits to master since this release
  • Directory Structure

All non-components have been moved from the ui directory to the core directory.
Composers have been moved to the root directory.

  • Core

Montage.create() has been replaced by a specialize method on the constructor. The specialize method returns a constructor function that can be invoked with the new operator. (For details see
Montage objects.)

  • FRB bindings

Functional Reactive Bindings (FRB) have replaced the old bindings. More info >

  • Component

Lifecycle methods

(See also Component draw cycle.)

  • enterDocument is called every time the component's element is added to the DOM. When enterDocument is called the element is already in the DOM.
    The first time enterDocument is called, a Boolean with value true is passed in. In this situation enterDocument replaces prepareForDraw.
  • exitDocument is called every time the component's element is removed from the DOM. When exitDocument is called the element is still in the DOM.
  • dispose is called when the component is discarded.

classList

Added a classList property to all component instances. You can use this property with the same API as the element's classList without impacting the draw cycle performance. The property can be used to great effect with FRB bindings to do things like: classList.has('complete') <- @owner.isComplete.

DOM arguments

Components can now receive DOM arguments. A DOM argument is specified in the component markup by adding a data-arg attribute and assign a name to its value.
DOM arguments can be referenced after the first enterDocument with the extractDomArgument(name) method.
When a component has a Template with parameters, each template parameter element is replaced with the corresponding component argument element.

  • Template

Templates can now have DOM parameters. A DOM parameter is specified in a template using the data-param attribute on the DOM node that represents the parameter. data-param has the value of the parameter name.

  • Serialization

A lot of the serialization code has been refactored to a separate project mousse and made more generic.

  • Components

The contents of the montage/ui directory have been split between the ui directories of the core montage framework and the digit, matte, and native template packages.
The montage/ui directory now contains the following directories:

Substitution

The substitution's API has substantially changed to a template based approach that makes use of the new component arguments API.

  • Abstract components

In an effort to make basic components easier to create and more consistent, the abstract components now provide a super
class that widget sets can specialize with their own template. This is how the digit widgets are implemented.