{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/24285358","id":24285358,"diff_hunk":"@@ -1003,6 +1004,7 @@ Application.reopenClass({\n \n     registry.injection('view', 'renderer', 'renderer:-dom');\n     registry.register('view:select', SelectView);\n+    registry.register('view:outlet', OutletView);","path":"packages/ember-application/lib/system/application.js","position":12,"original_position":12,"commit_id":"faa74bb8802e22c88738948d2168992b6ff2cd3c","original_commit_id":"3552ba564289f82ccb5a5ebc97574b61dff3dae0","user":{"login":"ef4","id":319282,"avatar_url":"https://avatars.githubusercontent.com/u/319282?v=3","gravatar_id":"","url":"https://api.github.com/users/ef4","html_url":"https://github.com/ef4","followers_url":"https://api.github.com/users/ef4/followers","following_url":"https://api.github.com/users/ef4/following{/other_user}","gists_url":"https://api.github.com/users/ef4/gists{/gist_id}","starred_url":"https://api.github.com/users/ef4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef4/subscriptions","organizations_url":"https://api.github.com/users/ef4/orgs","repos_url":"https://api.github.com/users/ef4/repos","events_url":"https://api.github.com/users/ef4/events{/privacy}","received_events_url":"https://api.github.com/users/ef4/received_events","type":"User","site_admin":false},"body":"Nah, that's fine, I will add the dash.","created_at":"2015-02-07T01:56:02Z","updated_at":"2015-02-07T01:56:02Z","html_url":"https://github.com/emberjs/ember.js/pull/10372#discussion_r24285358","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10372","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/24285358"},"html":{"href":"https://github.com/emberjs/ember.js/pull/10372#discussion_r24285358"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10372"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/10372","id":28845499,"html_url":"https://github.com/emberjs/ember.js/pull/10372","diff_url":"https://github.com/emberjs/ember.js/pull/10372.diff","patch_url":"https://github.com/emberjs/ember.js/pull/10372.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10372","number":10372,"state":"open","locked":false,"title":"[BUGFIX canary] Decouple route transition from view creation","user":{"login":"ef4","id":319282,"avatar_url":"https://avatars.githubusercontent.com/u/319282?v=3","gravatar_id":"","url":"https://api.github.com/users/ef4","html_url":"https://github.com/ef4","followers_url":"https://api.github.com/users/ef4/followers","following_url":"https://api.github.com/users/ef4/following{/other_user}","gists_url":"https://api.github.com/users/ef4/gists{/gist_id}","starred_url":"https://api.github.com/users/ef4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef4/subscriptions","organizations_url":"https://api.github.com/users/ef4/orgs","repos_url":"https://api.github.com/users/ef4/repos","events_url":"https://api.github.com/users/ef4/events{/privacy}","received_events_url":"https://api.github.com/users/ef4/received_events","type":"User","site_admin":false},"body":"This closes #9814 and #10304, which are examples of a class of problems caused by\r\nthe way the router synchronously reaches into the view hierarchy to set\r\noutlet state. It is a significant refactor of the way the router\r\ncommunicates state to outlets.\r\n\r\nWhat motivates this change?\r\n\r\n - Simple examples like `{{#if something}}{{outlet}}{{/if}}` are\r\n   incorrect under the current model.\r\n\r\n - Richer examples like block-helpers to enable animation also\r\n   suffer. In general, the router cannot know when and whether a\r\n   particular outlet is going to exist, and it shouldn't need to know.\r\n\r\n - The router maintains a bunch of view-related state that is actually\r\n   redundant with the view hierarchy itself, leading to unnecessary\r\n   complexity.\r\n\r\n - This eliminates the longstanding weirdness & confusion caused by the\r\n   fact that we used to create new `View` instances and then throw them\r\n   away if they looked similar enough to ones that were already\r\n   rendered. That functionality is now covered by state diffing in the\r\n   `OutletView`.\r\n\r\n - We reduce the API surface area between router and view layer in a way\r\n   that should make it easier to experiment with swapping in compatible\r\n   implementations of either.\r\n\r\n - As a bonus, this changes makes outlets work in an observer-free way\r\n   that will make them easy to integrate with upcoming planned view\r\n   layer optimizations.\r\n\r\nHow does this work?\r\n\r\n - Rather than directly building and linking views, the router builds up\r\n   an abstract summary of the render decisions that have been made by\r\n   the current routes.\r\n\r\n - This state is cheap to recalculate as needed. It doesn't do any view\r\n   creation. To avoid expensive observer creation & teardown, we just\r\n   recreate the whole thing and use a `setState`-like mechanism to\r\n   propagate the changes through the outlet hierarchy. This gives us\r\n   optimal granularity of updates.\r\n\r\n - Actual view instantiation moves into the OutletView -- within the\r\n   view layer where it belongs. Each outlet does a diff to see whether\r\n   it should rerender itself or propagate inner changes down to its\r\n   child outlets.\r\n\r\n - To bootstrap rendering, the router creates a single top-level outlet,\r\n   after which all view creation is internal to the view layer.\r\n\r\nDoes this break any existing semantics?\r\n\r\n - No, as far as I can tell.\r\n\r\nCould this get even better if we decided to deprecate some old\r\nsemantics?\r\n\r\n - Yes. It would be better if users` `renderTemplate` implementations on\r\n   `Route`s were required to be idempotent. Then we could eliminate a\r\n   bunch of the remaining state from them.\r\n\r\n - Similarly, we should consider forbiding calling `render` and \r\n   `disconnectOutlet` at arbitrary times that are outside the scope of \r\n   `renderTemplate`. It makes the programming model harder to reason\r\n   about.\r\n\r\n - Also, when we deprecate the `render` helper we can eliminate the\r\n   remaining use of `_activeViews` state tracking on the router. That is\r\n   the only remaining use for it.","created_at":"2015-02-06T21:56:47Z","updated_at":"2015-02-07T01:56:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d88bf00ca6b6f7e56787f47a03755a08e668f949","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10372/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10372/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10372/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/faa74bb8802e22c88738948d2168992b6ff2cd3c","head":{"label":"ef4:decouple-outlet","ref":"decouple-outlet","sha":"faa74bb8802e22c88738948d2168992b6ff2cd3c","user":{"login":"ef4","id":319282,"avatar_url":"https://avatars.githubusercontent.com/u/319282?v=3","gravatar_id":"","url":"https://api.github.com/users/ef4","html_url":"https://github.com/ef4","followers_url":"https://api.github.com/users/ef4/followers","following_url":"https://api.github.com/users/ef4/following{/other_user}","gists_url":"https://api.github.com/users/ef4/gists{/gist_id}","starred_url":"https://api.github.com/users/ef4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef4/subscriptions","organizations_url":"https://api.github.com/users/ef4/orgs","repos_url":"https://api.github.com/users/ef4/repos","events_url":"https://api.github.com/users/ef4/events{/privacy}","received_events_url":"https://api.github.com/users/ef4/received_events","type":"User","site_admin":false},"repo":{"id":1992464,"name":"ember.js","full_name":"ef4/ember.js","owner":{"login":"ef4","id":319282,"avatar_url":"https://avatars.githubusercontent.com/u/319282?v=3","gravatar_id":"","url":"https://api.github.com/users/ef4","html_url":"https://github.com/ef4","followers_url":"https://api.github.com/users/ef4/followers","following_url":"https://api.github.com/users/ef4/following{/other_user}","gists_url":"https://api.github.com/users/ef4/gists{/gist_id}","starred_url":"https://api.github.com/users/ef4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef4/subscriptions","organizations_url":"https://api.github.com/users/ef4/orgs","repos_url":"https://api.github.com/users/ef4/repos","events_url":"https://api.github.com/users/ef4/events{/privacy}","received_events_url":"https://api.github.com/users/ef4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ef4/ember.js","description":"","fork":true,"url":"https://api.github.com/repos/ef4/ember.js","forks_url":"https://api.github.com/repos/ef4/ember.js/forks","keys_url":"https://api.github.com/repos/ef4/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ef4/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ef4/ember.js/teams","hooks_url":"https://api.github.com/repos/ef4/ember.js/hooks","issue_events_url":"https://api.github.com/repos/ef4/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/ef4/ember.js/events","assignees_url":"https://api.github.com/repos/ef4/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/ef4/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/ef4/ember.js/tags","blobs_url":"https://api.github.com/repos/ef4/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ef4/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ef4/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ef4/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ef4/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/ef4/ember.js/languages","stargazers_url":"https://api.github.com/repos/ef4/ember.js/stargazers","contributors_url":"https://api.github.com/repos/ef4/ember.js/contributors","subscribers_url":"https://api.github.com/repos/ef4/ember.js/subscribers","subscription_url":"https://api.github.com/repos/ef4/ember.js/subscription","commits_url":"https://api.github.com/repos/ef4/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ef4/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ef4/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ef4/ember.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/ef4/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/ef4/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ef4/ember.js/merges","archive_url":"https://api.github.com/repos/ef4/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ef4/ember.js/downloads","issues_url":"https://api.github.com/repos/ef4/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/ef4/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/ef4/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/ef4/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ef4/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/ef4/ember.js/releases{/id}","created_at":"2011-07-03T20:35:47Z","updated_at":"2015-02-04T17:08:27Z","pushed_at":"2015-02-06T22:48:24Z","git_url":"git://github.com/ef4/ember.js.git","ssh_url":"git@github.com:ef4/ember.js.git","clone_url":"https://github.com/ef4/ember.js.git","svn_url":"https://github.com/ef4/ember.js","homepage":"","size":22026,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"emberjs:master","ref":"master","sha":"c68812cf74f96643c635fd5e3c722f67ec4b50e1","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","created_at":"2011-05-25T23:39:40Z","updated_at":"2015-02-07T01:36:44Z","pushed_at":"2015-02-07T01:36:44Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":68020,"stargazers_count":12641,"watchers_count":12641,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2718,"mirror_url":null,"open_issues_count":258,"forks":2718,"open_issues":258,"watchers":12641,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10372"},"html":{"href":"https://github.com/emberjs/ember.js/pull/10372"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/10372"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/10372/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10372/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10372/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/faa74bb8802e22c88738948d2168992b6ff2cd3c"}}}}