{"action":"opened","number":380,"pull_request":{"url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380","id":98425022,"html_url":"https://github.com/mesosphere/reactjs-components/pull/380","diff_url":"https://github.com/mesosphere/reactjs-components/pull/380.diff","patch_url":"https://github.com/mesosphere/reactjs-components/pull/380.patch","issue_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/380","number":380,"state":"open","locked":false,"title":"Replace KeyDownMixin (refs DCOS-11504)","user":{"login":"jfurrow","id":1134755,"avatar_url":"https://avatars.githubusercontent.com/u/1134755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfurrow","html_url":"https://github.com/jfurrow","followers_url":"https://api.github.com/users/jfurrow/followers","following_url":"https://api.github.com/users/jfurrow/following{/other_user}","gists_url":"https://api.github.com/users/jfurrow/gists{/gist_id}","starred_url":"https://api.github.com/users/jfurrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfurrow/subscriptions","organizations_url":"https://api.github.com/users/jfurrow/orgs","repos_url":"https://api.github.com/users/jfurrow/repos","events_url":"https://api.github.com/users/jfurrow/events{/privacy}","received_events_url":"https://api.github.com/users/jfurrow/received_events","type":"User","site_admin":false},"body":"This PR removes the `KeyDownMixin` and just implements the event handlers in the components that need them.\r\n\r\nThe `KeyDownMixin` was a little too generic for our use case. It add keydown listeners for each instance of the `Dropdown` and `Modal` component, when it really only needs to be added when the components are visible.\r\n\r\nThis caused a problem with our modal where the browser would drop the animation when the `esc` key was pressed.\r\n\r\nYou can see the difference of the execution times in the following screenshots. In both cases, the timeline was recorded at the moment the `esc` key was pressed in the Service Create Modal in DC/OS.\r\n\r\nBefore (no animation occurred):\r\n![](https://cl.ly/1K3g2o191T44/Screen%20Shot%202016-12-16%20at%204.28.08%20PM.png)\r\n\r\nAfter (the animation occurs after the single handler is called):\r\n![](https://cl.ly/2R1K1k3D3w2N/Screen%20Shot%202016-12-16%20at%204.22.26%20PM.png)","created_at":"2016-12-17T00:37:16Z","updated_at":"2016-12-17T00:37:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b1f34058bcc01f871b72866b9fff88b75b06a48","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380/commits","review_comments_url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380/comments","review_comment_url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/380/comments","statuses_url":"https://api.github.com/repos/mesosphere/reactjs-components/statuses/f723e310f306bf24d75d44e63634798b4ee08dbc","head":{"label":"mesosphere:john/refactor/remove-KeyDownMixin","ref":"john/refactor/remove-KeyDownMixin","sha":"f723e310f306bf24d75d44e63634798b4ee08dbc","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":37925854,"name":"reactjs-components","full_name":"mesosphere/reactjs-components","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/reactjs-components","description":":art: A library of reusable React components","fork":false,"url":"https://api.github.com/repos/mesosphere/reactjs-components","forks_url":"https://api.github.com/repos/mesosphere/reactjs-components/forks","keys_url":"https://api.github.com/repos/mesosphere/reactjs-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/reactjs-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/reactjs-components/teams","hooks_url":"https://api.github.com/repos/mesosphere/reactjs-components/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/reactjs-components/events","assignees_url":"https://api.github.com/repos/mesosphere/reactjs-components/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/reactjs-components/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/reactjs-components/tags","blobs_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/reactjs-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/reactjs-components/languages","stargazers_url":"https://api.github.com/repos/mesosphere/reactjs-components/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/reactjs-components/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/reactjs-components/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/reactjs-components/subscription","commits_url":"https://api.github.com/repos/mesosphere/reactjs-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/reactjs-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/reactjs-components/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/reactjs-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/reactjs-components/merges","archive_url":"https://api.github.com/repos/mesosphere/reactjs-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/reactjs-components/downloads","issues_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/reactjs-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/reactjs-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/reactjs-components/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/reactjs-components/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/reactjs-components/deployments","created_at":"2015-06-23T15:01:45Z","updated_at":"2016-11-29T02:22:26Z","pushed_at":"2016-12-17T00:37:16Z","git_url":"git://github.com/mesosphere/reactjs-components.git","ssh_url":"git@github.com:mesosphere/reactjs-components.git","clone_url":"https://github.com/mesosphere/reactjs-components.git","svn_url":"https://github.com/mesosphere/reactjs-components","homepage":"http://mesosphere.github.io/reactjs-components","size":2799,"stargazers_count":61,"watchers_count":61,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":61,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"9a978ebdfc295cf70b2773797b2cd1cd4d3a0344","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":37925854,"name":"reactjs-components","full_name":"mesosphere/reactjs-components","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/reactjs-components","description":":art: A library of reusable React components","fork":false,"url":"https://api.github.com/repos/mesosphere/reactjs-components","forks_url":"https://api.github.com/repos/mesosphere/reactjs-components/forks","keys_url":"https://api.github.com/repos/mesosphere/reactjs-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/reactjs-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/reactjs-components/teams","hooks_url":"https://api.github.com/repos/mesosphere/reactjs-components/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/reactjs-components/events","assignees_url":"https://api.github.com/repos/mesosphere/reactjs-components/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/reactjs-components/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/reactjs-components/tags","blobs_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/reactjs-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/reactjs-components/languages","stargazers_url":"https://api.github.com/repos/mesosphere/reactjs-components/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/reactjs-components/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/reactjs-components/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/reactjs-components/subscription","commits_url":"https://api.github.com/repos/mesosphere/reactjs-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/reactjs-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/reactjs-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/reactjs-components/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/reactjs-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/reactjs-components/merges","archive_url":"https://api.github.com/repos/mesosphere/reactjs-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/reactjs-components/downloads","issues_url":"https://api.github.com/repos/mesosphere/reactjs-components/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/reactjs-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/reactjs-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/reactjs-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/reactjs-components/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/reactjs-components/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/reactjs-components/deployments","created_at":"2015-06-23T15:01:45Z","updated_at":"2016-11-29T02:22:26Z","pushed_at":"2016-12-17T00:37:16Z","git_url":"git://github.com/mesosphere/reactjs-components.git","ssh_url":"git@github.com:mesosphere/reactjs-components.git","clone_url":"https://github.com/mesosphere/reactjs-components.git","svn_url":"https://github.com/mesosphere/reactjs-components","homepage":"http://mesosphere.github.io/reactjs-components","size":2799,"stargazers_count":61,"watchers_count":61,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380"},"html":{"href":"https://github.com/mesosphere/reactjs-components/pull/380"},"issue":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/issues/380"},"comments":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/reactjs-components/statuses/f723e310f306bf24d75d44e63634798b4ee08dbc"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":46,"deletions":47,"changed_files":4}}
{"actor":{"display_login":"jfurrow"}}