{"action":"created","issue":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/3244","repository_url":"https://api.github.com/repos/marionettejs/backbone.marionette","labels_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/3244/labels{/name}","comments_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/3244/comments","events_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/3244/events","html_url":"https://github.com/marionettejs/backbone.marionette/pull/3244","id":185864918,"number":3244,"title":"New CollectionView","user":{"login":"paulfalgout","id":2028470,"avatar_url":"https://avatars.githubusercontent.com/u/2028470?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfalgout","html_url":"https://github.com/paulfalgout","followers_url":"https://api.github.com/users/paulfalgout/followers","following_url":"https://api.github.com/users/paulfalgout/following{/other_user}","gists_url":"https://api.github.com/users/paulfalgout/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfalgout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfalgout/subscriptions","organizations_url":"https://api.github.com/users/paulfalgout/orgs","repos_url":"https://api.github.com/users/paulfalgout/repos","events_url":"https://api.github.com/users/paulfalgout/events{/privacy}","received_events_url":"https://api.github.com/users/paulfalgout/received_events","type":"User","site_admin":false},"labels":[{"id":89702361,"url":"https://api.github.com/repos/marionettejs/backbone.marionette/labels/enhancement","name":"enhancement","color":"bfd4f2","default":true},{"id":109541835,"url":"https://api.github.com/repos/marionettejs/backbone.marionette/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"paulfalgout","id":2028470,"avatar_url":"https://avatars.githubusercontent.com/u/2028470?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfalgout","html_url":"https://github.com/paulfalgout","followers_url":"https://api.github.com/users/paulfalgout/followers","following_url":"https://api.github.com/users/paulfalgout/following{/other_user}","gists_url":"https://api.github.com/users/paulfalgout/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfalgout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfalgout/subscriptions","organizations_url":"https://api.github.com/users/paulfalgout/orgs","repos_url":"https://api.github.com/users/paulfalgout/repos","events_url":"https://api.github.com/users/paulfalgout/events{/privacy}","received_events_url":"https://api.github.com/users/paulfalgout/received_events","type":"User","site_admin":false},"assignees":[{"login":"paulfalgout","id":2028470,"avatar_url":"https://avatars.githubusercontent.com/u/2028470?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfalgout","html_url":"https://github.com/paulfalgout","followers_url":"https://api.github.com/users/paulfalgout/followers","following_url":"https://api.github.com/users/paulfalgout/following{/other_user}","gists_url":"https://api.github.com/users/paulfalgout/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfalgout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfalgout/subscriptions","organizations_url":"https://api.github.com/users/paulfalgout/orgs","repos_url":"https://api.github.com/users/paulfalgout/repos","events_url":"https://api.github.com/users/paulfalgout/events{/privacy}","received_events_url":"https://api.github.com/users/paulfalgout/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/milestones/26","html_url":"https://github.com/marionettejs/backbone.marionette/milestones/v3.x","labels_url":"https://api.github.com/repos/marionettejs/backbone.marionette/milestones/26/labels","id":817886,"number":26,"title":"v3.x","description":null,"creator":{"login":"jmeas","id":2322305,"avatar_url":"https://avatars.githubusercontent.com/u/2322305?v=3","gravatar_id":"","url":"https://api.github.com/users/jmeas","html_url":"https://github.com/jmeas","followers_url":"https://api.github.com/users/jmeas/followers","following_url":"https://api.github.com/users/jmeas/following{/other_user}","gists_url":"https://api.github.com/users/jmeas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmeas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmeas/subscriptions","organizations_url":"https://api.github.com/users/jmeas/orgs","repos_url":"https://api.github.com/users/jmeas/repos","events_url":"https://api.github.com/users/jmeas/events{/privacy}","received_events_url":"https://api.github.com/users/jmeas/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":62,"state":"open","created_at":"2014-10-08T04:44:25Z","updated_at":"2016-10-29T06:10:30Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-10-28T08:19:17Z","updated_at":"2016-10-31T07:41:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/pulls/3244","html_url":"https://github.com/marionettejs/backbone.marionette/pull/3244","diff_url":"https://github.com/marionettejs/backbone.marionette/pull/3244.diff","patch_url":"https://github.com/marionettejs/backbone.marionette/pull/3244.patch"},"body":"This is an **experimental** rebuild of `CollectionView`. I believe it could be released along-side the current CollectionView, and then replace the current `CollectionView` for `v4` or `v5`.  This was inspired by all of @rafde's improvements around the collection `update` event and looking into [filtering views leaving children alone](https://github.com/marionettejs/backbone.marionette/pull/3216).  I was also interested in attempting to provide a clean/efficient way of keeping the current API.  While I'm not against filter and sorting at the collection, I do find that having both options available is useful.  They function quite differently and performance for some instances can be improved in the view.\r\n\r\nThis new CollectionView attempts to keep or improve upon the existing API without removing much, however there are a few breaking changes and modified behaviors.\r\n\r\nI certainly need to do documentation and tests.\r\n\r\nI've bastardized a perf test from @rafde using the new lib https://jsfiddle.net/marionettejs/x020k0a5/ \r\n\r\nIn my initial testing of various CollectionView features, this new version is _much_ faster.  I think it is faster in every case, but additional tests are needed.  The biggest win comes from adding/removing to an already rendered collection.\r\n\r\n![nextcollectionview](https://cloud.githubusercontent.com/assets/2028470/19798056/c203bbde-9d29-11e6-8b16-c5bf2f2ef24b.png)\r\n---\r\n\r\n**CollectionView Breaking Changes**\r\n\r\n_There are probably more, but I tried to keep notes as I went along_\r\n- filtering no longer changes `children`, it merely detaches filtered-out views. https://github.com/marionettejs/backbone.marionette/pull/3216\r\n- `childViewOptions` no longer gets `index` as an argument but this was unstable anyways.\r\n- there is no `attachBuffer` only `attachHtml` (which is essentially what `attachBuffer` was)\r\n- when a childView is destroyed it is removed from children (I think a better solution than https://github.com/marionettejs/backbone.marionette/pull/3226 but equally as weird)\r\n- ~~`add:child` and `remove:child` were removed - now that almost everything is in bulk these events don't really work.  Plus their original purpose is nearly redundant to `onChildViewRender` or `onChildViewDestroy` I do think a version of these could be added back-in, but it wouldn't really work with filtering. Perhaps what would be better is to look into https://github.com/marionettejs/backbone.marionette/issues/2570~~  **Edit** after looking into this further both events make sense and #2570 is solved with simply `render:children`\r\n- `children` are now really only rendered once in the entire life of a `CollectionView`.  If you were previously relying on a `CollectionView` over-rendering a `childview`, this would be breaking.\r\n- `reorderOnSort` was removed as an option and is now the default behavior if `sortWithCollection` is true.\r\n- `viewComparator` is now passed the view instead of the model as an option.  If you want to sort by the model use `view.model` (up for changing this, but it didn't seem very straight-forward)  However this also support views added that have no model.\r\n- `children.findByIndex` is now stable\r\n- `children.add` and `children.remove` were made private (using them will totally break a collectionView currently)\r\n- `children.findByCustom` was removed since it is unusable (`children` are never added with a custom index so this hasn't been useful to anyone)\r\n- the `sort` option was renamed `sortWithCollection` as it is specifically for sorting when the collection sorts and nothing else.\r\n- `reorder` and `resortViews` were removed and now there's just a `sort` method.  Also the `reorder` events are gone and replaced with `sort` events\r\n- Like `viewComparator`, `filter` now also receives the view instead of the model.  The user can add views without models, and `filter` needs to be aware of this.\r\n- `emptyView` is no longer added to `children` so it is built different than a `childView` and doesn't affect `children.length`\r\n\r\n@marionettejs/marionette-core we should probably get many 👍 s and internal testing before considering this.\r\n\r\nI'm not 100% certain these resolves are true, but I'm betting on it.\r\n\r\nResolves https://github.com/marionettejs/backbone.marionette/issues/2723 https://github.com/marionettejs/backbone.marionette/issues/2829 https://github.com/marionettejs/backbone.marionette/issues/2863 https://github.com/marionettejs/backbone.marionette/issues/2896 https://github.com/marionettejs/backbone.marionette/issues/2156 https://github.com/marionettejs/backbone.marionette/issues/2948 https://github.com/marionettejs/backbone.marionette/issues/2966 https://github.com/marionettejs/backbone.marionette/issues/2979 https://github.com/marionettejs/backbone.marionette/issues/3043\r\nhttps://github.com/marionettejs/backbone.marionette/issues/2570\r\n\r\nMostly resolves https://github.com/marionettejs/backbone.marionette/issues/2560 (I'm less interested now in \"regionifying\" CollectionView though there are still some similarities that could be shared)\r\n"},"comment":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/comments/257230775","html_url":"https://github.com/marionettejs/backbone.marionette/pull/3244#issuecomment-257230775","issue_url":"https://api.github.com/repos/marionettejs/backbone.marionette/issues/3244","id":257230775,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T07:41:36Z","updated_at":"2016-10-31T07:41:36Z","body":"\n[![Coverage Status](https://coveralls.io/builds/8582097/badge)](https://coveralls.io/builds/8582097)\n\nCoverage decreased (-15.5%) to 84.487% when pulling **c425467520cfd7db176961dce5a680f8e553c6f4 on paulfalgout:feature/new-collection-view** into **f7865d9bceafec2f2b191fe1045b121d2f37d7b7 on marionettejs:next**.\n"}}
{"actor":{"display_login":"coveralls"}}