ractive v0.4.0 Release Notes

  • 2014-04-08

    • ๐Ÿ’ฅ BREAKING: Filenames are now lowercase. May affect you if you use Browserify etc.
    • ๐Ÿ’ฅ BREAKING: set(), update(), teardown(), animate(), merge(), add(), subtract(), and toggle() methods return a Promise that fulfils asynchronously when any resulting transitions have completed
    • BREAKING: Elements are detached when all transitions are complete for a given instance, not just transitions on descendant nodes
    • ๐Ÿ’ฅ BREAKING: Default options are placed on Ractive.defaults (and Component.defaults, where Component = Ractive.extend(...))
    • ๐Ÿ’ฅ BREAKING: The adaptors option is now adapt. It can be a string rather than an array if you're only using one adaptor
    • Reactive computed properties
    • Two-way binding works with 'keypath expressions' such as {{foo[bar]}}
    • ๐Ÿ‘Œ Support for single-file component imports via loader plugins such as http://ractivejs.github.io/ractive-load/
    • ๐ŸŽ A global runloop handles change propagation and other batchable operations, resulting in performance improvements across the board
    • Promises are used internally, and exposed as Ractive.Promise (Promises/A+ compliant, a la ES6 Promises)
    • ๐Ÿ’… Components can have encapsulated styles, passed in as the css option (disable with noCssTransform: true)
    • ractive.reset() method allows you to replace an instance's data object
    • โšก๏ธ Decorators are updated when their arguments change (with specified update() method if possible, otherwise by tearing down and reinitialising)
    • Inline components inherit surrounding data context, unless defined with isolated: true
    • Transitions will use JavaScript timers if CSS transitions are unavailable
    • A global variable (window.Ractive) is always exported, but Ractive.noConflict() is provided to prevent clobbering existing Ractive variable
    • Inline component init() methods are only called once the component has entered the DOM
    • Any section can be closed with {{/...}}, where ... can be any string other than the closing delimiter
    • ๐Ÿ–จ Evaluators that throw exceptions will print an error to the console in debug mode
    • ractive.observe(callback) - i.e. with no keypath - observes everything
    • ractive.observe('foo bar baz', callback) will observe all three keypaths (passed to callback as third argument)
    • ๐Ÿ‘ Better whitespace preservation and indenting when using ractive.toHTML()
    • ๐Ÿšš Calling ractive.off() with no arguments removes all event listeners
    • Triples work inside SVG elements
    • <option>{{foo}}</option> works the same as <option value='{{foo}}'>{{foo}}</option>
    • More robust data/event propagation between components
    • More robust magic mode
    • ๐Ÿ›  Fixed a host of edge case bugs relating to array mutations
    • ๐Ÿ›  Many minor fixes and tweaks: #349, #351, #353, #369, #370, #376, #377, #390, #391, #393, #398, #401, #406, #412, #425, #433, #434, #439, #441, #442, #446, #451, #460, #462, #464, #465, #467, #479, #480, #483, #486, #520, #530, #536, #553, #556