Permalink
Browse files

v3.1 docs (#3230)

* Fix a docs linter error

* Document childViewEventPrefix: false

Also fix a couple of related link errors

* Document region destruction upon removal

* v3.1 changelog
  • Loading branch information...
1 parent 40b146e commit 22d1554f02a279e204330100069925586af53b45 @paulfalgout paulfalgout committed with ahumphreys87 Oct 12, 2016
Showing with 38 additions and 6 deletions.
  1. +25 −0 changelog.md
  2. +7 −2 docs/events.md
  3. +2 −2 docs/marionette.application.md
  4. +4 −2 docs/marionette.region.md
View
@@ -1,3 +1,28 @@
+### v3.1.0 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v3.0.0...v3.1.0)
+
+#### General
+* Performance optimizations for `triggerMethod`, `mergeOptions` and other internal event handlers
+* Significant render and removal optimizations for CollectionView utilizing Backbone's `update` event
+
+#### Features
+* `Region.detachView` and `View.detachChildView` were added for removing a view from a region without destroying it. This is preferred to the now deprecated `preventDestroy` region show/empty option
+* `childViewEventPrefix: false` will disable auto-proxying of child events to the parent view
+* `Application` will now accept a region definition object literal as an instantiation option
+* Regions are now destroyed when removed from a View
+
+#### Fixes
+* Fixed an issue with Lodash 4 compatibility related to behavior events
+
+#### Deprecations
+* Region `empty`'s `preventDestroy` option was deprecated in favor of `detachView`
+* A region definition object literal's `selector` key was deprecated due to redundacy in favor of the existing key `el`
+
+#### Misc
+* Many documentation fixes for v3
+* Removed shouldReplace logic from `attachHtml` so overriding no longer breaks `replaceElement` functionality
+* Exposed `View.normalizeUIString` for external libraries
+* Improvements were made for Views initialized with existing DOM elements
+
### v3.0.0
Version 3.0.0 of Marionette has arrived and contains many improvements over version
View
@@ -232,7 +232,9 @@ methods bound to the `childViewEvents` attribute. This works for built-in
events, custom events fired with `triggerMethod` and bound events using
`triggers`.
-When using implicit listeners, the [`childview:*` event prefix](#childvieweventprefix) is used which
+**Note**: Automatic event bubbling can be disabled by setting [`childViewEventPrefix`](#a-child-views-event-prefix) to `false`.
+
+When using implicit listeners, the [`childview:*` event prefix](#a-child-views-event-prefix) is used which
needs to be included as part of the handler:
```javascript
@@ -301,7 +303,10 @@ Just like with the `View` and its regions, the event handler will receive the
You can customize the event prefix for events that are forwarded
through the view. To do this, set the `childViewEventPrefix`
on the view or collectionview. For more information on the `childViewEventPrefix` see
-[Event bubbling](#childview-event-bubbling-from-child-views)
+[Event bubbling](#event-bubbling).
+
+The default value for `childViewEventPrefix` is `childview`. Setting this property to
+`false` will disable [automatic event bubbling](#event-bubbling).
```javascript
var Bb = require('backbone');
@@ -133,7 +133,7 @@ var App = Mn.Application.extend({
},
onBeforeStart: function() {
- this.model = new MyModel(this.options.data);
+ this.model = new MyModel(this.options.data);
},
onStart: function() {
@@ -168,7 +168,7 @@ var App = Mn.Application.extend({
},
onBeforeStart: function(app, options) {
- this.model = new MyModel(options.data);
+ this.model = new MyModel(options.data);
},
onStart: function(app, options) {
@@ -180,7 +180,7 @@ myView.addRegions({
### Removing Regions
-You can remove all of the regions from a view by calling `removeRegions` or you can remove a region by name using `removeRegion`.
+You can remove all of the regions from a view by calling `removeRegions` or you can remove a region by name using `removeRegion`. When a region is removed the region will be destroyed.
```javascript
var Mn = require('backbone.marionette');
@@ -196,7 +196,9 @@ var MyView = Mn.View.extend({
var myView = new MyView();
// remove only the main region
-myView.removeRegion('main');
+var mainRegion = myView.removeRegion('main');
+
+mainRegion.isDestroyed(); // -> true
// remove all regions
myView.removeRegions();

0 comments on commit 22d1554

Please sign in to comment.