{"action":"created","comment":{"url":"https://api.github.com/repos/openstax/tutor-js/pulls/comments/202407009","pull_request_review_id":137088012,"id":202407009,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjQwNzAwOQ==","diff_hunk":"@@ -29,11 +30,20 @@ export default class WindowShade extends React.Component {\n     const { ux, children } = this.props;\n \n     return (\n-      <div className={`highlights-windowshade ${ux.isSummaryVisible ? 'down' : 'up'}`}>\n-        <div className='centered-content'>\n-          {children}\n-        </div>\n-      </div>\n+      <ReactCSSTransitionGroup\n+        component={(props) => React.Children.toArray(props.children)[0] || null}\n+        transitionName=\"animate\"\n+        transitionEnterTimeout={300}\n+        transitionLeaveTimeout={300}\n+      >\n+        {ux.isSummaryVisible &&\n+          <div key=\"shade\" className=\"highlights-windowshade\">\n+            <div className='centered-content'>\n+              {children}\n+            </div>\n+          </div>\n+        }\n+      </ReactCSSTransitionGroup>\n     );","path":"tutor/src/components/annotations/window-shade.jsx","position":29,"original_position":29,"commit_id":"18c0ed4cf0de8aa6edf6cb51e0152aece57f3a2f","original_commit_id":"18c0ed4cf0de8aa6edf6cb51e0152aece57f3a2f","user":{"login":"nathanstitt","id":79566,"node_id":"MDQ6VXNlcjc5NTY2","avatar_url":"https://avatars2.githubusercontent.com/u/79566?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanstitt","html_url":"https://github.com/nathanstitt","followers_url":"https://api.github.com/users/nathanstitt/followers","following_url":"https://api.github.com/users/nathanstitt/following{/other_user}","gists_url":"https://api.github.com/users/nathanstitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanstitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanstitt/subscriptions","organizations_url":"https://api.github.com/users/nathanstitt/orgs","repos_url":"https://api.github.com/users/nathanstitt/repos","events_url":"https://api.github.com/users/nathanstitt/events{/privacy}","received_events_url":"https://api.github.com/users/nathanstitt/received_events","type":"User","site_admin":false},"body":"The `React.Children.toArray(props.children)[0]` seems kinda weird to me.  I think you're doing that so that the page doesn't have an unneeded div until it's needed?\r\n\r\nIt seems like we could make `WindowShade` be responsible for conditionally rendering the SummaryPage and then do something like:\r\n\r\n```jsx\r\n  <ReactCSSTransitionGroup  transitionName=\"animate\" transitionEnterTimeout={300}  transitionLeaveTimeout={300}  className=\"highlights-windowshade\">\r\n         {ux.isSummaryVisible && <SummaryPage {...propsFromAnnotation} />}\r\n  </ReactCSSTransitionGroup>\r\n```\r\n\r\nThoughts on that?","created_at":"2018-07-13T16:34:22Z","updated_at":"2018-07-13T16:35:53Z","html_url":"https://github.com/openstax/tutor-js/pull/2293#discussion_r202407009","pull_request_url":"https://api.github.com/repos/openstax/tutor-js/pulls/2293","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/comments/202407009"},"html":{"href":"https://github.com/openstax/tutor-js/pull/2293#discussion_r202407009"},"pull_request":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/2293"}}},"pull_request":{"url":"https://api.github.com/repos/openstax/tutor-js/pulls/2293","id":201290412,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMjkwNDEy","html_url":"https://github.com/openstax/tutor-js/pull/2293","diff_url":"https://github.com/openstax/tutor-js/pull/2293.diff","patch_url":"https://github.com/openstax/tutor-js/pull/2293.patch","issue_url":"https://api.github.com/repos/openstax/tutor-js/issues/2293","number":2293,"state":"open","locked":false,"title":"remove annotation drawer from dom when closed, and allow tabbing to elements inside","user":{"login":"TomWoodward","id":636227,"node_id":"MDQ6VXNlcjYzNjIyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/636227?v=4","gravatar_id":"","url":"https://api.github.com/users/TomWoodward","html_url":"https://github.com/TomWoodward","followers_url":"https://api.github.com/users/TomWoodward/followers","following_url":"https://api.github.com/users/TomWoodward/following{/other_user}","gists_url":"https://api.github.com/users/TomWoodward/gists{/gist_id}","starred_url":"https://api.github.com/users/TomWoodward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomWoodward/subscriptions","organizations_url":"https://api.github.com/users/TomWoodward/orgs","repos_url":"https://api.github.com/users/TomWoodward/repos","events_url":"https://api.github.com/users/TomWoodward/events{/privacy}","received_events_url":"https://api.github.com/users/TomWoodward/received_events","type":"User","site_admin":false},"body":"There is a little bit of a hack to ensure that when you tab after the drawer opens, it selects the drawer content first. otherwise you have to tab through all the content behind before getting to the stuff you can see. If anyone knows a cleaner way to accomplish that please let me know.\r\n\r\nalso the ref mocking in the test is super brittle, would love a better solution to that.\r\n","created_at":"2018-07-13T13:24:56Z","updated_at":"2018-07-13T16:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61867ceff7c4c3a1bda96e9d24788c811929a049","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openstax/tutor-js/pulls/2293/commits","review_comments_url":"https://api.github.com/repos/openstax/tutor-js/pulls/2293/comments","review_comment_url":"https://api.github.com/repos/openstax/tutor-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openstax/tutor-js/issues/2293/comments","statuses_url":"https://api.github.com/repos/openstax/tutor-js/statuses/18c0ed4cf0de8aa6edf6cb51e0152aece57f3a2f","head":{"label":"openstax:annotation-drawer-animation-and-tabindex","ref":"annotation-drawer-animation-and-tabindex","sha":"18c0ed4cf0de8aa6edf6cb51e0152aece57f3a2f","user":{"login":"openstax","id":3805549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDU1NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/3805549?v=4","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":24433756,"node_id":"MDEwOlJlcG9zaXRvcnkyNDQzMzc1Ng==","name":"tutor-js","full_name":"openstax/tutor-js","owner":{"login":"openstax","id":3805549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDU1NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/3805549?v=4","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/tutor-js","description":":mortar_board: Javascript frontend for openstax tutor","fork":false,"url":"https://api.github.com/repos/openstax/tutor-js","forks_url":"https://api.github.com/repos/openstax/tutor-js/forks","keys_url":"https://api.github.com/repos/openstax/tutor-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/tutor-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/tutor-js/teams","hooks_url":"https://api.github.com/repos/openstax/tutor-js/hooks","issue_events_url":"https://api.github.com/repos/openstax/tutor-js/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/tutor-js/events","assignees_url":"https://api.github.com/repos/openstax/tutor-js/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/tutor-js/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/tutor-js/tags","blobs_url":"https://api.github.com/repos/openstax/tutor-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/tutor-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/tutor-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/tutor-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/tutor-js/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/tutor-js/languages","stargazers_url":"https://api.github.com/repos/openstax/tutor-js/stargazers","contributors_url":"https://api.github.com/repos/openstax/tutor-js/contributors","subscribers_url":"https://api.github.com/repos/openstax/tutor-js/subscribers","subscription_url":"https://api.github.com/repos/openstax/tutor-js/subscription","commits_url":"https://api.github.com/repos/openstax/tutor-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/tutor-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/tutor-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/tutor-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/tutor-js/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/tutor-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/tutor-js/merges","archive_url":"https://api.github.com/repos/openstax/tutor-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/tutor-js/downloads","issues_url":"https://api.github.com/repos/openstax/tutor-js/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/tutor-js/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/tutor-js/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/tutor-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/tutor-js/labels{/name}","releases_url":"https://api.github.com/repos/openstax/tutor-js/releases{/id}","deployments_url":"https://api.github.com/repos/openstax/tutor-js/deployments","created_at":"2014-09-24T21:42:26Z","updated_at":"2018-07-12T23:01:40Z","pushed_at":"2018-07-13T14:02:50Z","git_url":"git://github.com/openstax/tutor-js.git","ssh_url":"git@github.com:openstax/tutor-js.git","clone_url":"https://github.com/openstax/tutor-js.git","svn_url":"https://github.com/openstax/tutor-js","homepage":"","size":56386,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":2,"watchers":11,"default_branch":"master"}},"base":{"label":"openstax:master","ref":"master","sha":"f37aea1e4df2bfe7a939471c10684d35259f6d9f","user":{"login":"openstax","id":3805549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDU1NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/3805549?v=4","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":24433756,"node_id":"MDEwOlJlcG9zaXRvcnkyNDQzMzc1Ng==","name":"tutor-js","full_name":"openstax/tutor-js","owner":{"login":"openstax","id":3805549,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MDU1NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/3805549?v=4","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/tutor-js","description":":mortar_board: Javascript frontend for openstax tutor","fork":false,"url":"https://api.github.com/repos/openstax/tutor-js","forks_url":"https://api.github.com/repos/openstax/tutor-js/forks","keys_url":"https://api.github.com/repos/openstax/tutor-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/tutor-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/tutor-js/teams","hooks_url":"https://api.github.com/repos/openstax/tutor-js/hooks","issue_events_url":"https://api.github.com/repos/openstax/tutor-js/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/tutor-js/events","assignees_url":"https://api.github.com/repos/openstax/tutor-js/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/tutor-js/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/tutor-js/tags","blobs_url":"https://api.github.com/repos/openstax/tutor-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/tutor-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/tutor-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/tutor-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/tutor-js/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/tutor-js/languages","stargazers_url":"https://api.github.com/repos/openstax/tutor-js/stargazers","contributors_url":"https://api.github.com/repos/openstax/tutor-js/contributors","subscribers_url":"https://api.github.com/repos/openstax/tutor-js/subscribers","subscription_url":"https://api.github.com/repos/openstax/tutor-js/subscription","commits_url":"https://api.github.com/repos/openstax/tutor-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/tutor-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/tutor-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/tutor-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/tutor-js/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/tutor-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/tutor-js/merges","archive_url":"https://api.github.com/repos/openstax/tutor-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/tutor-js/downloads","issues_url":"https://api.github.com/repos/openstax/tutor-js/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/tutor-js/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/tutor-js/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/tutor-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/tutor-js/labels{/name}","releases_url":"https://api.github.com/repos/openstax/tutor-js/releases{/id}","deployments_url":"https://api.github.com/repos/openstax/tutor-js/deployments","created_at":"2014-09-24T21:42:26Z","updated_at":"2018-07-12T23:01:40Z","pushed_at":"2018-07-13T14:02:50Z","git_url":"git://github.com/openstax/tutor-js.git","ssh_url":"git@github.com:openstax/tutor-js.git","clone_url":"https://github.com/openstax/tutor-js.git","svn_url":"https://github.com/openstax/tutor-js","homepage":"","size":56386,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":2,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/2293"},"html":{"href":"https://github.com/openstax/tutor-js/pull/2293"},"issue":{"href":"https://api.github.com/repos/openstax/tutor-js/issues/2293"},"comments":{"href":"https://api.github.com/repos/openstax/tutor-js/issues/2293/comments"},"review_comments":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/2293/comments"},"review_comment":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openstax/tutor-js/pulls/2293/commits"},"statuses":{"href":"https://api.github.com/repos/openstax/tutor-js/statuses/18c0ed4cf0de8aa6edf6cb51e0152aece57f3a2f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nathanstitt"}}