{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/150947986","pull_request_review_id":76576631,"id":150947986,"diff_hunk":"@@ -89,35 +88,18 @@ export default class CollectionSettings extends React.Component {\n       });\n   }\n \n-  handleDescriptionInputChange() {\n-    const property = 'description';\n-    const setting = this.state.setting;\n-    setting[property] = true;\n-    this.setState({ error: null, setting });\n-\n-    const descriptionText = this.description.value;\n+  handleDescriptionInputChange(event) {","path":"app/collections/settings.jsx","position":null,"original_position":23,"commit_id":"6e6e7faabcfd33b7e91e80af4f2e195a213b6a18","original_commit_id":"a57527c7e3a1fedf8b950f81924981903f8937c5","user":{"login":"srallen","id":5016731,"avatar_url":"https://avatars1.githubusercontent.com/u/5016731?v=4","gravatar_id":"","url":"https://api.github.com/users/srallen","html_url":"https://github.com/srallen","followers_url":"https://api.github.com/users/srallen/followers","following_url":"https://api.github.com/users/srallen/following{/other_user}","gists_url":"https://api.github.com/users/srallen/gists{/gist_id}","starred_url":"https://api.github.com/users/srallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srallen/subscriptions","organizations_url":"https://api.github.com/users/srallen/orgs","repos_url":"https://api.github.com/users/srallen/repos","events_url":"https://api.github.com/users/srallen/events{/privacy}","received_events_url":"https://api.github.com/users/srallen/received_events","type":"User","site_admin":false},"body":"This whole method could be a bit more concise and readable. \r\nThis can be reduced to:\r\n```\r\nhandleDescriptionInputChange(event) {\r\n  const description = event.target.value;\r\n  this.setState({ description })\r\n\r\n  if (description.length <= 300) {\r\n     this.props.collection.update({ description });\r\n  }\r\n}\r\n```\r\n\r\nUsing the name attribute from an input is useful, but not necessary here since we're only concerned with updating the description. \r\n ","created_at":"2017-11-14T20:04:46Z","updated_at":"2017-11-14T20:13:57Z","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146#discussion_r150947986","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/150947986"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146#discussion_r150947986"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146","id":151763589,"html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146","diff_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146.diff","patch_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/4146","number":4146,"state":"open","locked":false,"title":"Collection description","user":{"login":"jelliotartz","id":12473119,"avatar_url":"https://avatars2.githubusercontent.com/u/12473119?v=4","gravatar_id":"","url":"https://api.github.com/users/jelliotartz","html_url":"https://github.com/jelliotartz","followers_url":"https://api.github.com/users/jelliotartz/followers","following_url":"https://api.github.com/users/jelliotartz/following{/other_user}","gists_url":"https://api.github.com/users/jelliotartz/gists{/gist_id}","starred_url":"https://api.github.com/users/jelliotartz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelliotartz/subscriptions","organizations_url":"https://api.github.com/users/jelliotartz/orgs","repos_url":"https://api.github.com/users/jelliotartz/repos","events_url":"https://api.github.com/users/jelliotartz/events{/privacy}","received_events_url":"https://api.github.com/users/jelliotartz/received_events","type":"User","site_admin":false},"body":"## Describe your changes\r\n  - Adds a description `textarea` field for a user on the CollectionsCreateForm.\r\n  - Edit functionality: user can edit a description in the CollectionSettings page.\r\n  - Display: \r\n    - Collection card name and description redesigned per discussion with @beckyrother.\r\n    - Rollover transition with hover state for collection description.\r\n  - Collection description is limited to 300 characters. `Charlimit` component added to notify user of character count as they add/edit their description.\r\n    - If the input field on the create form goes over 300 characters, the submit button is disabled.\r\n    - If the input field on the edit form goes over 300 characters, an error message is displayed beneath the field, and more text cannot be entered.\r\n  - Fixes #3469.\r\n    - Related: \r\n      - https://github.com/zooniverse/Panoptes/issues/2170.\r\n      - ES6 conversion of CollectionsCreateForm https://github.com/zooniverse/Panoptes-Front-End/pull/4133\r\n  - [Staged here](https://collection-description.pfe-preview.zooniverse.org).\r\n\r\n## RFCs\r\n  - `handleDescriptionInputChange` works in its current form, but it seems likely that it could use some optimization/refactoring.\r\n    - conditional display of error message: is there a simpler or more elegant way to accomplish this? Also, is this the UI/UX that we want?\r\n    - AutoSave and `update` API call - is there a cleaner way to handle updating? We use AutoSave on the `DisplayNameSlugEditor` field above description, so it seems logical that we should use it here as well, right? I played around with removing/changing the `.update` API call, but have not yet figured out whether it can be simplified. \r\n  - If a description is more than ~125 characters, the remaining text is not displayed (ie, it can't fit on the card, as it's currently designed). This current UI seems relatively ok to me, just thought I'd point it out in case others want to weigh in on how to handle the display of long descriptions.\r\n\r\n## TODOs\r\n  - [x] Write tests for changes/additions to CollectionsCreateForm and CollectionSettings.\r\n  - [ ] Creating a collection in a project context gets the wrong project id [(Issue#4139)](https://github.com/zooniverse/Panoptes-Front-End/issues/4139).\r\n\r\n## Review Checklist\r\n\r\n- [x] Does it work in all major browsers: Firefox, Chrome, Edge, Safari?\r\n- [x] Does it work on mobile?\r\n- [x] Can you `rm -rf node_modules/ && npm install` and app works as expected?\r\n- [x] Did you deploy a staging branch?\r\n- [x] If the component is in coffeescript, is it converted to ES6? Is it free of eslint errors? Is the conversion its own commit?\r\n- [x] Are the tests passing locally and on Travis?\r\n\r\n\r\n### Optional\r\n\r\n- [x] Have you replaced any `ChangeListener` or `PromiseRenderer` components with code that updates component state?\r\n- [x] If changes are made to the classifier, does the dev classifier still work?\r\n- [x] Have you [resized and compressed](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization) any image you've added?\r\n- [ ] Have you added in [flow type annotations](https://flowtype.org/docs/type-annotations.html)?\r\n- [x] Have you followed the [Springer guidelines for commit messages](https://github.com/springernature/frontend-playbook/blob/master/git/git.md#commit-messages)?\r\n","created_at":"2017-11-09T21:11:36Z","updated_at":"2017-11-14T20:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daa109611610f1b69783cd558fc35ff2fa0269be","assignee":{"login":"srallen","id":5016731,"avatar_url":"https://avatars1.githubusercontent.com/u/5016731?v=4","gravatar_id":"","url":"https://api.github.com/users/srallen","html_url":"https://github.com/srallen","followers_url":"https://api.github.com/users/srallen/followers","following_url":"https://api.github.com/users/srallen/following{/other_user}","gists_url":"https://api.github.com/users/srallen/gists{/gist_id}","starred_url":"https://api.github.com/users/srallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srallen/subscriptions","organizations_url":"https://api.github.com/users/srallen/orgs","repos_url":"https://api.github.com/users/srallen/repos","events_url":"https://api.github.com/users/srallen/events{/privacy}","received_events_url":"https://api.github.com/users/srallen/received_events","type":"User","site_admin":false},"assignees":[{"login":"srallen","id":5016731,"avatar_url":"https://avatars1.githubusercontent.com/u/5016731?v=4","gravatar_id":"","url":"https://api.github.com/users/srallen","html_url":"https://github.com/srallen","followers_url":"https://api.github.com/users/srallen/followers","following_url":"https://api.github.com/users/srallen/following{/other_user}","gists_url":"https://api.github.com/users/srallen/gists{/gist_id}","starred_url":"https://api.github.com/users/srallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srallen/subscriptions","organizations_url":"https://api.github.com/users/srallen/orgs","repos_url":"https://api.github.com/users/srallen/repos","events_url":"https://api.github.com/users/srallen/events{/privacy}","received_events_url":"https://api.github.com/users/srallen/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/4146/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/6e6e7faabcfd33b7e91e80af4f2e195a213b6a18","head":{"label":"zooniverse:collection-description","ref":"collection-description","sha":"6e6e7faabcfd33b7e91e80af4f2e195a213b6a18","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19498290,"name":"Panoptes-Front-End","full_name":"zooniverse/Panoptes-Front-End","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes-Front-End","description":"Front end for zooniverse/Panoptes","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","forks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/deployments","created_at":"2014-05-06T14:53:43Z","updated_at":"2017-11-10T13:32:14Z","pushed_at":"2017-11-14T19:50:56Z","git_url":"git://github.com/zooniverse/Panoptes-Front-End.git","ssh_url":"git@github.com:zooniverse/Panoptes-Front-End.git","clone_url":"https://github.com/zooniverse/Panoptes-Front-End.git","svn_url":"https://github.com/zooniverse/Panoptes-Front-End","homepage":"https://www.zooniverse.org","size":42799,"stargazers_count":40,"watchers_count":40,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":190,"forks":40,"open_issues":190,"watchers":40,"default_branch":"master"}},"base":{"label":"zooniverse:master","ref":"master","sha":"087737ad86ee10ea431ef07cb771cf5e90a0e726","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19498290,"name":"Panoptes-Front-End","full_name":"zooniverse/Panoptes-Front-End","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars2.githubusercontent.com/u/106856?v=4","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes-Front-End","description":"Front end for zooniverse/Panoptes","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","forks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/deployments","created_at":"2014-05-06T14:53:43Z","updated_at":"2017-11-10T13:32:14Z","pushed_at":"2017-11-14T19:50:56Z","git_url":"git://github.com/zooniverse/Panoptes-Front-End.git","ssh_url":"git@github.com:zooniverse/Panoptes-Front-End.git","clone_url":"https://github.com/zooniverse/Panoptes-Front-End.git","svn_url":"https://github.com/zooniverse/Panoptes-Front-End","homepage":"https://www.zooniverse.org","size":42799,"stargazers_count":40,"watchers_count":40,"language":"CoffeeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":190,"forks":40,"open_issues":190,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/4146"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/4146"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/4146/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/4146/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/6e6e7faabcfd33b7e91e80af4f2e195a213b6a18"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"srallen"}}