Skip to content

Releases: vecnatechnologies/backbone-torso

v0.6.5

29 Mar 14:04
Compare
Choose a tag to compare
  • #233 - fixing possible inf recursion in FormModel.__updateCache(). (ffe4b1f)

v0.6.4

25 Mar 16:48
Compare
Choose a tag to compare

#232 Fixed bug in FormModel when this.__currentMappings is set to an array instead of an object.

v0.6.3

18 Mar 18:47
Compare
Choose a tag to compare

Fixing issues with test cases, non-existent method __pullFromAlias, removed the ListView's empty override of prepare and offered a resetModelListeners on FormView

v0.6.2

17 Mar 16:28
Compare
Choose a tag to compare

Cache fetching now sends the ids as follows:

For a 'GET'
your/path/ids?ids=1,2,3,4,5
and if empty:
your/path/ids?

For a 'POST'
[1,2,3,4,5]
and if empty:
[]

v0.6.1

15 Mar 00:55
Compare
Choose a tag to compare

Removing docs/js from npm publish

v0.6.0

15 Mar 00:49
Compare
Choose a tag to compare

Renamed collectionRequesterMixin to cacheMixin
Renamed cellPersistenceRemovalMixin to cellMixin
Renamed collectionLoadingMixin to loadingMixin

Moved mixins into /modules/mixins

In cacheMixin.js:
trackAndFetch replaced fetchByIds
trackAndPull replaced pullByIds
fetchByIds replaced fetchSubsetOfTrackedIds
Stopped Stringify'ing the data passed in fetchByIds
default fetchHttpAction was changed from 'POST' to 'GET'

In View.js:
updateDOM replaced __updateDOM
Fixed carret hotswap errors in ie

In FormModel.js:
mapping replaced defaultMapping and was updated to use model aliases instead of using model instances.
isTrackingAnyObjectModel replaced isTrackingObjectModel
Methods: getMapping, getMappings, setMapping, setMappings, unsetMapping, unsetMappings, were added to help get/set/unset how a form model maps to object models. Read more about mappings here: https://tonicdev.com/kentmw/torso-form-model
Methods: getTrackedModel, getTrackedModels, setTrackedModel, setTrackedModels, unsetTrackedModel, and unsetTrackedModels were added to help get/set/unset the model instances that are associated with the mappings.
Method: resetUpdating was added to as a convenience to stop and start updating with new mapping/models.
Many private methods were added

v0.4.5

10 Mar 16:30
Compare
Choose a tag to compare

Built bundle and re-release of v0.4.4

v0.4.4

10 Mar 16:29
Compare
Choose a tag to compare

Patch release containing fixes for IE:

v0.5.0

19 Feb 15:58
Compare
Choose a tag to compare

A number of breaking changes and API updates were introduced with v0.5.0, all of which occured in View.js

Breaking Changes:

  1. render method should no longer be overridden. If you are attaching child views, move that logic into a method named attachTrackedViews. If you were doing custom logic in your render method, consider moving it into prerender that happens before the render logic, or into postrender that happens after all the rendering is complete.
  2. unplug and plug were renamed to prerender and postrender respectively and are always called by render
  3. attach method was renamed to attachTo
  4. injectView was removed. Use attachView which now takes an injection site name string or an element as the first parameter. This totally encompased the usefulness of injectView so it was removed.
  5. invokeAttached and invokeDetached were made private: __invokeAttached and __invokeDetached
  6. activateTrackedViews and deactivateTrackedViews were made private: __activateTrackedViews and __deactivateTrackedViews
  7. #197 - All public "child" view methods were removed. This includes: attachChildView, hasChildViews, getChildViews, getChildView, disposeChildViews, deactivateChildViews, detachChildViews, activateChildViews, registerChildView, unregisterChildView, unregisterChildViews.

Now, you can use "Tracked" versions of these methods: hasTrackedViews, getTrackedViews, etc.

Exceptions are: disposeChildViews which went private: __disposeChildViews, attachChildView is instead attachView without "tracked", and as mentioned in bullet 6, activateTrackedViews and deactivateTrackedViews were made private.

Calling these methods without passing in an argument, will perform the method on all tracked views (shared and child). You can pass in {shared: true} or {child: true} to limit the trypes of tracked views the method uses.

Render Updates:

  1. render method provides a prerender and postrender callback hooks that are invoked before and after the render process, respectively.
  2. render triggers events throughout the rendering process. These include:
    render:begin - which happens before the process starts, render:before-dom-update - which happens after prerender callback but before the DOM is updated, render:after-dom-update - which happens after the dom was updated but before delegation of events, render:after-delegate-events - which happens after delegate events but before the tracked views are attached or postrender callback, and finally render:complete - which happens after the process is complete.
  3. render invokes attachTrackedViews callback that developers can override to provide the logic of attaching tracked views into injection sites.
  4. attachTo no longer calls render then replaces itself with the injection site, calls delegateEvents and finally handles attach logic. Instead it sets up a "pending attach" and invokes a single re-render. During the render process, the view will replace itself with the pending injection site after the DOM is updated but before the delegation of events. Then after the render is completed, the attach callback logic is performed. This prevents inefficiencies with the previous method and utilizes the render's control of dom, events, lifecycles, and child views.

Transitions

Transitions were added with v0.5.0. The updates allow developers to specify a transitionOut and a transitionIn for a View and use these methods to augment the attach/detach process.

  1. transitionIn is a method you can specify on a View. This method takes in as arguments: attach, done, and options. Invoke the attach callback argument to add your view to the DOM during your transition in process. When the transition is complete, invoke the done argument callback. The options arguments contain information about the transition, the view being transitioned out, and the parent view.
  2. transitionOut is a method you can specify on a View. This method takes in as arguments: done, and options. Invoke the this.detach() to remove your view from the DOM during your transition out process. When the transition is complete, invoke the done argument callback. The options arguments contain information about the transition, the view being transitioned out, and the parent view.
  3. attachView now takes in a useTransition field in the options argument. If this is set to true, the view being attached will instead be transitioned in using its transitionIn method. Any view that is already in the injection site that matches the one you are attaching to will be transitioned out using its transitionOut. If the view being attached was the view in that injection site before (as happens during back-to-back renders), then the view is attached normally and no transitions are used.
  4. attachView now returns a promise that resolves when the view being attached is fully attached.
  5. You can return a promise or a list of promises when defining attachTrackedViews that resolve when the process of attaching your tracked views complete. Typically, this means capturing the promises returned by attachView during transitions and returning them.
  6. render now returns a promise that resolves when attachTrackedViews promise(s) resolves.

v0.4.3

04 Feb 19:24
Compare
Choose a tag to compare

Fixes bugs:
#124 - No way to fetch subset of models from collection
#126 - collection.registerIds should push existing models previously fetched to requester collections
#185 - Error when initializing Form View