All Versions
106
Latest Version
Avg Release Cycle
58 days
Latest Release
-
Changelog History
Page 6
Changelog History
Page 6
-
v0.9.6 Changes
2017-10-23
💥 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
andstyleGet
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 optionalasync-loaded
partial as{{>component}}
if theasync-loaded
partial is supplied. If the promise rejects, the template will be emptied or theasync-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' )
andhandle.aliasLocal( 'foo.bar', 'foobar' )
, which creates an aliasname
for@local
and an aliasfoobar
for@local.foo.bar
, respectively. - Change the template for macro at any point using
handle.setTemplate( newTemplate )
wherenewTemplate
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 thepartials
property is a safe shared copy of the partials available to the macro.
- Do anything a normal context object can e.g.
- 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 macrocssId
- the id to use for CSS scopingnoCssTransform
- iftrue
, the CSS will not be scopedcssData
- 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. Ifhandle.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 renderedinvalidate()
- called when any downstream template updatesteardown()
- called when the macro is being removed from the template e.g. on unrender or if the dynamic name of the partial changes
- 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
-
v0.9.5 Changes
2017-10-08
- The
mjs
files are once again properly transpiled for those who use amodule
aware bundler with no transpiler.
- The
-
v0.9.4 Changes
2017-11-29
🐛 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 thediv
in{{#if cond}}<div>{{else}}</div>{{/if}}
would already be closed in the else section, resulting in an error rather than adiv
with an interpolator referencing a keypath namedelse
(#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 toractive.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)
link
s can be supplied with akeypath
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)
andComponent.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 withRactive.getStyle
andRactive.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 functionfunction (data) { ... }
. Thedata
parameter name can be set with thedata-name
attribut on thescript
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
andsharedGet
methods for accessing@shared
data without requiring and instance - Components can request additional mappings during
construct
by settingthis.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 byractive.getContext()
. ractive.fire
will reuse a context if the context has a truthyrefire
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 theon
init hash - The
keep
option ofset
will now also keep DOM nodes, passing them through the progressive enhancement path on re-render - Kept
set
s are also pseudo-async because transitions may be involved, whereas non-keptset
s 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, likenull
andundefined
. If you need to renderNaN
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
- The
-
v0.9.3 Changes
2017-07-24
🐛 Bug fixes
- Plain objects can now be used to extend context when firing events (#3033)
- Bug with transition params being non-objects (#3029)
- Various fixes for delegation corner cases related to both nesting and disabled elements (#3036, #3046)
- Root functions that are mapped to a component root maintain the owning instance as context (#3031)
- Directive attributes within conditionals will now avoid rendering their directive form as an attribute on their owning element
- The polyfills have been reduced to the minimum for ES5 support and included in the main build. There is no longer any need for the polyfills.js file for browsers that support ES5, which should include IE9+.
- Links/mappings to indices and object iteration keys will now shuffle correctly (#3042)
data
is no longer considered whenresolveInstanceMemebers
is true, so that the root model can't be accidentally corrupted when data is not fully initialized.resolveInstanceMembers
will be defaulted tofalse
for 1.0.- Reference expressions will now correctly invalidate when their target model is shuffled (#3045)
- Bug with twoway bindings and more than one interpolator in the target attribute (#3043)
- Boolean attributes that have a string value will now render the string into the target attributes (#3023)
- Shuffling an unset keypath is now the equivalent of a
set
- Nodes within a triple mustache will now defer detachment until any containing elements with transitions are detached
ractive.animate
will consider theinterpolator
option, if passed, when looking up an interpolator to use with the source and destination values
🆕 New features
- Decorators can now request that their owning element notify them when the element is invalidated i.e. when the element or some template that is part of its body will be updated. This is accopmlished by simply adding an
invalidate
method to the control handle returned by the decorator.
- Decorators can now request that their owning element notify them when the element is invalidated i.e. when the element or some template that is part of its body will be updated. This is accopmlished by simply adding an
-
v0.9.2 Changes
2017-06-30
- 🐛 Bug fixes
- The bin now properly handles partial names with invalid identifier characters (
-
). - Computed setters are now called when a child is updated (#3006)
- Shuffling
set
s and link-related shuffles properly invalidate any associated DOM (#3010) - Elements that happen to be children of a delegation target that are also not subject to delegation will no longer fire events twice (#3012)
super
detection forextendWith
is a bit more accomodating for ES6+ classes.css
that looks like it may be a selector will no longer throw if it's not a valid selector (#3005)input[type=file]
bindings will no longer try to set the value on blur, causing a DOMException (#3015)
- The bin now properly handles partial names with invalid identifier characters (
- 🐛 Bug fixes
-
v0.9.1 Changes
2017-06-11
🐛 Bug fixes
- Pattern observers will now fire even if there are other incidental changes caused by a shuffle (#2984)
- Bindings now interact correctly with event delegation (#2988)
- Styles set during transitions are now tracked individually and reset only if they have the expected value after the transition is complete (#2986)
- CSS and JS transitions are now selected more accurately and don't interfere with each other if they happen to overlap (#2998)
- Dotted mappings on components apply properly (#2060)
Other changes
ractive.target
is an alias forractive.el
to match the init params of sharing those names (#2977)- You can now access the
Parent
andRactive
constructors from any extension. The parent constructor was available before, but using the "private" property_Parent
. - Ractive constructors now have an
isInstance
method that will returntrue
if a given object is an instance of the constructor (#2914) - Context objects now have event delegation helpers
listen
andunlisten
so that custom events and decorators can use delegation where appropriate.
-
v0.9.0 Changes
2017-05-26
🐛 Bug fixes
- Observers on uninitialized data may be added during the
config
event (#2725) - The unwrap option of
ractive.get
will now properly return the wrapped object if is set tofalse
(#1178) - Overriding a Ractive prototype method during
Ractive.extend
without calling_super()
will now issue a warning, as it's probably being done in error (#2358) toHTML
will output CSS scoping ids for components that have acss
option specified (#2709)easing
functions that can't be run using CSS transitions will now cause the transition to be run as JS (#2152)
- Observers on uninitialized data may be added during the
💥 Breaking changes
- All deprecations have been removed, including proxy events with args, un-prefixed method events, decorator="...", transition="...", the ractive.data getter, partial comment definitions, and lifecycle methods like
init
andbeforeInit
. - With deprecations removed, directive values are now parsed with the plain expression parser, which doesn't automatically encode HTML entities in string literals.
- The template spec is now a bit simpler after the removal of deprecations, and templates parsed with previous versions of Ractive are no longer compatible.
- Partial context (
{{>foo thisIsTheContext}}
) now only applies inside the partial template, meaning it is no longer equivalent to{{#with thisIsTheContext}}{{>foo}}{{/with}}
. The with is wrapped around the content offoo
, so that the context doesn't interfere with the partial expression. - Any partial may be yielded, so yielding non-inline partials will no longer warn.
- The same partial may be yielded multiple times.
- Events now fire in an initial implicit
this.
namespace. This means that withthis.on( '*.foo', handler )
,handler
will be called if and component fires afoo
event or if thethis
instance fires afoo
event. - The
noIntro
option now applies to any nested components that are also being rendered, unless they have their own explicit setting. - Legacy builds removed. Only regular and runtime builds are now available.
- Library does not contain polyfills anymore for the following APIs:
Array.isArray
Array.prototype.every
Array.prototype.filter
Array.prototype.find
Array.prototype.forEach
Array.prototype.indexOf
Array.prototype.map
Array.prototype.reduce
Function.prototype.bind
Node.prototype.contains
(only used in testing)Object.assign
Object.create
Object.defineProperty
Object.defineProperties
Object.freeze
Object.keys
performance.now
Promise
requestAnimationFrame
String.prototype.trim
window.addEventListener
window.getComputedStyle
- Ships with a separate, minimal polyfill file containing only the above APIs for older browsers.
ractive.nodes
no longer contains elements by id. The same functionality can be handled more safely and conveniently with a decorator.- HTML elements are now exclusively created with a lowercase name.
- Keypath expressions are no longer supported, as they are largely redundant with
getContext
functionality. (@keypath(../some.ref)
is no longer a valid reference) - Unresolved references will now resolve to the immediate context rather than registering with every available context to be resolved when one of the contexts grows a matching base key.
- Event directives within iterative sections will automatically use delegation (see below).
- The undocumented
observeList
function has been moved to an option ofobserve
(see below). - The
change
lifecycle event has been removed and replaced with recursive observers (see below). - Live element and component queries e.g.
ractive.findAll( 'some selector', { live: true } )
are no longer supported. If you need similar functionality, you can use a specialized decorator for elements or lifecycle events for components. - Linking a keypath that happens to be observed will now cause any observers to fire.
- The
event
reference in event directives is deprecated, and all event handlers will now receive a context as their first parameter regardless of whether or not they originated with a DOM event (see below). ractive.merge
has been moved to an option ofset
to better reflect what it actually does (hint: it doesn't actually merge - see below).- Components are now isolated by default. You can change the global default by setting
Ractive.defaults.isolated
if you need the old behavior to be the default. ractive.runtime.js
is now namedruntime.js
, so if you require it, it isrequire('ractive/runtime.js')
.- You can no longer create a component using another component as the options argument to
extend
e.g.MyComponent.extend(OtherComponent)
. You can still extend a component with one or more options objects e.g.MyComponent.extend({ ...options }, { ...other }).extend({ ...more })
. class-
directives are now parsed in an expression context, meaning that mustaches are no longer required. This normalizes templates into two categories: stringy things that require mustaches, and value things that don't. Thestyle-
directive remains in the stringy category.- The magic and array adaptors have been removed from core, though they may reappear as plugins.
getNodeInfo
has been renamed togetContext
. The old name is deprecated and will be removed in a future release.- Non-
isolated
components may now implicitly map duringset
operations. You can achieve the previous behavior by passingisolated: true
as an option.
- All deprecations have been removed, including proxy events with args, un-prefixed method events, decorator="...", transition="...", the ractive.data getter, partial comment definitions, and lifecycle methods like
🆕 New features (experimental - feedback welcome!)
- You can now create cross-instance links by passing an options object with a target instance e.g.
this.link('source.path', 'dest.path', { ractive: sourceInstance })
. This covers many of the cases handled by theractive-ractive
adaptor in a considerably more efficient manner. - There is now an API to manage embedding external instances i.e. out-of-template components. You can use
ractive.attachChild(otherRactive, { options })
andractive.detachChild(otherRactive)
to create a component relationship between two instances. There is a new anchor construct<#anchorName />
that behaves mostly like a regular inline component except that it won't create its own Ractive instance. You can target an anchor when attaching a child by giving an anchor name as an option e.g.ractive.attachChild(otherRactive, { target: 'anchorName' })
. Attached children need not be components, so you can attach a plain Ractive instance e.g.const foo = new Ractive({ ... }); ractive.attachChild(foo);
. {{yield}}
can now be used with any partial, not just inlines, and it may also use an expression to look up the target partial. It basically behaves as a regular partial with a special context.{{yield}}
can also specify aliases, so that yielding is useful inside an iterative section.{{yield partialName with foo as bar}}
and{{yield with foo as bar}}
will makefoo
from the component context available to thepartialName
partial asbar
.- You can specify that child keypaths of computations should trigger updates on the computation's dependencies, which should have the effect of keeping the models involved in the computation in sync with changes to the computed models. The flag to enable this behavior at instance creation is
syncComputedChildren: true
. With that flag set, children of computations are available for two-way binding and mutation from event orgetContext
objects using relative keypaths. @.foo
has been introduced as shorthand for@this.foo
. This mirrors the data shorthand.foo
forthis.foo
.- You can now pop contexts using
^^/
in the same way that you can pop keypaths with../
. - Special keypaths that resolve to Ractive instances now resolve using the proper model rather than a computation, so they now stay in sync.
- There is now a special key
data
on special keypaths that resolve to Ractive instances that resolves to the instance's root model. This allows things like@.root.data.foo
to keep the root instancefoo
reference in sync throughout the component tree. - There is a new Ractive-private shared store,
@shared
. This is roughly the same as@global
, but it is not susceptible to interference from the global scope. - There is a new option,
resolveInstanceMembers
, which defaults totrue
, and when enabled, it adds the instance scope@this
to the end of the reference resolution process. This means that as long as there are no conflicting members in the context hierarchy, things like<button on-click="set('foo', 'bar')">yep</button>
work as expected. Note that if the resolved function will only be bound to the instance if it contains athis
reference, which can be a little strange if you're debugging. - There is a new option,
warnAboutAmbiguity
, which defaults tofalse
, and when set, it will issue a warning any time a reference fails to resolve to a member in the immediate context. - API methods can now handle things like
ractive.set('~/foo', 'bar')
, mirroring how context methods forgetContext
andevent
s are handled. Things likeractive.set('.foo', 'bar')
will now issue a warning and do nothing rather than creating an incorrect keypath (<empty string>.foo
). - You can now trigger event listeners in the VDOM from event and node info objects e.g. with
<div on-foo="@global.alert('hello')" >
withractive.getContext('div').raise('foo');
will trigger an alert. - There are two new options available for subscribing events and observers when an instance is created using two new options.
on
takes a hash of event listeners that will be subscribed just after theconstruct
phase of instantiation, meaning that any lifecycle events afterconstruct
may also have listeners added in the event hash.observe
takes a hash of observers that will be subscribed just after theconfig
phase of instantiation.- Both of these options are additive, so any subscriptions defined in component super classes are applied first in sequence from the root of the component class hierarchy down to the options of the instance being created.
- The hashes can contain keys that could be passed directly to the matching method e.g.
ractive.on( key, ... )
orractive.observe( key, ... )
. - The hashes can contain values that are either a callback function or an object that has a
handler
property that is a callback function. If the object form is used, any additional keys are passed to the method. If aonce
property is supplied and is truthy, then the appropriate single-fire method will be used to subscribe. For instanceobserve: { 'foo.* bar': { handler() { ... }, strict: true, once: true, defer: true } }
passed in an options object is equivalent to callingractive.observeOnce( 'foo.* bar', function() { ... }, { strict: true, defer: true } )
during theinit
phase of instantiation. - Event listener handles returned from
ractive.on( ... )
now have methods to silence and resume the listener. The existingcancel()
method now has siblingsisSilenced()
,silence()
, andresume()
. When a listener is silenced, it will not call its callback. - Like event listeners, observer listener handles also have methods to silence and resume the listener. While an observer is silenced, it will still track state changes internally, meaning the old value on the next call after being resumed will be the last value it observed, including those observed while it was silenced. It simply won't fire its callback while it is silenced.
- You can now stop component outros from firing while a component is being unrendered by specifying
noOutro: true
, which mirrors the behavior ofnoIntro
. - You can now specify whether or not transitions should occur if they are on a child element of another transitioning element by using:
- Instance option
nestedTransitions
, which defaults totrue
, meaning that transitions will fire whether they are on elements that are children of other transitioning elements or not. - The transition option
nested
, which also defaults totrue
. - There's a new
ractive
command distributed with the node module that allows easy pre-parsing of templates and building of components. If you have the module installed locally, see./node_modules/.bin/ractive
for more details. - You can now specify required and optional attributes when creating a component with
Ractive.extend()
using theattributes
option. The value ofattributes
may be an array of strings, specifying that all of the named attributes are optional, or an object withrequired
and/oroptional
keys that each have an array of strings as their value. - If
attributes
are specified for a component, then by default any additional attributes passed to the component will not be treated as mappings directly but instead, will be collected into a special partial namedextra-attributes
. You can yield this partial in an element to apply the extra attributes to it, which allows passing things likeclass
andstyle
along to the main element in a component easily. Note that the extra attributes will not create mappings by default, and you must yield theextra-attributes
partial to put it in the scope of the containing instance.{{yield extra-attributes}}
- If the
attributes
object includesmapAll: true
as one of its keys, then any extra attributes will be mapped and theextra-attributes
partial will contain attributes that reference the mappings, which means the partial should not be yielded.{{>extra-attributes}}
- Event delegation is now enabled by default for iterative sections. If the iterative section is contained within an element, then any event directives in the iterations will use a shared DOM listener on the element containing the section. You can disable delegation globally with
Ractive.defaults.delegate = false
, on an instance withdelegate: false
, or at the element level with the directive (attribute)no-delegation
on the element containing the section. - Observers have been refactored with the following new options:
array: true
will cause the observer to fire with an object containing lists of the added and removed elements. This option replacesractive.observeList
.old: function() { ... }
is a hook that allows you to set theold
value that the observer passes to your callback. You can use this to freeze the old value, provide a deep clone, etc.- Using recursive path notation e.g.
some.path.**
or**
, you can observe any changes to the data in a way that gives you the actual value and keypath that changed e.g. withsome.path.foo.bar.baz
changing to42
, the observer callback would get42
and the full keypathsome.path.foo.bar.baz
rather than the object atsome.path
, as with a regular or wildcard observer. ractive.set
now has the following new options:{ deep: true }
will cause the given value to merge into the target keypath e.g. withfoo
as{ a: 1, b: { c: 2 } }
,ractive.set(
foo, { d: 3, b: { e: 4 } }, { deep: true } )
will result in{ a: 1, b: { c: 2, e: 4 }, d: 3 }
.{ keep: true }
will cause any VDOM fragments that would be torn down as the result of theset
(oradd
,subtract
, ortoggle
) to be retained. This makes it possible to have components in conditional sections not be destroyed and recreated as the section toggles.{ shuffle: true }
when used with an array will move any existing DOM corresponding to elements in both the new and old array to their new indices. The corresponds to the removedmerge
method. If you want to shuffle the array against itself, you can passnull
as the new value e.g.ractive.set( 'some.array', null, { shuffle: true } )
.- The first argument to the callback supplied to
ractive.on
will be a context object regardless of whether or not the event originated as a DOM event. This means that all event listeners share the same base callback signature. Any additional arguments tofire
will follow the context argument. - The
event
reference for event directives has been deprecated and replaced by@context
,@event
, and@node
: @context
is a Ractive context object that also has anevent
property continaing the original event and aname
that is the name of the fired event.@event
is the original event object, so aMouseEvent
for anon-click
delegate.@node
is the DOM node to which the event directive is attached.- You can now re-proxy an event from an event directive expression by returning a single array with a
string
first element e.g.<button on-click="['foo', arg1, arg2]">
, which is the equivalent of@this.fire('foo', @context, arg1, arg2)
. - You can now use an existing class, be it ES5, ES6, or any other conforming implementation, using
Ractive.extendWith( MyClass, { ...extendOpts } )
. This allowsclass Foo { constructor( opts ) { super( opts ); /* other init */ }, someMethod () { ... }, ... }
to be turned into a Ractive component. - To complete the split of template handling in to stringy mustaches and non-stringy expression values, the
bind-
directive has been introduced to bind an attribute value without mustaches e.g.<input value="{{foo}}" />
is the same as<input bind-value="foo" />
. This can be used with components to create mappings to same-named values in the current context e.g.<component bind-item />
. - There is now a post-parsing hook available in the form of parser transforms, which are simply functions that receive a template element node and return a falsey value, telling the parser to do nothing, an object with a
remove
boolean, telling the parser to remove the node, or an object with areplace
key, telling the parser to replace the node with the given content. Any expressions injected by parser transforms also participate in the CSP adjustment process. There is also a special reference@local
, which only exists directly within a given context that is intended for use by parser transforms that need minor private state management.
- You can now create cross-instance links by passing an options object with a target instance e.g.
🆕 New features (stable)
target
is now an alias forel
when creating a Ractive instance.- You can now use spread expressions with array and object literals in expressions in addition to method calls. Object spreads will require
Object.assign
to be available. - There is a new lifecycle hook,
destruct
that fires after teardown is complete and any related transitions have completed. - Lifecycle events now receive the source Ractive instance as their last argument.
- You can now use context-relative
observe
andobserveOnce
from event and node info objects. - You can now access decorator objects from event and node info objects using
obj.decorators.name
, where name is the decorator name as specified in the template e.g.foo
in<div as-foo />
. - You can now get the source keypath and Ractive instance for a link/mapping using
ractive.readLink( 'some.keypath' )
. - You can now use non-tagged template strings in your templates, and they will be replaced with the appropriate expression during parsing.
- Setting a component name to a falsey value when creating or extending a Ractive instance will block use of that component e.g.
Ractive.extend({ components: { Foo: false } })
will causeFoo
to be treated as an element. - The object passed to transition functions now has an
isOutro
property, which you can use to detectractive.transition
, whereint.isIntro
andt.isOutro
will both befalse
. - Text nodes and interpolators will now use
splitText
for progressive enhancement, which should reduce or eliminate any flash during initial enhanced rendering. - Triples now support progressive enhancement, mostly using
outerHTML
to compare the target nodes to what should be rendered. - The
css
option for components can now specify an element or selector, and thetextContent
of the element will supply the value. - You can specify
{ force: true }
toractive.update
to force the target keypath to update event if internal checks determine that the value has not changed. This is useful for causing re-evaluation of all references to a function.
-
v0.8.14 Changes
2017-05-23
- 🐛 Bug fixes
- Bound functions always use
Function.prototype.bind
in case the function has an overriddenbind
(#2915) - The same handler can now be safely added and removed from an event while the event is firing (#2922)
- Linking will now fully invalidate any downstream keypaths (#2924)
- Name-bound radio button groups will now shuffle correctly (#2939)
getNodeInfo
objects linked to a shuffled fragment have their keypaths updated correctly (#2941)- Bound attributes now use an appropriate stringified value when updating their element attribute (#2944)
- Class directives now work correctly with SVG elements (#2955)
- Selects that are not dirty will no longer update erroneously and subsequently reset their value (#2965)
- Bound functions always use
- 🐛 Bug fixes
-
v0.8.13 Changes
2017-03-16
🚀 Same as 0.8.14, but automated deployment had some issues.
-
v0.8.12 Changes
2017-03-16
- 🐛 Bug fixes
- Read-only computed properties in components will no longer try to initialize from mappings (#2888)
- A number of memory leaks have been plugged thanks to @giovannipiller (#2899)
- Class directives will now try to maintain original ordering for things that use order-sensitive selectors (#2903)
- 🐛 Bug fixes