All Versions
102
Latest Version
Avg Release Cycle
58 days
Latest Release
-

Changelog History
Page 5

  • v0.9.13 Changes

    • ๐Ÿ› Bug fixes
      • Aliases, key refs, and index refs are now properly implicitly mapped when referenced from a non-isolated component (#3174)
  • v0.9.12 Changes

    • ๐Ÿ› Bug fixes
      • Computations that manage to update outside of a runloop no longer throw (#3169)
      • Static mustaches no longer leak memory when they reference data linked in from another instance (#3183)
      • Obersvers that manage to get updated more than once in a runloop will now update correctly (#3184)
      • Transition and animation events are now whitelisted because they can't be automatically detected on IE (#3190)
      • Setting a bound multiple select to undefined no longer throws (#3194)
  • v0.9.11 Changes

    • ๐Ÿ› Bug fixes

      • Reference expressions now properly handle wrapping or unwrapping values during get() thanks to @m-r-r (#3143)
      • Key and index refs will no longer cause an exception if they happen to become a context (#3145)
      • Event handlers on components are set up at bind so that any lifecycle events after construct can be attached as handlers in the template (#3148, #3159)
      • Decorators in conditional sections properly update when invalidated (#3152)
      • Partial expressions can be null again (#3154)
      • Partial expressions that update and resolve to the same value no longer reset their template (#3151)
      • IE doesn't have an onmouseenter or onmouseleave on SVG nodes, so we now check window for DOM events too (#3157)
      • Reference expressions fully participate in capture, so that computations using them via alias update correctly when the reference expression changes (#3163)
      • Linking to an instance mode e.g. @.root will no longer result in a memory leak when the linking instance is torn down (#3164)
    • Other changes

      • The array of adaptors for an instance is now shared with its viewmodel once it has resolved - #3147
  • v0.9.10 Changes

    • ๐Ÿ› Bug fixes

      • Computations and their children now unwrap and adapt correctly thanks to @m-r-r (#3130, #3137)
      • Computations and linked computations that are spliced will now invalidate rather than breaking the runloop (#3127)
      • Viewmodel teardown is deferred until lifecycle events are complete to avoid leakage due to mappings being expanded after teardown (#3131)
    • Other changes

      • Any type of event including component events are now targetable using context.raise
      • Context objects now include a hasListener(name[, bubble]) helper that checks for event listeners available in the template from the context's position. By default, it only checks the immediate parent, but can be told to check all ancestors by passing true for the optional bubble argument.
  • v0.9.9 Changes

    • ๐Ÿ› Bug fixes

      • Reference expressions no longer cause memory leaks (#3123)
      • Name bound elements that also have a bound value now have special-cased handling for when the value updates to keep the name binding up to date (#3124)
      • <script> tags in templates are automatically closed at the end of input because HTML doesn't special-case nested script tags (#3125)
    • Other changes

      • The runtime build once again excludes the parser code, which managed to sneak back in amidst some build process udpates.
  • v0.9.8 Changes

    • ๐Ÿ› Bug fixes
      • Binding attributes not owned directly by an element (conditional attributes) now behave correctly.
      • Yielded partials no longer find the wrong anchor node when rendering in certain circumstances (#3121)
      • Delegated events now play more nicely with <use> tags in certain environments (IE, older Safari, etc) (#3122)
  • v0.9.7 Changes

    • ๐Ÿ› Bug fixes

      • The flag that tells partial templates to update no longer gets stuck causing unnecessary partial re-renders
      • Async components with sibling nodes are rendered in the correct order
      • The old option is available on pattern observers in addition to plain observers (#3118)
      • Triples now render correctly if they are rendered after the initial render (#3119)
    • Other changes

      • Ractive will now warn you if it detects another global copy of Ractive during init (#3101)
      • The managed style element used for component CSS is now tagged with a data-ractive-css attribute (#3091)
  • v0.9.6 Changes

    • ๐Ÿ’ฅ Breaking changes

      • Experimental parser transforms have been removed and replaced with a runtime construct associated with partials (see below)
    • ๐Ÿ› Bug fixes

      • HTML comments will now render (#3103)
      • Re-linking a linked path to itself will now throw a proper error instead of overflowing the stack (#3107)
      • Adapted values now reset and teardown correctly (#3100, #3112)
      • The default data for a component constructor is a function that returns an empty object rather than an empty object so that the component will inherit default data by default.
      • sharedGet and styleGet are now actually implemented on Ractive constructors as was erroneously indicated in the notes for 0.9.4
    • ๐Ÿ†• New features (experimental)

      • Async components: Components added to the component registry may be a promise or a function that returns a promise. While the promise is unresolved, the template will be left blank or display an options async-loading partial if supplied. When the promise resolves, the component will be rendered or supplied to an optional async-loaded partial as {{>component}} if the async-loaded partial is supplied. If the promise rejects, the template will be emptied or the async-failed partial will be rendered, if supplied.
      • The low-level construct that enables async components is the super or macro partial, which is also available for general use. A macro partial is one that provides a function that takes a context handle that can set the partial's template at any time.
      • Macro partials can also have scoped css using the same mechanism as components.
      • They are created with Ractive.macro( ( handle, args ) => { ... }, { options } ) and should be passed into a partials registry
      • They can be invoked using regular partial syntax or using element syntax as a lightweight component e.g. <macro attr1="{{foo}}">content partial</macro>
      • The handle passed to the macro function can be used to:
        • Do anything a normal context object can e.g. get, set, observe, listen, etc
        • Create aliases to @local data for the macro's template e.g. handle.aliasLocal( 'name' ) and handle.aliasLocal( 'foo.bar', 'foobar' ), which creates an alias name for @local and an alias foobar for @local.foo.bar, respectively.
        • Change the template for macro at any point using handle.setTemplate( newTemplate ) where newTemplate can be a string or template script id if runtime parsing is available or a pre-parsed template.
        • The template property of the handle is a safe copy of the template AST containing the macro, and the partials property is a safe shared copy of the partials available to the macro.
      • The options available for Ractive.macro are:
        • attributes - an array of attribute names to reserve for the macro. Any attributes not present in this array are collected and made available to the macro as the {{>extra-attributes}} partial.
        • css - a string or function used for creating CSS for the macro
        • cssId - the id to use for CSS scoping
        • noCssTransform - if true, the CSS will not be scoped
        • cssData - the base dictionary for the macro's style data
      • The return object from the macro function can include a number of callbacks:
        • update(attrs) - called whenever any reserved attributes change. If handle.setTemplate is called from this callback, it will not trigger an additional turn of the runloop, so it's a relatively efficient operation.
        • render() - called when the template is rendered
        • invalidate() - called when any downstream template updates
        • teardown() - called when the macro is being removed from the template e.g. on unrender or if the dynamic name of the partial changes
  • v0.9.5 Changes

    • The mjs files are once again properly transpiled for those who use a module aware bundler with no transpiler.
  • v0.9.4 Changes

    • ๐Ÿ› Bug fixes

      • Various bugs related to attaching child instances to anchors, including inherited partials, certain template constructs, and anchors inside iterative sections (#3060)
      • Style directives now reset safely e.g. don't change the inline style that they relate to if the value of that style doesn't match the expected value as last set by the directive
      • Event directives have properly deferred listener subscript (#3050)
      • Observers subscribed from the observe init option are deferred until after the instance fragment is created so that they can observe mapped and non-isolated data (#3053)
      • BREAKING: {{else}} and {{elseif}} are now considered to be block-closing, meaning that the div in {{#if cond}}<div>{{else}}</div>{{/if}} would already be closed in the else section, resulting in an error rather than a div with an interpolator referencing a keypath named else (#3051)
      • Array observers are now properly strict so that downstream modifications don't cause errant observations
      • Method calls on the immediate context are now correctly handled as (this).method() rather than (this.method)()
      • Same-named attributes in different branches of a conditional will now check to make sure the element attribute has an expected value before resetting (#3071)
      • null is considered an empty context when passed to ractive.fire (#3079)
      • The long-form of init events and observers will no longer get stuck in the wrong context after the first use (#3081)
      • Reference expressions will now shuffle correctly when their base model shuffles (#3092)
    • ๐Ÿ†• New features (experimental)

      • links can be supplied with a keypath option that allows them to track through shuffles rather than being absolute
      • The css extend option may now be a function that receives a data helper that can retrieve data from a new inherited component data registry @style
      • Any time the @style data for a component changes, the Ractive style tag will be updated with the recomputed result of executing the affected css functions.
      • Component constructors have new methods provided for accessing style data Component.styleGet(keypath) and Component.styleSet(Object | keypath, value).
      • An instance can access its component style data using @style e.g. this.get('@style.some.path')
      • Computed styles will still be transformed so that they are scoped to the component unless the component is extended with css transforms disabled.
      • The root of the style data registry is on the Ractive constructor, so global style data can be accessed with Ractive.getStyle and Ractive.setStyle. Any sets from components override parent data for that part of the inheritance hierarchy.
      • The bin has been extended to handle dynamic css using <script rel=css>, which is transformed by using the content of the script as the body of a function function (data) { ... }. The data parameter name can be set with the data-name attribut on the script tag. A Ractive text-only template can also be used for dynamic css from a <style rel="ractive"> or <style href="..." type="text/css+ractive"> tag for inline or external templates, respectively. Note that evaluating Ractive style templates requires creating a dummy instance and is thus not as performant as the <script> method.
      • Ractive constructors also have sharedSet and sharedGet methods for accessing @shared data without requiring and instance
      • Components can request additional mappings during construct by setting this.component.mappings to an array of AST attributes or a string of mappings e.g. mapping="{{.}}" if runtime parsing is available. This is a low-level feature that's more intended for library authors than general users. (#3070)
      • Context objects now allow access to parent contexts using context.getParent( crossComponentBoundary ). This allows finer-grained access to template contexts than the element-only level offered by ractive.getContext().
      • ractive.fire will reuse a context if the context has a truthy refire property (context.refire = true) (#3067)
      • includeLinePositions will no longer break partials nested within elements (#3082)
      • You can now access the context object prototype at Ractive.Context, so you can supply your own context object extensions (#3090)
    • Other changes

      • The construct lifecycle event can now be subscribed from the on init hash
      • The keep option of set will now also keep DOM nodes, passing them through the progressive enhancement path on re-render
      • Kept sets are also pseudo-async because transitions may be involved, whereas non-kept sets will happily create duplicate DOM on the page while the old DOM is transitioning out.
      • BREAKING: NaN is considered to be an empty value in interpolators, like null and undefined. If you need to render NaN on the page, then you can convert it to a string in the interpolator e.g. {{ NaN + '' }} or {{${NaN}}}.
      • {{yield}} outside of a component context is now a noop