Update dependency backbone.marionette to v4
This MR contains the following updates:
- unbindRequests now passes context.
- unbindRequests now passes context.
- Error in the build's version number.
- Error in the build
CollectionView#addChildViewnow accepts a
- Marionette now uses
el.ownerDocument.documentElement;by default instead of
document.documentElementfor querying, customizable via
- The UMD build now reinstates
noConflictfor using multiple versions on the global scope.
- Fixed a case where a child view could potentially get multiple
- Pre-rendered views from outside of a region will now correctly empty an current view in a region if shown.
emptyViewwill now respect the
- Updated backbone dependency to allow for 1.4 without a warning.
- Tooling and testing was updated and improved removing gulp.
Region._setElementwas added for internal use, but may be made public in a future release.
The breaking changes are documented in the upgrade guide.
CollectionViewcan now render a template in the same fashion of the removed
View#triggersnow passes the originating DOM event object as the final argument of the triggered Mn event.
- View classes now have the
- The ES6 package was exposed in
- The underscore dependency was updated to include 1.8.3 - 1.9.x.
The documentation structure was overhauled to provide a flow to reading through the docs.
Viewentity events set in
initializewere being undelegated if
filterevent now returns the attaching and detached views.
unbindRequestscan now be called without handlers to remove all handlers from an entity.
- If an event handler on a behavior was undefined it would remove any prior defined handler.
- When a behavior is destroyed it will now undelegate the behavior events and triggers.
- When a view was added a performance check on
NextCollectionViewwould sometimes prevent existing views from sorting correctly.
viewFilterwill now be called with the same arguments with underscore or lodash.
- Multiple handlers for a single event. If needed, use a single handler to call multiple methods.
- Prevent exception when a view is instantiated with a non-existing selector
- When a collection defines the
NextCollectionViewsort order, the add at end performance improvement was removed to prevent edge case errors.
NextCollectionViewno longer sorts according to the collection if
sortWithCollectionis set to false.
- When views added to
NextCollectionViewfrom a collection don't have a matching model, removing the model no longer throws an error.
NextCollectionViewnow uses backbone update flags instead of calculating changes for sorting
NextCollectionViewcollection single model remove no longer incorrectly removes all children
EmptyViewwill correctly display if a
NextCollectionViewis rendered in
- Regions will now ensure there is only one node in its
- Regions will not query outside of the parent view if the selector is not found in its context
setRendererclass methods now correctly return the prototype when called
- Options passed to a behavior are now correctly passed to the behavior
- The ES6 module is no longer exposed in
package.jsonas this was breaking for some builds
detachContentswill now correctly detach when using
monitorViewEvents: falseon a
- A new build of Marionette supporting ES6 modules was added
- Added DOM API to encapsulate DOM interactions in the views and region
monitorViewEventswas added as an option to all Views to disable DOM lifecycle events
viewComparator: falseoption to
NextCollectionViewfor disabling the default sort
Experimental API Breaking Changes
- DOM Mixin was removed (replaced with DOM API)
attachHtmlno longer receives the view as the first argument
- A region's currentView will now be set during that view's initial
- A view will now be considered rendered if its
elhas contents and not only if it has an
Backbone.Radiois still a dependency, it will no longer cause Marionette to error if nonexistent
- Various performance improvements
defaultsdeprecation notice was always triggering
- Regions threw an error if a childview destroy resulted in a parent view destroy
Regionto better support animation
NextCollectionViewadded as a potential replacement for
- Added view
initializeevent to behaviors
getRegionwill now render the region's view if it is currently not rendered
- If a
regionis destroyed it will now be removed from the view
onDomRemoveevent for better clean up of things added in
childViewEventPrefixfeature flag to allow for
- Support custom renderers per view prototype
detachevents when restoring el
template: falsedeprecated in favor of
defaultsdeprecated in favor of setting
optionson the Behavior definition
Marionette.Rendererin favor of new custom view renderer.
- Update babel and build tools
- Fix tests runner for IE11
- Separate Mn DOM interaction into a mixin for DOM plugin ease
- Allow showing a template or static string in a region
- Feature/trigger method event args
CollectionView.viewComparatorno longer sorts
CollectionViewre-indexes correctly when removing views.
CollectionView.filtercan filter by
Regionwill no longer detach pre-existing HTML when
View's el is already in the region
Regionclean up when
- Performance optimizations for
mergeOptionsand other internal event handlers
- Significant render and removal optimizations for CollectionView utilizing Backbone's
View.detachChildViewwere added for removing a view from a region without destroying it. This is preferred to the now deprecated
preventDestroyregion show/empty option
childViewEventPrefix: falsewill disable auto-proxying of child events to the parent view
Applicationwill now accept a region definition object literal as an instantiation option
- Regions are now destroyed when removed from a View
- Fixed an issue with Lodash 4 compatibility related to behavior events
preventDestroyoption was deprecated in favor of
- A region definition object literal's
selectorkey was deprecated due to redundacy in favor of the existing key
- Many documentation fixes for v3
- Removed shouldReplace logic from
attachHtmlso overriding no longer breaks
View.normalizeUIStringfor external libraries
- Improvements were made for Views initialized with existing DOM elements
- If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.