{"action":"created","comment":{"url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/comments/58344935","id":58344935,"diff_hunk":"@@ -32,22 +34,30 @@ export default class QuestionForClass extends Component {\n     onSelectChange(question.get('key'), event.target.checked)\n   }\n \n+  handleStickyStateChange(isSticky) {\n+    this.setState({isSticky: isSticky})\n+  }\n+\n   render() {\n     const { question } = this.props\n-    const { answersVisible } = this.state\n+    const { answersVisible, isSticky } = this.state\n     return (\n-      <div className={`question ${question.get('visible') ? '' : 'hidden'}`}>\n-        <div className='question-header'>\n-          <input type='checkbox' checked={question.get('selected')} onChange={this.handleCheckboxChange}/>\n-          Question #{question.get('questionNumber')}\n-          <a className='answers-toggle' onClick={this.toggleAnswersVisibility}>\n-            {answersVisible ? 'Hide responses' : 'Show responses'}\n-          </a>\n+      <StickyContainer>\n+        <div className={`question ${question.get('visible') ? '' : 'hidden'}`}>\n+          <Sticky className=\"sticky-question-header\" onStickyStateChange={this.handleStickyStateChange.bind(this)}>\n+            <div className={`question-header ${isSticky ? 'stuck-question-header' : ''}`}>","path":"js/components/question-for-class.js","position":39,"original_position":39,"commit_id":"4110f7e85d5df0fc398305787160ecf716cc915b","original_commit_id":"4110f7e85d5df0fc398305787160ecf716cc915b","user":{"login":"pjanik","id":767857,"avatar_url":"https://avatars.githubusercontent.com/u/767857?v=3","gravatar_id":"","url":"https://api.github.com/users/pjanik","html_url":"https://github.com/pjanik","followers_url":"https://api.github.com/users/pjanik/followers","following_url":"https://api.github.com/users/pjanik/following{/other_user}","gists_url":"https://api.github.com/users/pjanik/gists{/gist_id}","starred_url":"https://api.github.com/users/pjanik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjanik/subscriptions","organizations_url":"https://api.github.com/users/pjanik/orgs","repos_url":"https://api.github.com/users/pjanik/repos","events_url":"https://api.github.com/users/pjanik/events{/privacy}","received_events_url":"https://api.github.com/users/pjanik/received_events","type":"User","site_admin":false},"body":"`<Sticky>` component automatically receives `.sticky` CSS class when it's stuck. So, `.stuck-question-header` could be probably replaced with `.sticky .question-header` in CSS and no state handing would is necessary. Not a big deal, but I'm assuming that eventually we'll also add sticky page and activity headers, so it could simplify a few components.","created_at":"2016-04-04T08:54:07Z","updated_at":"2016-04-04T08:54:07Z","html_url":"https://github.com/concord-consortium/portal-report/pull/17#discussion_r58344935","pull_request_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/comments/58344935"},"html":{"href":"https://github.com/concord-consortium/portal-report/pull/17#discussion_r58344935"},"pull_request":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17","id":64966983,"html_url":"https://github.com/concord-consortium/portal-report/pull/17","diff_url":"https://github.com/concord-consortium/portal-report/pull/17.diff","patch_url":"https://github.com/concord-consortium/portal-report/pull/17.patch","issue_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/17","number":17,"state":"open","locked":false,"title":"Added sticky headers to class report [#115343939]","user":{"login":"dougmartin","id":112938,"avatar_url":"https://avatars.githubusercontent.com/u/112938?v=3","gravatar_id":"","url":"https://api.github.com/users/dougmartin","html_url":"https://github.com/dougmartin","followers_url":"https://api.github.com/users/dougmartin/followers","following_url":"https://api.github.com/users/dougmartin/following{/other_user}","gists_url":"https://api.github.com/users/dougmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/dougmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougmartin/subscriptions","organizations_url":"https://api.github.com/users/dougmartin/orgs","repos_url":"https://api.github.com/users/dougmartin/repos","events_url":"https://api.github.com/users/dougmartin/events{/privacy}","received_events_url":"https://api.github.com/users/dougmartin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-01T16:02:42Z","updated_at":"2016-04-04T08:54:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a115da2e3e4a7bc146ec61acde58d818c371e46c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17/commits","review_comments_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17/comments","review_comment_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/17/comments","statuses_url":"https://api.github.com/repos/concord-consortium/portal-report/statuses/4110f7e85d5df0fc398305787160ecf716cc915b","head":{"label":"concord-consortium:add-sticky-header2","ref":"add-sticky-header2","sha":"4110f7e85d5df0fc398305787160ecf716cc915b","user":{"login":"concord-consortium","id":319219,"avatar_url":"https://avatars.githubusercontent.com/u/319219?v=3","gravatar_id":"","url":"https://api.github.com/users/concord-consortium","html_url":"https://github.com/concord-consortium","followers_url":"https://api.github.com/users/concord-consortium/followers","following_url":"https://api.github.com/users/concord-consortium/following{/other_user}","gists_url":"https://api.github.com/users/concord-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/concord-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concord-consortium/subscriptions","organizations_url":"https://api.github.com/users/concord-consortium/orgs","repos_url":"https://api.github.com/users/concord-consortium/repos","events_url":"https://api.github.com/users/concord-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/concord-consortium/received_events","type":"Organization","site_admin":false},"repo":{"id":53022080,"name":"portal-report","full_name":"concord-consortium/portal-report","owner":{"login":"concord-consortium","id":319219,"avatar_url":"https://avatars.githubusercontent.com/u/319219?v=3","gravatar_id":"","url":"https://api.github.com/users/concord-consortium","html_url":"https://github.com/concord-consortium","followers_url":"https://api.github.com/users/concord-consortium/followers","following_url":"https://api.github.com/users/concord-consortium/following{/other_user}","gists_url":"https://api.github.com/users/concord-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/concord-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concord-consortium/subscriptions","organizations_url":"https://api.github.com/users/concord-consortium/orgs","repos_url":"https://api.github.com/users/concord-consortium/repos","events_url":"https://api.github.com/users/concord-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/concord-consortium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concord-consortium/portal-report","description":"","fork":false,"url":"https://api.github.com/repos/concord-consortium/portal-report","forks_url":"https://api.github.com/repos/concord-consortium/portal-report/forks","keys_url":"https://api.github.com/repos/concord-consortium/portal-report/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concord-consortium/portal-report/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concord-consortium/portal-report/teams","hooks_url":"https://api.github.com/repos/concord-consortium/portal-report/hooks","issue_events_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/events{/number}","events_url":"https://api.github.com/repos/concord-consortium/portal-report/events","assignees_url":"https://api.github.com/repos/concord-consortium/portal-report/assignees{/user}","branches_url":"https://api.github.com/repos/concord-consortium/portal-report/branches{/branch}","tags_url":"https://api.github.com/repos/concord-consortium/portal-report/tags","blobs_url":"https://api.github.com/repos/concord-consortium/portal-report/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concord-consortium/portal-report/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concord-consortium/portal-report/git/refs{/sha}","trees_url":"https://api.github.com/repos/concord-consortium/portal-report/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concord-consortium/portal-report/statuses/{sha}","languages_url":"https://api.github.com/repos/concord-consortium/portal-report/languages","stargazers_url":"https://api.github.com/repos/concord-consortium/portal-report/stargazers","contributors_url":"https://api.github.com/repos/concord-consortium/portal-report/contributors","subscribers_url":"https://api.github.com/repos/concord-consortium/portal-report/subscribers","subscription_url":"https://api.github.com/repos/concord-consortium/portal-report/subscription","commits_url":"https://api.github.com/repos/concord-consortium/portal-report/commits{/sha}","git_commits_url":"https://api.github.com/repos/concord-consortium/portal-report/git/commits{/sha}","comments_url":"https://api.github.com/repos/concord-consortium/portal-report/comments{/number}","issue_comment_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/comments{/number}","contents_url":"https://api.github.com/repos/concord-consortium/portal-report/contents/{+path}","compare_url":"https://api.github.com/repos/concord-consortium/portal-report/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concord-consortium/portal-report/merges","archive_url":"https://api.github.com/repos/concord-consortium/portal-report/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concord-consortium/portal-report/downloads","issues_url":"https://api.github.com/repos/concord-consortium/portal-report/issues{/number}","pulls_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls{/number}","milestones_url":"https://api.github.com/repos/concord-consortium/portal-report/milestones{/number}","notifications_url":"https://api.github.com/repos/concord-consortium/portal-report/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concord-consortium/portal-report/labels{/name}","releases_url":"https://api.github.com/repos/concord-consortium/portal-report/releases{/id}","deployments_url":"https://api.github.com/repos/concord-consortium/portal-report/deployments","created_at":"2016-03-03T05:02:28Z","updated_at":"2016-03-07T18:04:09Z","pushed_at":"2016-04-01T20:06:26Z","git_url":"git://github.com/concord-consortium/portal-report.git","ssh_url":"git@github.com:concord-consortium/portal-report.git","clone_url":"https://github.com/concord-consortium/portal-report.git","svn_url":"https://github.com/concord-consortium/portal-report","homepage":null,"size":915,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"concord-consortium:master","ref":"master","sha":"88f44f8448b4de95b2faefe65817788cc10aa354","user":{"login":"concord-consortium","id":319219,"avatar_url":"https://avatars.githubusercontent.com/u/319219?v=3","gravatar_id":"","url":"https://api.github.com/users/concord-consortium","html_url":"https://github.com/concord-consortium","followers_url":"https://api.github.com/users/concord-consortium/followers","following_url":"https://api.github.com/users/concord-consortium/following{/other_user}","gists_url":"https://api.github.com/users/concord-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/concord-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concord-consortium/subscriptions","organizations_url":"https://api.github.com/users/concord-consortium/orgs","repos_url":"https://api.github.com/users/concord-consortium/repos","events_url":"https://api.github.com/users/concord-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/concord-consortium/received_events","type":"Organization","site_admin":false},"repo":{"id":53022080,"name":"portal-report","full_name":"concord-consortium/portal-report","owner":{"login":"concord-consortium","id":319219,"avatar_url":"https://avatars.githubusercontent.com/u/319219?v=3","gravatar_id":"","url":"https://api.github.com/users/concord-consortium","html_url":"https://github.com/concord-consortium","followers_url":"https://api.github.com/users/concord-consortium/followers","following_url":"https://api.github.com/users/concord-consortium/following{/other_user}","gists_url":"https://api.github.com/users/concord-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/concord-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concord-consortium/subscriptions","organizations_url":"https://api.github.com/users/concord-consortium/orgs","repos_url":"https://api.github.com/users/concord-consortium/repos","events_url":"https://api.github.com/users/concord-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/concord-consortium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concord-consortium/portal-report","description":"","fork":false,"url":"https://api.github.com/repos/concord-consortium/portal-report","forks_url":"https://api.github.com/repos/concord-consortium/portal-report/forks","keys_url":"https://api.github.com/repos/concord-consortium/portal-report/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concord-consortium/portal-report/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concord-consortium/portal-report/teams","hooks_url":"https://api.github.com/repos/concord-consortium/portal-report/hooks","issue_events_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/events{/number}","events_url":"https://api.github.com/repos/concord-consortium/portal-report/events","assignees_url":"https://api.github.com/repos/concord-consortium/portal-report/assignees{/user}","branches_url":"https://api.github.com/repos/concord-consortium/portal-report/branches{/branch}","tags_url":"https://api.github.com/repos/concord-consortium/portal-report/tags","blobs_url":"https://api.github.com/repos/concord-consortium/portal-report/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concord-consortium/portal-report/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concord-consortium/portal-report/git/refs{/sha}","trees_url":"https://api.github.com/repos/concord-consortium/portal-report/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concord-consortium/portal-report/statuses/{sha}","languages_url":"https://api.github.com/repos/concord-consortium/portal-report/languages","stargazers_url":"https://api.github.com/repos/concord-consortium/portal-report/stargazers","contributors_url":"https://api.github.com/repos/concord-consortium/portal-report/contributors","subscribers_url":"https://api.github.com/repos/concord-consortium/portal-report/subscribers","subscription_url":"https://api.github.com/repos/concord-consortium/portal-report/subscription","commits_url":"https://api.github.com/repos/concord-consortium/portal-report/commits{/sha}","git_commits_url":"https://api.github.com/repos/concord-consortium/portal-report/git/commits{/sha}","comments_url":"https://api.github.com/repos/concord-consortium/portal-report/comments{/number}","issue_comment_url":"https://api.github.com/repos/concord-consortium/portal-report/issues/comments{/number}","contents_url":"https://api.github.com/repos/concord-consortium/portal-report/contents/{+path}","compare_url":"https://api.github.com/repos/concord-consortium/portal-report/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concord-consortium/portal-report/merges","archive_url":"https://api.github.com/repos/concord-consortium/portal-report/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concord-consortium/portal-report/downloads","issues_url":"https://api.github.com/repos/concord-consortium/portal-report/issues{/number}","pulls_url":"https://api.github.com/repos/concord-consortium/portal-report/pulls{/number}","milestones_url":"https://api.github.com/repos/concord-consortium/portal-report/milestones{/number}","notifications_url":"https://api.github.com/repos/concord-consortium/portal-report/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concord-consortium/portal-report/labels{/name}","releases_url":"https://api.github.com/repos/concord-consortium/portal-report/releases{/id}","deployments_url":"https://api.github.com/repos/concord-consortium/portal-report/deployments","created_at":"2016-03-03T05:02:28Z","updated_at":"2016-03-07T18:04:09Z","pushed_at":"2016-04-01T20:06:26Z","git_url":"git://github.com/concord-consortium/portal-report.git","ssh_url":"git@github.com:concord-consortium/portal-report.git","clone_url":"https://github.com/concord-consortium/portal-report.git","svn_url":"https://github.com/concord-consortium/portal-report","homepage":null,"size":915,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17"},"html":{"href":"https://github.com/concord-consortium/portal-report/pull/17"},"issue":{"href":"https://api.github.com/repos/concord-consortium/portal-report/issues/17"},"comments":{"href":"https://api.github.com/repos/concord-consortium/portal-report/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concord-consortium/portal-report/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/concord-consortium/portal-report/statuses/4110f7e85d5df0fc398305787160ecf716cc915b"}}}}