{"action":"created","comment":{"url":"https://api.github.com/repos/fxos/customizer/pulls/comments/25954779","id":25954779,"diff_hunk":"@@ -50,22 +48,34 @@ export default class MainController extends Controller {\n       return;\n     }\n \n-    this.view.customizer.setRootNode(document.documentElement);\n+    // Insert the customizer view into the app's document\n     document.body.appendChild(this.view.el);\n \n-    var padding = this.view.el.querySelector('fxos-customizer').offsetHeight;\n-    this._styleEl = document.createElement('style');\n-    this._styleEl.textContent = `\n-    html, body {\n-      overflow: initial !important;\n-    }\n+    // And display it. This has to be in a setTimeout or the CSS animation\n+    // won't work correctly since we just added it above.\n+    setTimeout(() => { this.view.show(); });\n+\n+    // Wait a bit before populating it and defining the new stylesheet\n+    // so that we can just get it on the screen quickly and don't interfere\n+    // with the animation\n+    setTimeout(() => {\n+      this.view.customizer.setRootNode(document.documentElement);\n+\n+      var padding = this.view.el.querySelector('fxos-customizer').offsetHeight;\n+      this._styleEl = document.createElement('style');\n+      this._styleEl.textContent = `\n+      html, body {\n+        overflow: initial !important;\n+      }\n \n-    body {\n-      padding-bottom: ${padding}px !important;\n-    }`;\n-    document.head.appendChild(this._styleEl);\n+      body {\n+        padding-bottom: ${padding}px !important;\n+      }`;\n+      document.head.appendChild(this._styleEl);\n \n-    this.attached = true;\n+      this.attached = true;\n+      this.waitToBeClosed(); // We're open, so expect a close gesture\n+    }, this.view.animationLength);","path":"app/js/controllers/main.js","position":59,"original_position":59,"commit_id":"c45636e26773f12b2193e17a8832427dfa5efa36","original_commit_id":"c45636e26773f12b2193e17a8832427dfa5efa36","user":{"login":"davidflanagan","id":516914,"avatar_url":"https://avatars.githubusercontent.com/u/516914?v=3","gravatar_id":"","url":"https://api.github.com/users/davidflanagan","html_url":"https://github.com/davidflanagan","followers_url":"https://api.github.com/users/davidflanagan/followers","following_url":"https://api.github.com/users/davidflanagan/following{/other_user}","gists_url":"https://api.github.com/users/davidflanagan/gists{/gist_id}","starred_url":"https://api.github.com/users/davidflanagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidflanagan/subscriptions","organizations_url":"https://api.github.com/users/davidflanagan/orgs","repos_url":"https://api.github.com/users/davidflanagan/repos","events_url":"https://api.github.com/users/davidflanagan/events{/privacy}","received_events_url":"https://api.github.com/users/davidflanagan/received_events","type":"User","site_admin":false},"body":"I know about transitionend but hadn't heard of animationend.  I always worry a little about using those because I don't know what happens if gecko implements some \"don't do animations for low-end hardware or for people who get motion sickness\" mode and doesn't do the animations. Do we know for sure that the event handlers will still fire?  That's why I went with setTimeout here. But I'll take a look at animationend.","created_at":"2015-03-06T16:07:04Z","updated_at":"2015-03-06T16:07:04Z","html_url":"https://github.com/fxos/customizer/pull/9#discussion_r25954779","pull_request_url":"https://api.github.com/repos/fxos/customizer/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/fxos/customizer/pulls/comments/25954779"},"html":{"href":"https://github.com/fxos/customizer/pull/9#discussion_r25954779"},"pull_request":{"href":"https://api.github.com/repos/fxos/customizer/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/fxos/customizer/pulls/9","id":30624705,"html_url":"https://github.com/fxos/customizer/pull/9","diff_url":"https://github.com/fxos/customizer/pull/9.diff","patch_url":"https://github.com/fxos/customizer/pull/9.patch","issue_url":"https://api.github.com/repos/fxos/customizer/issues/9","number":9,"state":"open","locked":false,"title":"Bug 1140095 - speed up and animate customizer opening and closing","user":{"login":"davidflanagan","id":516914,"avatar_url":"https://avatars.githubusercontent.com/u/516914?v=3","gravatar_id":"","url":"https://api.github.com/users/davidflanagan","html_url":"https://github.com/davidflanagan","followers_url":"https://api.github.com/users/davidflanagan/followers","following_url":"https://api.github.com/users/davidflanagan/following{/other_user}","gists_url":"https://api.github.com/users/davidflanagan/gists{/gist_id}","starred_url":"https://api.github.com/users/davidflanagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidflanagan/subscriptions","organizations_url":"https://api.github.com/users/davidflanagan/orgs","repos_url":"https://api.github.com/users/davidflanagan/repos","events_url":"https://api.github.com/users/davidflanagan/events{/privacy}","received_events_url":"https://api.github.com/users/davidflanagan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-06T06:56:38Z","updated_at":"2015-03-06T16:07:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c209400505c4a710b1784a7f265fd15e9701deb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fxos/customizer/pulls/9/commits","review_comments_url":"https://api.github.com/repos/fxos/customizer/pulls/9/comments","review_comment_url":"https://api.github.com/repos/fxos/customizer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fxos/customizer/issues/9/comments","statuses_url":"https://api.github.com/repos/fxos/customizer/statuses/c45636e26773f12b2193e17a8832427dfa5efa36","head":{"label":"fxos:bug1140095","ref":"bug1140095","sha":"c45636e26773f12b2193e17a8832427dfa5efa36","user":{"login":"fxos","id":10078829,"avatar_url":"https://avatars.githubusercontent.com/u/10078829?v=3","gravatar_id":"","url":"https://api.github.com/users/fxos","html_url":"https://github.com/fxos","followers_url":"https://api.github.com/users/fxos/followers","following_url":"https://api.github.com/users/fxos/following{/other_user}","gists_url":"https://api.github.com/users/fxos/gists{/gist_id}","starred_url":"https://api.github.com/users/fxos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxos/subscriptions","organizations_url":"https://api.github.com/users/fxos/orgs","repos_url":"https://api.github.com/users/fxos/repos","events_url":"https://api.github.com/users/fxos/events{/privacy}","received_events_url":"https://api.github.com/users/fxos/received_events","type":"Organization","site_admin":false},"repo":{"id":28850112,"name":"customizer","full_name":"fxos/customizer","owner":{"login":"fxos","id":10078829,"avatar_url":"https://avatars.githubusercontent.com/u/10078829?v=3","gravatar_id":"","url":"https://api.github.com/users/fxos","html_url":"https://github.com/fxos","followers_url":"https://api.github.com/users/fxos/followers","following_url":"https://api.github.com/users/fxos/following{/other_user}","gists_url":"https://api.github.com/users/fxos/gists{/gist_id}","starred_url":"https://api.github.com/users/fxos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxos/subscriptions","organizations_url":"https://api.github.com/users/fxos/orgs","repos_url":"https://api.github.com/users/fxos/repos","events_url":"https://api.github.com/users/fxos/events{/privacy}","received_events_url":"https://api.github.com/users/fxos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fxos/customizer","description":"An addon for FirefoxOS which builds customizes application interfaces.","fork":false,"url":"https://api.github.com/repos/fxos/customizer","forks_url":"https://api.github.com/repos/fxos/customizer/forks","keys_url":"https://api.github.com/repos/fxos/customizer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fxos/customizer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fxos/customizer/teams","hooks_url":"https://api.github.com/repos/fxos/customizer/hooks","issue_events_url":"https://api.github.com/repos/fxos/customizer/issues/events{/number}","events_url":"https://api.github.com/repos/fxos/customizer/events","assignees_url":"https://api.github.com/repos/fxos/customizer/assignees{/user}","branches_url":"https://api.github.com/repos/fxos/customizer/branches{/branch}","tags_url":"https://api.github.com/repos/fxos/customizer/tags","blobs_url":"https://api.github.com/repos/fxos/customizer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fxos/customizer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fxos/customizer/git/refs{/sha}","trees_url":"https://api.github.com/repos/fxos/customizer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fxos/customizer/statuses/{sha}","languages_url":"https://api.github.com/repos/fxos/customizer/languages","stargazers_url":"https://api.github.com/repos/fxos/customizer/stargazers","contributors_url":"https://api.github.com/repos/fxos/customizer/contributors","subscribers_url":"https://api.github.com/repos/fxos/customizer/subscribers","subscription_url":"https://api.github.com/repos/fxos/customizer/subscription","commits_url":"https://api.github.com/repos/fxos/customizer/commits{/sha}","git_commits_url":"https://api.github.com/repos/fxos/customizer/git/commits{/sha}","comments_url":"https://api.github.com/repos/fxos/customizer/comments{/number}","issue_comment_url":"https://api.github.com/repos/fxos/customizer/issues/comments{/number}","contents_url":"https://api.github.com/repos/fxos/customizer/contents/{+path}","compare_url":"https://api.github.com/repos/fxos/customizer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fxos/customizer/merges","archive_url":"https://api.github.com/repos/fxos/customizer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fxos/customizer/downloads","issues_url":"https://api.github.com/repos/fxos/customizer/issues{/number}","pulls_url":"https://api.github.com/repos/fxos/customizer/pulls{/number}","milestones_url":"https://api.github.com/repos/fxos/customizer/milestones{/number}","notifications_url":"https://api.github.com/repos/fxos/customizer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fxos/customizer/labels{/name}","releases_url":"https://api.github.com/repos/fxos/customizer/releases{/id}","created_at":"2015-01-06T06:29:49Z","updated_at":"2015-03-06T15:25:33Z","pushed_at":"2015-03-06T15:25:32Z","git_url":"git://github.com/fxos/customizer.git","ssh_url":"git@github.com:fxos/customizer.git","clone_url":"https://github.com/fxos/customizer.git","svn_url":"https://github.com/fxos/customizer","homepage":null,"size":1143,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"fxos:master","ref":"master","sha":"f336d6ad05826b74545a87a1b4d2e2a0e3c788f8","user":{"login":"fxos","id":10078829,"avatar_url":"https://avatars.githubusercontent.com/u/10078829?v=3","gravatar_id":"","url":"https://api.github.com/users/fxos","html_url":"https://github.com/fxos","followers_url":"https://api.github.com/users/fxos/followers","following_url":"https://api.github.com/users/fxos/following{/other_user}","gists_url":"https://api.github.com/users/fxos/gists{/gist_id}","starred_url":"https://api.github.com/users/fxos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxos/subscriptions","organizations_url":"https://api.github.com/users/fxos/orgs","repos_url":"https://api.github.com/users/fxos/repos","events_url":"https://api.github.com/users/fxos/events{/privacy}","received_events_url":"https://api.github.com/users/fxos/received_events","type":"Organization","site_admin":false},"repo":{"id":28850112,"name":"customizer","full_name":"fxos/customizer","owner":{"login":"fxos","id":10078829,"avatar_url":"https://avatars.githubusercontent.com/u/10078829?v=3","gravatar_id":"","url":"https://api.github.com/users/fxos","html_url":"https://github.com/fxos","followers_url":"https://api.github.com/users/fxos/followers","following_url":"https://api.github.com/users/fxos/following{/other_user}","gists_url":"https://api.github.com/users/fxos/gists{/gist_id}","starred_url":"https://api.github.com/users/fxos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxos/subscriptions","organizations_url":"https://api.github.com/users/fxos/orgs","repos_url":"https://api.github.com/users/fxos/repos","events_url":"https://api.github.com/users/fxos/events{/privacy}","received_events_url":"https://api.github.com/users/fxos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fxos/customizer","description":"An addon for FirefoxOS which builds customizes application interfaces.","fork":false,"url":"https://api.github.com/repos/fxos/customizer","forks_url":"https://api.github.com/repos/fxos/customizer/forks","keys_url":"https://api.github.com/repos/fxos/customizer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fxos/customizer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fxos/customizer/teams","hooks_url":"https://api.github.com/repos/fxos/customizer/hooks","issue_events_url":"https://api.github.com/repos/fxos/customizer/issues/events{/number}","events_url":"https://api.github.com/repos/fxos/customizer/events","assignees_url":"https://api.github.com/repos/fxos/customizer/assignees{/user}","branches_url":"https://api.github.com/repos/fxos/customizer/branches{/branch}","tags_url":"https://api.github.com/repos/fxos/customizer/tags","blobs_url":"https://api.github.com/repos/fxos/customizer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fxos/customizer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fxos/customizer/git/refs{/sha}","trees_url":"https://api.github.com/repos/fxos/customizer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fxos/customizer/statuses/{sha}","languages_url":"https://api.github.com/repos/fxos/customizer/languages","stargazers_url":"https://api.github.com/repos/fxos/customizer/stargazers","contributors_url":"https://api.github.com/repos/fxos/customizer/contributors","subscribers_url":"https://api.github.com/repos/fxos/customizer/subscribers","subscription_url":"https://api.github.com/repos/fxos/customizer/subscription","commits_url":"https://api.github.com/repos/fxos/customizer/commits{/sha}","git_commits_url":"https://api.github.com/repos/fxos/customizer/git/commits{/sha}","comments_url":"https://api.github.com/repos/fxos/customizer/comments{/number}","issue_comment_url":"https://api.github.com/repos/fxos/customizer/issues/comments{/number}","contents_url":"https://api.github.com/repos/fxos/customizer/contents/{+path}","compare_url":"https://api.github.com/repos/fxos/customizer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fxos/customizer/merges","archive_url":"https://api.github.com/repos/fxos/customizer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fxos/customizer/downloads","issues_url":"https://api.github.com/repos/fxos/customizer/issues{/number}","pulls_url":"https://api.github.com/repos/fxos/customizer/pulls{/number}","milestones_url":"https://api.github.com/repos/fxos/customizer/milestones{/number}","notifications_url":"https://api.github.com/repos/fxos/customizer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fxos/customizer/labels{/name}","releases_url":"https://api.github.com/repos/fxos/customizer/releases{/id}","created_at":"2015-01-06T06:29:49Z","updated_at":"2015-03-06T15:25:33Z","pushed_at":"2015-03-06T15:25:32Z","git_url":"git://github.com/fxos/customizer.git","ssh_url":"git@github.com:fxos/customizer.git","clone_url":"https://github.com/fxos/customizer.git","svn_url":"https://github.com/fxos/customizer","homepage":null,"size":1143,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fxos/customizer/pulls/9"},"html":{"href":"https://github.com/fxos/customizer/pull/9"},"issue":{"href":"https://api.github.com/repos/fxos/customizer/issues/9"},"comments":{"href":"https://api.github.com/repos/fxos/customizer/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/fxos/customizer/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/fxos/customizer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fxos/customizer/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/fxos/customizer/statuses/c45636e26773f12b2193e17a8832427dfa5efa36"}}}}