Releases: gmac/backbone.epoxy
itemView, fixes, whitespace
First, apologies for the massive change in whitespace. It's a band-aid that has needed to be pulled, and I hope the new spacing will improve legibility and eliminate inconsistent indentations. Release features and fixes:
- Adds "itemView" binding option for parameterizing collection bindings.
- Fixes bug with undefined
collectionView
reference (thanks @adamsea). - Prevents race condition between
reset()
and in-flight events (thanks @disruptek). - Changed whitespace from tabs to spaces.
- Refactored docs into Middleman app.
Support for one collection with many views
Refactoring the collection
binding view item constructor reference to look to the bound view rather than the bound collection. A bound collection no longer specifies any view relationship (the collection view property has been deprecated). The bound view should specify an itemView property with a view constructor for collection items. The legacy API will continue working in this release, but may be officially deprecated in the future.
Thanks @sdemjanenko for pressing this glaring backwards relationship until it was fixed!
New baseline
This release addresses some long-outstanding tickets that required significant refactors to the Epoxy internals. Addressed in version 1.1.0:
- Corrected the timing of "change" events while setting computed attributes.
- Exposed Epoxy component super class references as a customizable property.
Adding binding validation errors.
Epoxy now throws errors when it encounters a binding declaration that it does not recognize. This means you'll get an error if you misspell a handler declaration. Unknown declarations were previously ignored so that non-handler parameters (events
, optionsDefault
, etc) would pass through the binding process.
Non-handler binding declarations are now validated by the Epoxy.binding.allowedParams
object. If you plan to use custom non-handler binding declarations, then you must specifically add the non-handler attribute names to the allowedParams
object in order to avoid errors.
Bug fixes
- Collection binding sorts/resets using document fragment optimization rather than hide/show.
- Date objects may pass through context accessors; thanks @monkeybrother.
- Fixed value setting inconsistencies within the options binding; thanks @sdemjanenko.
- Fixed Closure Compiler optimization glitch; thanks @rubenstolk;
- Fixed Browserify dependency loading issues; thanks @adamscybot.
- Improved strict mode compliance; thanks @rwaldin.
- New documentation examples; thanks @rubenstolk.
Bug fixes and workflow enhancements
- Fixed issue with computed view setter rejecting falsey values (thanks @jpurcell001 & @bbn).
- Fixed issue with differentiating "sort" and "reset" collection binding events (thanks @nfm).
- Fixed issue with computed models triggering anonymous events (thanks @markerikson & @nfm).
- Fixed issue with computed model change event firing order.
- Added custom
:el
psuedo-selector for binding to view container element (thanks @markerikson). - Added
emptyCache
method to theEpoxy.bindings
API for management of internals. - Revised documentation on new features.
Bug fix to 'collection' binding
v1.0.1 Bug fix to collection binding.
Version 1.0
Two-way filtering, set/save options, cleanup.
- Final implementation and docs on two-way binding filters.
- Adds
setterOptions
property to be passed into bound setters. - Adds
{save: true}
option for writing to model via.save()
. - Small codebase optimizations, cleanup, and bug fixes.
Bug fixes and optimization
Bug fixes and performance optimizations.
- Bug fix to
Epoxy.View.remove()
implementation (thanks @pixelbreaker). - Adds binding support for HTML
contenteditable="true"
elements (thanks @leovarg67). - Adds bindings parser caching for improved performance (thanks @dspangen).
- Adds compatibility with Zepto.
- Additional error hooks/messaging for improved debugging.
- Small codebase optimizations and bug fixes.
Workflow enhancements
Major reorganization of core features to improve workflow patterns.
- Removes
observableDefaults
andaddObservable
APIs. - Renames former "observable" model methods to
hasComputed
,removeComputed
, andclearComputeds
. - Adds
viewModel
property to view as sanctioned store for view-specific data. - Adds
computeds
hash table to view for defining computed view properties. - Adds static
mixin
APIs for applying Epoxy configuration to other base classes. - Adds dependency injection to computed getters defining a
deps
array. - Adds two-way data exchange to binding filters, and adds
integer
,decimal
, andcsv
filters. - Configures class constructors to pull configuration out of passed options.
- Revised documentation.