{"action":"created","comment":{"url":"https://api.github.com/repos/amaabca/ama_layout/pulls/comments/125526537","pull_request_review_id":47923022,"id":125526537,"diff_hunk":"@@ -0,0 +1,22 @@\n+<div class=\"off-canvas position-right right-sidebar\" id=\"offCanvasRight\" data-off-canvas>\n+  <div class=\"row column right-sidebar__header\">\n+    <h2 class=\"mt1\">Notification Centre</h2>\n+    <button class=\"close-button\" aria-label=\"Close menu\" type=\"button\" data-close>\n+      <span aria-hidden=\"true\">&times;</span>\n+    </button>\n+  </div>\n+  <div class=\"row column\">\n+    <%= navigation.notifications_heading %>\n+  </div>\n+  <%= render partial: 'ama_layout/notification', collection: notifications %>\n+  <div class=\"row column\">\n+    <p class=\"mt1\">Did You Know?</p>\n+    <div class=\"section-content\">\n+      <p class=\"bold\">Sign up for Vehicle Registration Auto-Renew</p>\n+      <p>\n+        We’ll process your payment and mail you a new registration certificate and licence plate sticker. It’s that simple!","path":"app/views/ama_layout/_notification_sidebar.html.erb","position":17,"original_position":17,"commit_id":"9d51f377eb392f7268855b0a8038175dc482d00c","original_commit_id":"9d51f377eb392f7268855b0a8038175dc482d00c","user":{"login":"jessedoyle","id":6474230,"avatar_url":"https://avatars1.githubusercontent.com/u/6474230?v=3","gravatar_id":"","url":"https://api.github.com/users/jessedoyle","html_url":"https://github.com/jessedoyle","followers_url":"https://api.github.com/users/jessedoyle/followers","following_url":"https://api.github.com/users/jessedoyle/following{/other_user}","gists_url":"https://api.github.com/users/jessedoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/jessedoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessedoyle/subscriptions","organizations_url":"https://api.github.com/users/jessedoyle/orgs","repos_url":"https://api.github.com/users/jessedoyle/repos","events_url":"https://api.github.com/users/jessedoyle/events{/privacy}","received_events_url":"https://api.github.com/users/jessedoyle/received_events","type":"User","site_admin":false},"body":"Good call! Those always sneak through!","created_at":"2017-07-04T20:22:24Z","updated_at":"2017-07-04T20:22:24Z","html_url":"https://github.com/amaabca/ama_layout/pull/205#discussion_r125526537","pull_request_url":"https://api.github.com/repos/amaabca/ama_layout/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/comments/125526537"},"html":{"href":"https://github.com/amaabca/ama_layout/pull/205#discussion_r125526537"},"pull_request":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/amaabca/ama_layout/pulls/205","id":128440998,"html_url":"https://github.com/amaabca/ama_layout/pull/205","diff_url":"https://github.com/amaabca/ama_layout/pull/205.diff","patch_url":"https://github.com/amaabca/ama_layout/pull/205.patch","issue_url":"https://api.github.com/repos/amaabca/ama_layout/issues/205","number":205,"state":"open","locked":false,"title":"VSTS 438 - User Notifications - Frontend","user":{"login":"jessedoyle","id":6474230,"avatar_url":"https://avatars1.githubusercontent.com/u/6474230?v=3","gravatar_id":"","url":"https://api.github.com/users/jessedoyle","html_url":"https://github.com/jessedoyle","followers_url":"https://api.github.com/users/jessedoyle/followers","following_url":"https://api.github.com/users/jessedoyle/following{/other_user}","gists_url":"https://api.github.com/users/jessedoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/jessedoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessedoyle/subscriptions","organizations_url":"https://api.github.com/users/jessedoyle/orgs","repos_url":"https://api.github.com/users/jessedoyle/repos","events_url":"https://api.github.com/users/jessedoyle/events{/privacy}","received_events_url":"https://api.github.com/users/jessedoyle/received_events","type":"User","site_admin":false},"body":":elephant: :art:\r\n\r\n* Add a `AmaLayout::NotificationDecorator` to handle view-specific logic for individual notifications.\r\n* Add an engine-level controller action that allows any application to dismiss all notifications via a simple API call (`DELETE /api/v1/notifications`).\r\n* Add a coffeescript `AMALayout.Notifications` class that is responsible for calling the notification dismiss API when certain user actions are triggered in the DOM.\r\n* Remove the `Rails` namespace from `AmaLayout::Rails::Engine` - it was redundant.\r\n* Add a `NotificationScrubber` that will properly and safely strip HTML nodes from the notification content before rendering it.\r\n* Add a basic `require_login` and `current_user` stub to the internal test application - we need to test behaviour that is behind a login page.\r\n* Add various partials for notifications and an off canvas notification center when logged in.\r\n* Add full test coverage for new behaviour.\r\n* Add a `delete` method to the `NotificationSet`. We need to be able to remove notifications fully when they are no longer applicable (i.e. user has already renewed).\r\n* Add a `brand` attribute to notifications. We need an easy way to select batches of similar notifications (i.e. when deleting). We could use the `SHA256` digest to do so, but then we'd have to populate all of the content of a notification. Selecting on `brand` will be simpler for most use cases. This is an optional attribute an is nilable.\r\n* Make the `lifespan` attribute not a factor into the `SHA256` digest of a notification. The default value of `1.year` in seconds changes between Rails 4 (31557600) and Rails 5.1 (31556952). We don't want the version of Rails to affect the SHA digest at all.\r\n\r\n### DEMO\r\n\r\n#### Unread Notifications in Nav Bar\r\n\r\n<img width=\"1329\" alt=\"screen shot 2017-06-30 at 2 02 03 pm\" src=\"https://user-images.githubusercontent.com/6474230/27752159-ce146a02-5d9c-11e7-9878-9328c0ed474a.png\">\r\n\r\n#### Notification Center\r\n\r\n<img width=\"1326\" alt=\"screen shot 2017-06-30 at 2 02 12 pm\" src=\"https://user-images.githubusercontent.com/6474230/27752165-d4b371e6-5d9c-11e7-83aa-205bbbe1e4fe.png\">\r\n","created_at":"2017-06-30T20:03:06Z","updated_at":"2017-07-04T20:22:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8733ce0d980975c2631c2564f9669fd764606e95","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/amaabca/ama_layout/pulls/205/commits","review_comments_url":"https://api.github.com/repos/amaabca/ama_layout/pulls/205/comments","review_comment_url":"https://api.github.com/repos/amaabca/ama_layout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amaabca/ama_layout/issues/205/comments","statuses_url":"https://api.github.com/repos/amaabca/ama_layout/statuses/9d51f377eb392f7268855b0a8038175dc482d00c","head":{"label":"amaabca:vsts-438","ref":"vsts-438","sha":"9d51f377eb392f7268855b0a8038175dc482d00c","user":{"login":"amaabca","id":1038934,"avatar_url":"https://avatars1.githubusercontent.com/u/1038934?v=3","gravatar_id":"","url":"https://api.github.com/users/amaabca","html_url":"https://github.com/amaabca","followers_url":"https://api.github.com/users/amaabca/followers","following_url":"https://api.github.com/users/amaabca/following{/other_user}","gists_url":"https://api.github.com/users/amaabca/gists{/gist_id}","starred_url":"https://api.github.com/users/amaabca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaabca/subscriptions","organizations_url":"https://api.github.com/users/amaabca/orgs","repos_url":"https://api.github.com/users/amaabca/repos","events_url":"https://api.github.com/users/amaabca/events{/privacy}","received_events_url":"https://api.github.com/users/amaabca/received_events","type":"Organization","site_admin":false},"repo":{"id":28056244,"name":"ama_layout","full_name":"amaabca/ama_layout","owner":{"login":"amaabca","id":1038934,"avatar_url":"https://avatars1.githubusercontent.com/u/1038934?v=3","gravatar_id":"","url":"https://api.github.com/users/amaabca","html_url":"https://github.com/amaabca","followers_url":"https://api.github.com/users/amaabca/followers","following_url":"https://api.github.com/users/amaabca/following{/other_user}","gists_url":"https://api.github.com/users/amaabca/gists{/gist_id}","starred_url":"https://api.github.com/users/amaabca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaabca/subscriptions","organizations_url":"https://api.github.com/users/amaabca/orgs","repos_url":"https://api.github.com/users/amaabca/repos","events_url":"https://api.github.com/users/amaabca/events{/privacy}","received_events_url":"https://api.github.com/users/amaabca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amaabca/ama_layout","description":"Layout for *.ama.ab.ca sites","fork":false,"url":"https://api.github.com/repos/amaabca/ama_layout","forks_url":"https://api.github.com/repos/amaabca/ama_layout/forks","keys_url":"https://api.github.com/repos/amaabca/ama_layout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amaabca/ama_layout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amaabca/ama_layout/teams","hooks_url":"https://api.github.com/repos/amaabca/ama_layout/hooks","issue_events_url":"https://api.github.com/repos/amaabca/ama_layout/issues/events{/number}","events_url":"https://api.github.com/repos/amaabca/ama_layout/events","assignees_url":"https://api.github.com/repos/amaabca/ama_layout/assignees{/user}","branches_url":"https://api.github.com/repos/amaabca/ama_layout/branches{/branch}","tags_url":"https://api.github.com/repos/amaabca/ama_layout/tags","blobs_url":"https://api.github.com/repos/amaabca/ama_layout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amaabca/ama_layout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amaabca/ama_layout/git/refs{/sha}","trees_url":"https://api.github.com/repos/amaabca/ama_layout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amaabca/ama_layout/statuses/{sha}","languages_url":"https://api.github.com/repos/amaabca/ama_layout/languages","stargazers_url":"https://api.github.com/repos/amaabca/ama_layout/stargazers","contributors_url":"https://api.github.com/repos/amaabca/ama_layout/contributors","subscribers_url":"https://api.github.com/repos/amaabca/ama_layout/subscribers","subscription_url":"https://api.github.com/repos/amaabca/ama_layout/subscription","commits_url":"https://api.github.com/repos/amaabca/ama_layout/commits{/sha}","git_commits_url":"https://api.github.com/repos/amaabca/ama_layout/git/commits{/sha}","comments_url":"https://api.github.com/repos/amaabca/ama_layout/comments{/number}","issue_comment_url":"https://api.github.com/repos/amaabca/ama_layout/issues/comments{/number}","contents_url":"https://api.github.com/repos/amaabca/ama_layout/contents/{+path}","compare_url":"https://api.github.com/repos/amaabca/ama_layout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amaabca/ama_layout/merges","archive_url":"https://api.github.com/repos/amaabca/ama_layout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amaabca/ama_layout/downloads","issues_url":"https://api.github.com/repos/amaabca/ama_layout/issues{/number}","pulls_url":"https://api.github.com/repos/amaabca/ama_layout/pulls{/number}","milestones_url":"https://api.github.com/repos/amaabca/ama_layout/milestones{/number}","notifications_url":"https://api.github.com/repos/amaabca/ama_layout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amaabca/ama_layout/labels{/name}","releases_url":"https://api.github.com/repos/amaabca/ama_layout/releases{/id}","deployments_url":"https://api.github.com/repos/amaabca/ama_layout/deployments","created_at":"2014-12-15T21:05:45Z","updated_at":"2017-02-28T18:21:15Z","pushed_at":"2017-07-04T20:09:07Z","git_url":"git://github.com/amaabca/ama_layout.git","ssh_url":"git@github.com:amaabca/ama_layout.git","clone_url":"https://github.com/amaabca/ama_layout.git","svn_url":"https://github.com/amaabca/ama_layout","homepage":"","size":1868,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"amaabca:master","ref":"master","sha":"369d62bff17a5c07d0dc0e002b10e43e838b6835","user":{"login":"amaabca","id":1038934,"avatar_url":"https://avatars1.githubusercontent.com/u/1038934?v=3","gravatar_id":"","url":"https://api.github.com/users/amaabca","html_url":"https://github.com/amaabca","followers_url":"https://api.github.com/users/amaabca/followers","following_url":"https://api.github.com/users/amaabca/following{/other_user}","gists_url":"https://api.github.com/users/amaabca/gists{/gist_id}","starred_url":"https://api.github.com/users/amaabca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaabca/subscriptions","organizations_url":"https://api.github.com/users/amaabca/orgs","repos_url":"https://api.github.com/users/amaabca/repos","events_url":"https://api.github.com/users/amaabca/events{/privacy}","received_events_url":"https://api.github.com/users/amaabca/received_events","type":"Organization","site_admin":false},"repo":{"id":28056244,"name":"ama_layout","full_name":"amaabca/ama_layout","owner":{"login":"amaabca","id":1038934,"avatar_url":"https://avatars1.githubusercontent.com/u/1038934?v=3","gravatar_id":"","url":"https://api.github.com/users/amaabca","html_url":"https://github.com/amaabca","followers_url":"https://api.github.com/users/amaabca/followers","following_url":"https://api.github.com/users/amaabca/following{/other_user}","gists_url":"https://api.github.com/users/amaabca/gists{/gist_id}","starred_url":"https://api.github.com/users/amaabca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaabca/subscriptions","organizations_url":"https://api.github.com/users/amaabca/orgs","repos_url":"https://api.github.com/users/amaabca/repos","events_url":"https://api.github.com/users/amaabca/events{/privacy}","received_events_url":"https://api.github.com/users/amaabca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amaabca/ama_layout","description":"Layout for *.ama.ab.ca sites","fork":false,"url":"https://api.github.com/repos/amaabca/ama_layout","forks_url":"https://api.github.com/repos/amaabca/ama_layout/forks","keys_url":"https://api.github.com/repos/amaabca/ama_layout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amaabca/ama_layout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amaabca/ama_layout/teams","hooks_url":"https://api.github.com/repos/amaabca/ama_layout/hooks","issue_events_url":"https://api.github.com/repos/amaabca/ama_layout/issues/events{/number}","events_url":"https://api.github.com/repos/amaabca/ama_layout/events","assignees_url":"https://api.github.com/repos/amaabca/ama_layout/assignees{/user}","branches_url":"https://api.github.com/repos/amaabca/ama_layout/branches{/branch}","tags_url":"https://api.github.com/repos/amaabca/ama_layout/tags","blobs_url":"https://api.github.com/repos/amaabca/ama_layout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amaabca/ama_layout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amaabca/ama_layout/git/refs{/sha}","trees_url":"https://api.github.com/repos/amaabca/ama_layout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amaabca/ama_layout/statuses/{sha}","languages_url":"https://api.github.com/repos/amaabca/ama_layout/languages","stargazers_url":"https://api.github.com/repos/amaabca/ama_layout/stargazers","contributors_url":"https://api.github.com/repos/amaabca/ama_layout/contributors","subscribers_url":"https://api.github.com/repos/amaabca/ama_layout/subscribers","subscription_url":"https://api.github.com/repos/amaabca/ama_layout/subscription","commits_url":"https://api.github.com/repos/amaabca/ama_layout/commits{/sha}","git_commits_url":"https://api.github.com/repos/amaabca/ama_layout/git/commits{/sha}","comments_url":"https://api.github.com/repos/amaabca/ama_layout/comments{/number}","issue_comment_url":"https://api.github.com/repos/amaabca/ama_layout/issues/comments{/number}","contents_url":"https://api.github.com/repos/amaabca/ama_layout/contents/{+path}","compare_url":"https://api.github.com/repos/amaabca/ama_layout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amaabca/ama_layout/merges","archive_url":"https://api.github.com/repos/amaabca/ama_layout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amaabca/ama_layout/downloads","issues_url":"https://api.github.com/repos/amaabca/ama_layout/issues{/number}","pulls_url":"https://api.github.com/repos/amaabca/ama_layout/pulls{/number}","milestones_url":"https://api.github.com/repos/amaabca/ama_layout/milestones{/number}","notifications_url":"https://api.github.com/repos/amaabca/ama_layout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amaabca/ama_layout/labels{/name}","releases_url":"https://api.github.com/repos/amaabca/ama_layout/releases{/id}","deployments_url":"https://api.github.com/repos/amaabca/ama_layout/deployments","created_at":"2014-12-15T21:05:45Z","updated_at":"2017-02-28T18:21:15Z","pushed_at":"2017-07-04T20:09:07Z","git_url":"git://github.com/amaabca/ama_layout.git","ssh_url":"git@github.com:amaabca/ama_layout.git","clone_url":"https://github.com/amaabca/ama_layout.git","svn_url":"https://github.com/amaabca/ama_layout","homepage":"","size":1868,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/205"},"html":{"href":"https://github.com/amaabca/ama_layout/pull/205"},"issue":{"href":"https://api.github.com/repos/amaabca/ama_layout/issues/205"},"comments":{"href":"https://api.github.com/repos/amaabca/ama_layout/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amaabca/ama_layout/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/amaabca/ama_layout/statuses/9d51f377eb392f7268855b0a8038175dc482d00c"}}}}
{"actor":{"display_login":"jessedoyle"}}