{"action":"created","comment":{"url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/comments/173303472","pull_request_review_id":102473489,"id":173303472,"diff_hunk":"@@ -0,0 +1,69 @@\n+class Feed\n+  def initialize(educator)\n+    @educator = educator\n+    @authorizer = Authorizer.new(@educator)\n+  end\n+\n+  # Return a list of `FeedCard`s for the feed based on event notes.\n+  def event_note_cards(from_time, limit)\n+    event_notes = @authorizer.authorized do","path":"app/lib/feed.rb","position":9,"original_position":9,"commit_id":"bf42efa90a12789c9bd23a45bc9ffe8b577544ff","original_commit_id":"bf42efa90a12789c9bd23a45bc9ffe8b577544ff","user":{"login":"alexsoble","id":3209501,"avatar_url":"https://avatars3.githubusercontent.com/u/3209501?v=4","gravatar_id":"","url":"https://api.github.com/users/alexsoble","html_url":"https://github.com/alexsoble","followers_url":"https://api.github.com/users/alexsoble/followers","following_url":"https://api.github.com/users/alexsoble/following{/other_user}","gists_url":"https://api.github.com/users/alexsoble/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsoble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsoble/subscriptions","organizations_url":"https://api.github.com/users/alexsoble/orgs","repos_url":"https://api.github.com/users/alexsoble/repos","events_url":"https://api.github.com/users/alexsoble/events{/privacy}","received_events_url":"https://api.github.com/users/alexsoble/received_events","type":"User","site_admin":false},"body":"Talking this out with @kevinrobinson, maybe we want to pass the event notes as a straight argument?","created_at":"2018-03-08T21:52:18Z","updated_at":"2018-03-08T21:52:19Z","html_url":"https://github.com/studentinsights/studentinsights/pull/1505#discussion_r173303472","pull_request_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/comments/173303472"},"html":{"href":"https://github.com/studentinsights/studentinsights/pull/1505#discussion_r173303472"},"pull_request":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505"}}},"pull_request":{"url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505","id":173299209,"html_url":"https://github.com/studentinsights/studentinsights/pull/1505","diff_url":"https://github.com/studentinsights/studentinsights/pull/1505.diff","patch_url":"https://github.com/studentinsights/studentinsights/pull/1505.patch","issue_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/1505","number":1505,"state":"open","locked":false,"title":"Add new home page with feed and initial insight box","user":{"login":"kevinrobinson","id":1056957,"avatar_url":"https://avatars3.githubusercontent.com/u/1056957?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinrobinson","html_url":"https://github.com/kevinrobinson","followers_url":"https://api.github.com/users/kevinrobinson/followers","following_url":"https://api.github.com/users/kevinrobinson/following{/other_user}","gists_url":"https://api.github.com/users/kevinrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinrobinson/subscriptions","organizations_url":"https://api.github.com/users/kevinrobinson/orgs","repos_url":"https://api.github.com/users/kevinrobinson/repos","events_url":"https://api.github.com/users/kevinrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/kevinrobinson/received_events","type":"User","site_admin":false},"body":"this is on top of https://github.com/studentinsights/studentinsights/pull/1496, and merges it in\r\n\r\n# Who is this PR for?\r\nall educators, HS NGE teachers are first partners\r\n\r\n# What problem does this PR fix?\r\nTeachers can't really see what's happening recently across all their students, even if those students have a lot of information entered in Insights.  They have to look at student profiles individually.  https://github.com/studentinsights/studentinsights/pull/1482 helps this a bit, but only per section for most teachers, and even then they can't see the substance of the notes.\r\n\r\nAlso, for NGE teachers in particular, teachers and dept. heads can't see which students are failing at-a-glance, so they skim through and do this across several screens now.  This adds a first \"insight\" box that directly answers this question using the threshold that the NGE team uses.\r\n\r\n# What does this PR do?\r\nAdds a new home page, with UI and endpoints.  It also factors out a few UI components and adds some related test helper packages.\r\n\r\nThis PR doesn't look at optimizing the endpoint response time yet, and my intention was to ship this dark and then look at optimizing that separately.  We'll also have to build some other tools or endpoints to look at this across users.  So the intention with this PR is to ship the first iteration for Friday morning ahead of 10GE, so any page that loads at all is fine, even if it takes 20 seconds.\r\n\r\nThis PR also is intended to be used just by HS teachers for now, so it doesn't branch on the \"insight\" box based on whether the user is in a HS or not, or based on the deployment.\r\n\r\nIt also adds in a commit that uses React `context` to pass through a clock function, and then uses that in tests to freeze the time: https://github.com/studentinsights/studentinsights/pull/1505/commits/238bcb361e0ea5ef4240dff7845f7760f446b00c\r\n\r\n# Screenshot (if adding a client-side feature)\r\n<img width=\"1001\" alt=\"screen shot 2018-03-06 at 5 22 18 pm\" src=\"https://user-images.githubusercontent.com/1056957/37061914-fa79b9dc-2162-11e8-8380-57343edfbdbf.png\">\r\n\r\n# Checklists\r\n## Javascript QA\r\n+ [x] Author checked latest in IE - Home page\r\n\r\n## Automated Testing\r\n+ [x] Author improved specs for code in need of better test coverage\r\n+ [x] Author included specs for new code","created_at":"2018-03-06T22:23:16Z","updated_at":"2018-03-08T21:52:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71b696f1f122522115a84d65d8f4cb1bd8e383e4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505/commits","review_comments_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505/comments","review_comment_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/comments{/number}","comments_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/1505/comments","statuses_url":"https://api.github.com/repos/studentinsights/studentinsights/statuses/bf42efa90a12789c9bd23a45bc9ffe8b577544ff","head":{"label":"studentinsights:feature/home-page","ref":"feature/home-page","sha":"bf42efa90a12789c9bd23a45bc9ffe8b577544ff","user":{"login":"studentinsights","id":17129837,"avatar_url":"https://avatars2.githubusercontent.com/u/17129837?v=4","gravatar_id":"","url":"https://api.github.com/users/studentinsights","html_url":"https://github.com/studentinsights","followers_url":"https://api.github.com/users/studentinsights/followers","following_url":"https://api.github.com/users/studentinsights/following{/other_user}","gists_url":"https://api.github.com/users/studentinsights/gists{/gist_id}","starred_url":"https://api.github.com/users/studentinsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studentinsights/subscriptions","organizations_url":"https://api.github.com/users/studentinsights/orgs","repos_url":"https://api.github.com/users/studentinsights/repos","events_url":"https://api.github.com/users/studentinsights/events{/privacy}","received_events_url":"https://api.github.com/users/studentinsights/received_events","type":"Organization","site_admin":false},"repo":{"id":51324046,"name":"studentinsights","full_name":"studentinsights/studentinsights","owner":{"login":"studentinsights","id":17129837,"avatar_url":"https://avatars2.githubusercontent.com/u/17129837?v=4","gravatar_id":"","url":"https://api.github.com/users/studentinsights","html_url":"https://github.com/studentinsights","followers_url":"https://api.github.com/users/studentinsights/followers","following_url":"https://api.github.com/users/studentinsights/following{/other_user}","gists_url":"https://api.github.com/users/studentinsights/gists{/gist_id}","starred_url":"https://api.github.com/users/studentinsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studentinsights/subscriptions","organizations_url":"https://api.github.com/users/studentinsights/orgs","repos_url":"https://api.github.com/users/studentinsights/repos","events_url":"https://api.github.com/users/studentinsights/events{/privacy}","received_events_url":"https://api.github.com/users/studentinsights/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/studentinsights/studentinsights","description":"Student Insights for Somerville educators","fork":false,"url":"https://api.github.com/repos/studentinsights/studentinsights","forks_url":"https://api.github.com/repos/studentinsights/studentinsights/forks","keys_url":"https://api.github.com/repos/studentinsights/studentinsights/keys{/key_id}","collaborators_url":"https://api.github.com/repos/studentinsights/studentinsights/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/studentinsights/studentinsights/teams","hooks_url":"https://api.github.com/repos/studentinsights/studentinsights/hooks","issue_events_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/events{/number}","events_url":"https://api.github.com/repos/studentinsights/studentinsights/events","assignees_url":"https://api.github.com/repos/studentinsights/studentinsights/assignees{/user}","branches_url":"https://api.github.com/repos/studentinsights/studentinsights/branches{/branch}","tags_url":"https://api.github.com/repos/studentinsights/studentinsights/tags","blobs_url":"https://api.github.com/repos/studentinsights/studentinsights/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/studentinsights/studentinsights/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/studentinsights/studentinsights/git/refs{/sha}","trees_url":"https://api.github.com/repos/studentinsights/studentinsights/git/trees{/sha}","statuses_url":"https://api.github.com/repos/studentinsights/studentinsights/statuses/{sha}","languages_url":"https://api.github.com/repos/studentinsights/studentinsights/languages","stargazers_url":"https://api.github.com/repos/studentinsights/studentinsights/stargazers","contributors_url":"https://api.github.com/repos/studentinsights/studentinsights/contributors","subscribers_url":"https://api.github.com/repos/studentinsights/studentinsights/subscribers","subscription_url":"https://api.github.com/repos/studentinsights/studentinsights/subscription","commits_url":"https://api.github.com/repos/studentinsights/studentinsights/commits{/sha}","git_commits_url":"https://api.github.com/repos/studentinsights/studentinsights/git/commits{/sha}","comments_url":"https://api.github.com/repos/studentinsights/studentinsights/comments{/number}","issue_comment_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/comments{/number}","contents_url":"https://api.github.com/repos/studentinsights/studentinsights/contents/{+path}","compare_url":"https://api.github.com/repos/studentinsights/studentinsights/compare/{base}...{head}","merges_url":"https://api.github.com/repos/studentinsights/studentinsights/merges","archive_url":"https://api.github.com/repos/studentinsights/studentinsights/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/studentinsights/studentinsights/downloads","issues_url":"https://api.github.com/repos/studentinsights/studentinsights/issues{/number}","pulls_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls{/number}","milestones_url":"https://api.github.com/repos/studentinsights/studentinsights/milestones{/number}","notifications_url":"https://api.github.com/repos/studentinsights/studentinsights/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/studentinsights/studentinsights/labels{/name}","releases_url":"https://api.github.com/repos/studentinsights/studentinsights/releases{/id}","deployments_url":"https://api.github.com/repos/studentinsights/studentinsights/deployments","created_at":"2016-02-08T20:15:35Z","updated_at":"2018-03-02T21:26:57Z","pushed_at":"2018-03-08T21:43:11Z","git_url":"git://github.com/studentinsights/studentinsights.git","ssh_url":"git@github.com:studentinsights/studentinsights.git","clone_url":"https://github.com/studentinsights/studentinsights.git","svn_url":"https://github.com/studentinsights/studentinsights","homepage":"https://somerville-teacher-tool-demo.herokuapp.com/","size":16510,"stargazers_count":85,"watchers_count":85,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":44,"open_issues":95,"watchers":85,"default_branch":"master"}},"base":{"label":"studentinsights:master","ref":"master","sha":"95ff6e1b74c328916f1166248650a7ffae531761","user":{"login":"studentinsights","id":17129837,"avatar_url":"https://avatars2.githubusercontent.com/u/17129837?v=4","gravatar_id":"","url":"https://api.github.com/users/studentinsights","html_url":"https://github.com/studentinsights","followers_url":"https://api.github.com/users/studentinsights/followers","following_url":"https://api.github.com/users/studentinsights/following{/other_user}","gists_url":"https://api.github.com/users/studentinsights/gists{/gist_id}","starred_url":"https://api.github.com/users/studentinsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studentinsights/subscriptions","organizations_url":"https://api.github.com/users/studentinsights/orgs","repos_url":"https://api.github.com/users/studentinsights/repos","events_url":"https://api.github.com/users/studentinsights/events{/privacy}","received_events_url":"https://api.github.com/users/studentinsights/received_events","type":"Organization","site_admin":false},"repo":{"id":51324046,"name":"studentinsights","full_name":"studentinsights/studentinsights","owner":{"login":"studentinsights","id":17129837,"avatar_url":"https://avatars2.githubusercontent.com/u/17129837?v=4","gravatar_id":"","url":"https://api.github.com/users/studentinsights","html_url":"https://github.com/studentinsights","followers_url":"https://api.github.com/users/studentinsights/followers","following_url":"https://api.github.com/users/studentinsights/following{/other_user}","gists_url":"https://api.github.com/users/studentinsights/gists{/gist_id}","starred_url":"https://api.github.com/users/studentinsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studentinsights/subscriptions","organizations_url":"https://api.github.com/users/studentinsights/orgs","repos_url":"https://api.github.com/users/studentinsights/repos","events_url":"https://api.github.com/users/studentinsights/events{/privacy}","received_events_url":"https://api.github.com/users/studentinsights/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/studentinsights/studentinsights","description":"Student Insights for Somerville educators","fork":false,"url":"https://api.github.com/repos/studentinsights/studentinsights","forks_url":"https://api.github.com/repos/studentinsights/studentinsights/forks","keys_url":"https://api.github.com/repos/studentinsights/studentinsights/keys{/key_id}","collaborators_url":"https://api.github.com/repos/studentinsights/studentinsights/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/studentinsights/studentinsights/teams","hooks_url":"https://api.github.com/repos/studentinsights/studentinsights/hooks","issue_events_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/events{/number}","events_url":"https://api.github.com/repos/studentinsights/studentinsights/events","assignees_url":"https://api.github.com/repos/studentinsights/studentinsights/assignees{/user}","branches_url":"https://api.github.com/repos/studentinsights/studentinsights/branches{/branch}","tags_url":"https://api.github.com/repos/studentinsights/studentinsights/tags","blobs_url":"https://api.github.com/repos/studentinsights/studentinsights/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/studentinsights/studentinsights/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/studentinsights/studentinsights/git/refs{/sha}","trees_url":"https://api.github.com/repos/studentinsights/studentinsights/git/trees{/sha}","statuses_url":"https://api.github.com/repos/studentinsights/studentinsights/statuses/{sha}","languages_url":"https://api.github.com/repos/studentinsights/studentinsights/languages","stargazers_url":"https://api.github.com/repos/studentinsights/studentinsights/stargazers","contributors_url":"https://api.github.com/repos/studentinsights/studentinsights/contributors","subscribers_url":"https://api.github.com/repos/studentinsights/studentinsights/subscribers","subscription_url":"https://api.github.com/repos/studentinsights/studentinsights/subscription","commits_url":"https://api.github.com/repos/studentinsights/studentinsights/commits{/sha}","git_commits_url":"https://api.github.com/repos/studentinsights/studentinsights/git/commits{/sha}","comments_url":"https://api.github.com/repos/studentinsights/studentinsights/comments{/number}","issue_comment_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/comments{/number}","contents_url":"https://api.github.com/repos/studentinsights/studentinsights/contents/{+path}","compare_url":"https://api.github.com/repos/studentinsights/studentinsights/compare/{base}...{head}","merges_url":"https://api.github.com/repos/studentinsights/studentinsights/merges","archive_url":"https://api.github.com/repos/studentinsights/studentinsights/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/studentinsights/studentinsights/downloads","issues_url":"https://api.github.com/repos/studentinsights/studentinsights/issues{/number}","pulls_url":"https://api.github.com/repos/studentinsights/studentinsights/pulls{/number}","milestones_url":"https://api.github.com/repos/studentinsights/studentinsights/milestones{/number}","notifications_url":"https://api.github.com/repos/studentinsights/studentinsights/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/studentinsights/studentinsights/labels{/name}","releases_url":"https://api.github.com/repos/studentinsights/studentinsights/releases{/id}","deployments_url":"https://api.github.com/repos/studentinsights/studentinsights/deployments","created_at":"2016-02-08T20:15:35Z","updated_at":"2018-03-02T21:26:57Z","pushed_at":"2018-03-08T21:43:11Z","git_url":"git://github.com/studentinsights/studentinsights.git","ssh_url":"git@github.com:studentinsights/studentinsights.git","clone_url":"https://github.com/studentinsights/studentinsights.git","svn_url":"https://github.com/studentinsights/studentinsights","homepage":"https://somerville-teacher-tool-demo.herokuapp.com/","size":16510,"stargazers_count":85,"watchers_count":85,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":44,"open_issues":95,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505"},"html":{"href":"https://github.com/studentinsights/studentinsights/pull/1505"},"issue":{"href":"https://api.github.com/repos/studentinsights/studentinsights/issues/1505"},"comments":{"href":"https://api.github.com/repos/studentinsights/studentinsights/issues/1505/comments"},"review_comments":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505/comments"},"review_comment":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/studentinsights/studentinsights/pulls/1505/commits"},"statuses":{"href":"https://api.github.com/repos/studentinsights/studentinsights/statuses/bf42efa90a12789c9bd23a45bc9ffe8b577544ff"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alexsoble"}}