{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-emails/pulls/comments/53454227","id":53454227,"diff_hunk":"@@ -127,11 +128,12 @@ module.exports = MailsInput = React.createClass\n             else\n                 event.dataTransfer.dropEffect = 'none'\n \n+        # Show field if results\n+        className += ' shown' if @state.focus\n+\n         # don't display placeholder if there are dests\n-        if knownContacts.length > 0\n-            placeholder = ''\n-        else\n-            placeholder = @props.placeholder\n+        hasNoContact = _.isEmpty knownContacts\n+        placeholder = unless hasNoContact then '' else @props.placeholder","path":"client/app/components/mails_input.coffee","position":35,"original_position":35,"commit_id":"0d286ca20eb6d7590d3c8a024ff93063a99e7365","original_commit_id":"0d286ca20eb6d7590d3c8a024ff93063a99e7365","user":{"login":"aenario","id":1580287,"avatar_url":"https://avatars.githubusercontent.com/u/1580287?v=3","gravatar_id":"","url":"https://api.github.com/users/aenario","html_url":"https://github.com/aenario","followers_url":"https://api.github.com/users/aenario/followers","following_url":"https://api.github.com/users/aenario/following{/other_user}","gists_url":"https://api.github.com/users/aenario/gists{/gist_id}","starred_url":"https://api.github.com/users/aenario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aenario/subscriptions","organizations_url":"https://api.github.com/users/aenario/orgs","repos_url":"https://api.github.com/users/aenario/repos","events_url":"https://api.github.com/users/aenario/events{/privacy}","received_events_url":"https://api.github.com/users/aenario/received_events","type":"User","site_admin":false},"body":"`if ... then ... else` is more readable than `unless ... then ... else`","created_at":"2016-02-19T12:18:32Z","updated_at":"2016-02-19T12:18:32Z","html_url":"https://github.com/cozy/cozy-emails/pull/747#discussion_r53454227","pull_request_url":"https://api.github.com/repos/cozy/cozy-emails/pulls/747","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/comments/53454227"},"html":{"href":"https://github.com/cozy/cozy-emails/pull/747#discussion_r53454227"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/747"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-emails/pulls/747","id":59475253,"html_url":"https://github.com/cozy/cozy-emails/pull/747","diff_url":"https://github.com/cozy/cozy-emails/pull/747.diff","patch_url":"https://github.com/cozy/cozy-emails/pull/747.patch","issue_url":"https://api.github.com/repos/cozy/cozy-emails/issues/747","number":747,"state":"open","locked":false,"title":"Autosave create un-useless draft ","user":{"login":"misstick","id":1177627,"avatar_url":"https://avatars.githubusercontent.com/u/1177627?v=3","gravatar_id":"","url":"https://api.github.com/users/misstick","html_url":"https://github.com/misstick","followers_url":"https://api.github.com/users/misstick/followers","following_url":"https://api.github.com/users/misstick/following{/other_user}","gists_url":"https://api.github.com/users/misstick/gists{/gist_id}","starred_url":"https://api.github.com/users/misstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misstick/subscriptions","organizations_url":"https://api.github.com/users/misstick/orgs","repos_url":"https://api.github.com/users/misstick/repos","events_url":"https://api.github.com/users/misstick/events{/privacy}","received_events_url":"https://api.github.com/users/misstick/received_events","type":"User","site_admin":false},"body":"## Use cases\r\n\r\n## Creating a new message\r\nWhen I click on 'compose' : \r\n - an empty draft is displayed\r\n\r\nWhen I change the fields : to, cc, ccc, subject, message, attachment,\r\n - [x] message is saved on client,\r\n - [x] message is saved on server.\r\n - [x] a draft is created on 1st save,\r\n - [x] DO not create empty message\r\n\r\n## Updating message in Drafts\r\nI choose 'Draft' MailBox, and I click on a message in the list\r\n - [x] ComposeView is displayed with the right data\r\n\r\nWhen I change the fields : to, cc, ccc, subject, message, attachment,\r\n - [x] message is saved on client,\r\n - [x] message is saved on server.\r\n - [x] a draft is created on 1st save,\r\n - [x] that draft is updated on other save\r\n\r\n## Create message : Display ModalBox\r\n I save data when the component is unmounted \r\n - [x] I show Modal when there are differences between client and server data\r\n - [x] nothing happen if I saved draft before component is unmounted\r\n\r\n## Edit draft message : Display ModalBox\r\n I save data when the component is unmounted \r\n - [x] I show Modal when there are differences between client and server data\r\n - [x] nothing happen if I saved draft before component is unmounted\r\n\r\nWhen I click on a draft into the list and click on another draft :\r\n - [x] `subject` is updated\r\n - [x] `cc` is updated\r\n - [x] `bcc` is updated\r\n - [x] `content` is updated\r\n\r\nThen I click on `cc` (field `cc` is visible) and change the draft selection :\r\n - [x] `cc` is hidden\r\n\r\nThen I click on `bcc` (field `cc` is visible) and change the draft selection :\r\n - [x] `bcc` is hidden\r\n\r\n## Basic message feature\r\n - [x] toggle between `cc`and `bcc` fields,\r\n - [x] attachements : add, remove, save,\r\n - [x] HTML text is style HTML,\r\n - [x] picture is still a picture","created_at":"2016-02-16T11:08:58Z","updated_at":"2016-02-19T12:18:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f008bf20d8a39a9373a79d800d0b599b51d4723","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-emails/pulls/747/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-emails/pulls/747/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-emails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-emails/issues/747/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-emails/statuses/0d286ca20eb6d7590d3c8a024ff93063a99e7365","head":{"label":"misstick:fix-autosave","ref":"fix-autosave","sha":"0d286ca20eb6d7590d3c8a024ff93063a99e7365","user":{"login":"misstick","id":1177627,"avatar_url":"https://avatars.githubusercontent.com/u/1177627?v=3","gravatar_id":"","url":"https://api.github.com/users/misstick","html_url":"https://github.com/misstick","followers_url":"https://api.github.com/users/misstick/followers","following_url":"https://api.github.com/users/misstick/following{/other_user}","gists_url":"https://api.github.com/users/misstick/gists{/gist_id}","starred_url":"https://api.github.com/users/misstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misstick/subscriptions","organizations_url":"https://api.github.com/users/misstick/orgs","repos_url":"https://api.github.com/users/misstick/repos","events_url":"https://api.github.com/users/misstick/events{/privacy}","received_events_url":"https://api.github.com/users/misstick/received_events","type":"User","site_admin":false},"repo":{"id":51353782,"name":"cozy-emails","full_name":"misstick/cozy-emails","owner":{"login":"misstick","id":1177627,"avatar_url":"https://avatars.githubusercontent.com/u/1177627?v=3","gravatar_id":"","url":"https://api.github.com/users/misstick","html_url":"https://github.com/misstick","followers_url":"https://api.github.com/users/misstick/followers","following_url":"https://api.github.com/users/misstick/following{/other_user}","gists_url":"https://api.github.com/users/misstick/gists{/gist_id}","starred_url":"https://api.github.com/users/misstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misstick/subscriptions","organizations_url":"https://api.github.com/users/misstick/orgs","repos_url":"https://api.github.com/users/misstick/repos","events_url":"https://api.github.com/users/misstick/events{/privacy}","received_events_url":"https://api.github.com/users/misstick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/misstick/cozy-emails","description":"Email Client for Cozy","fork":true,"url":"https://api.github.com/repos/misstick/cozy-emails","forks_url":"https://api.github.com/repos/misstick/cozy-emails/forks","keys_url":"https://api.github.com/repos/misstick/cozy-emails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/misstick/cozy-emails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/misstick/cozy-emails/teams","hooks_url":"https://api.github.com/repos/misstick/cozy-emails/hooks","issue_events_url":"https://api.github.com/repos/misstick/cozy-emails/issues/events{/number}","events_url":"https://api.github.com/repos/misstick/cozy-emails/events","assignees_url":"https://api.github.com/repos/misstick/cozy-emails/assignees{/user}","branches_url":"https://api.github.com/repos/misstick/cozy-emails/branches{/branch}","tags_url":"https://api.github.com/repos/misstick/cozy-emails/tags","blobs_url":"https://api.github.com/repos/misstick/cozy-emails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/misstick/cozy-emails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/misstick/cozy-emails/git/refs{/sha}","trees_url":"https://api.github.com/repos/misstick/cozy-emails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/misstick/cozy-emails/statuses/{sha}","languages_url":"https://api.github.com/repos/misstick/cozy-emails/languages","stargazers_url":"https://api.github.com/repos/misstick/cozy-emails/stargazers","contributors_url":"https://api.github.com/repos/misstick/cozy-emails/contributors","subscribers_url":"https://api.github.com/repos/misstick/cozy-emails/subscribers","subscription_url":"https://api.github.com/repos/misstick/cozy-emails/subscription","commits_url":"https://api.github.com/repos/misstick/cozy-emails/commits{/sha}","git_commits_url":"https://api.github.com/repos/misstick/cozy-emails/git/commits{/sha}","comments_url":"https://api.github.com/repos/misstick/cozy-emails/comments{/number}","issue_comment_url":"https://api.github.com/repos/misstick/cozy-emails/issues/comments{/number}","contents_url":"https://api.github.com/repos/misstick/cozy-emails/contents/{+path}","compare_url":"https://api.github.com/repos/misstick/cozy-emails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/misstick/cozy-emails/merges","archive_url":"https://api.github.com/repos/misstick/cozy-emails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/misstick/cozy-emails/downloads","issues_url":"https://api.github.com/repos/misstick/cozy-emails/issues{/number}","pulls_url":"https://api.github.com/repos/misstick/cozy-emails/pulls{/number}","milestones_url":"https://api.github.com/repos/misstick/cozy-emails/milestones{/number}","notifications_url":"https://api.github.com/repos/misstick/cozy-emails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/misstick/cozy-emails/labels{/name}","releases_url":"https://api.github.com/repos/misstick/cozy-emails/releases{/id}","deployments_url":"https://api.github.com/repos/misstick/cozy-emails/deployments","created_at":"2016-02-09T08:02:10Z","updated_at":"2016-02-09T08:02:12Z","pushed_at":"2016-02-19T12:03:49Z","git_url":"git://github.com/misstick/cozy-emails.git","ssh_url":"git@github.com:misstick/cozy-emails.git","clone_url":"https://github.com/misstick/cozy-emails.git","svn_url":"https://github.com/misstick/cozy-emails","homepage":"","size":39881,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cozy:development","ref":"development","sha":"cbe3f90ee6202e8260bf9573932c54693e1b75c2","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":21939095,"name":"cozy-emails","full_name":"cozy/cozy-emails","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-emails","description":"Email Client for Cozy","fork":false,"url":"https://api.github.com/repos/cozy/cozy-emails","forks_url":"https://api.github.com/repos/cozy/cozy-emails/forks","keys_url":"https://api.github.com/repos/cozy/cozy-emails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-emails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-emails/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-emails/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-emails/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-emails/events","assignees_url":"https://api.github.com/repos/cozy/cozy-emails/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-emails/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-emails/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-emails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-emails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-emails/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-emails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-emails/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-emails/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-emails/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-emails/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-emails/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-emails/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-emails/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-emails/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-emails/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-emails/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-emails/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-emails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-emails/merges","archive_url":"https://api.github.com/repos/cozy/cozy-emails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-emails/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-emails/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-emails/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-emails/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-emails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-emails/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-emails/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-emails/deployments","created_at":"2014-07-17T11:17:51Z","updated_at":"2016-02-10T14:57:18Z","pushed_at":"2016-02-19T12:03:49Z","git_url":"git://github.com/cozy/cozy-emails.git","ssh_url":"git@github.com:cozy/cozy-emails.git","clone_url":"https://github.com/cozy/cozy-emails.git","svn_url":"https://github.com/cozy/cozy-emails","homepage":"","size":39984,"stargazers_count":38,"watchers_count":38,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":115,"forks":26,"open_issues":115,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/747"},"html":{"href":"https://github.com/cozy/cozy-emails/pull/747"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-emails/issues/747"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-emails/issues/747/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/747/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-emails/pulls/747/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-emails/statuses/0d286ca20eb6d7590d3c8a024ff93063a99e7365"}}}}