{"action":"created","issue":{"url":"https://api.github.com/repos/leb2dg/osf.io/issues/14","repository_url":"https://api.github.com/repos/leb2dg/osf.io","labels_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14/comments","events_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14/events","html_url":"https://github.com/leb2dg/osf.io/pull/14","id":151410614,"number":14,"title":"[feature] @ mentions and notifications [OSF-5975][OSF-5658]","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-27T15:09:58Z","updated_at":"2016-06-14T20:54:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/leb2dg/osf.io/pulls/14","html_url":"https://github.com/leb2dg/osf.io/pull/14","diff_url":"https://github.com/leb2dg/osf.io/pull/14.diff","patch_url":"https://github.com/leb2dg/osf.io/pull/14.patch"},"body":"Cleaner version of https://github.com/CenterForOpenScience/osf.io/pull/5518\r\n\r\n## Purpose\r\nAdd functionality for @/+ mention of contributors in comments. Only confirmed contributors, both bibliographic and non-bibliographic, can be mentioned.\r\n\r\nRelated tickets: https://openscience.atlassian.net/browse/OSF-5658 & https://openscience.atlassian.net/browse/OSF-5975\r\n\r\n## Changes\r\n* @ symbol or + triggers dropdown where user can select the full name of a contributor to mention them in a comment\r\n* At mention names appear as a link to the mentioned contributor\r\n* Email notifications are sent to contributors who are mentioned but are grouped if user would receive multiple for one event i.e. new comment and mention\r\n* An error message is shown and the submit button is disabled if a comment is over 500 characters but the validator on the model allows up to 1000 characters\r\n    * padding is added to the model validator to account for html elements that are converted to markdown before they are saved\r\n\r\nMentioning a contributor:\r\n![screen shot 2016-04-19 at 2 05 06 pm](https://cloud.githubusercontent.com/assets/7131985/14650020/d5107048-0637-11e6-97b4-6ca8e8d65084.png)\r\n\r\nEntering a comment longer than 500 characters:\r\n![screen shot 2016-04-19 at 2 04 36 pm](https://cloud.githubusercontent.com/assets/7131985/14650019/d506f34c-0637-11e6-99d5-54764dfb5ffd.png)\r\n\r\n## Possible additions\r\n* Emojis PR #5418 \r\n\r\n## Side Effects\r\n* change comments template from textareas to ContentEditable divs \r\n    * support keeping track of users who have been mentioned\r\n    * does not allow partial deletion of the mention\r\n    * can cause some unexpected behavior with pasting/arrow keys/enter\r\n* add dependency At.js\r\n    * provide @/+ functionality\r\n* add new_mentions & old_mentions to the comment model\r\n    * support determining who is a new mention after editing so contributors are not notified multiple times for the same comment\r\n   * new_mentions is a required field so it must be passed as an attribute or the request will fail\r\n* add new notification types and email templates\r\n    * mention notifications can occur on creation or on edit while comments only notify subscribers on creation\r\n   * comments and mentions have different notification settings\r\n   * currently the mentions are all of the 'email_transactional' notification_type\r\n* a user could submit a comment with up to 1000 characters using the API"},"comment":{"url":"https://api.github.com/repos/leb2dg/osf.io/issues/comments/226013170","html_url":"https://github.com/leb2dg/osf.io/pull/14#issuecomment-226013170","issue_url":"https://api.github.com/repos/leb2dg/osf.io/issues/14","id":226013170,"user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T20:54:42Z","updated_at":"2016-06-14T20:54:42Z","body":"> Global notifications has been merged\r\n\r\nWoo-hoo! 💃 "}}
{"actor":{"display_login":"whit537"}}