{"action":"created","comment":{"url":"https://api.github.com/repos/Octember/the-approach/pulls/comments/169158168","pull_request_review_id":97640212,"id":169158168,"diff_hunk":"@@ -9,33 +9,69 @@ import PropTypes from 'prop-types';\n import { connect } from 'react-redux';\n import { createStructuredSelector } from 'reselect';\n import { compose } from 'redux';\n-import Select from 'react-select';\n-import Header from 'components/Header';\n-import PageSection from 'components/PageSection';\n-import BorderBottomDiv from 'components/shared/BorderBottomDiv';\n-import Stars from 'components/Stars';\n import injectReducer from 'utils/injectReducer';\n import injectSaga from 'utils/injectSaga';\n \n-import 'react-select/dist/react-select.css';\n-\n-import { locationList, selectedLocationChange } from './actions';\n-import { selectLocationList, selectSelectedLocationId } from './selectors';\n+import { locationList, guideList, selectedLocationChange } from './actions';\n+import { selectLocationList, selectGuideList, selectSelectedLocationId } from './selectors';\n import reducer from './reducer';\n import saga from './saga';\n \n+import Helmet from 'react-helmet'\n+\n+import Header from 'components/Header';\n+import PageSection from 'components/PageSection';\n+import BorderBottomDiv from 'components/shared/BorderBottomDiv';\n+import Select from 'components/Select';\n+import Stars from 'components/Stars';\n+import GuideReviewForm from 'components/GuideReviewForm';\n+\n export class WriteReviewPage extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function\n \n   constructor(props) {\n     super(props);\n-\n+    this.handleDetailsChange = this.handleDetailsChange.bind(this);\n+    this.handleConfirmGuided = this.handleConfirmGuided.bind(this);\n+    this.handleSelectGuideId = this.handleSelectGuideId.bind(this);\n     this.handleSubmit = this.handleSubmit.bind(this);\n+\n+    // State should contain form data for easy validation and submit.\n+    this.state = {\n+      // Should figure out a way to pass selectedId props based on a review page we're on\n+      selectedLocationId: props.selectedLocationId ? props.selectedLocationId : null,\n+      tripRating: 0,\n+      details: '',\n+      selectedGuideId: props.selectedGuideId ? props.selectedGuideId : null,\n+      guideRating: 0,\n+    }\n   }\n \n   componentDidMount() {\n+    // API call\n     this.props.requestLocationList();\n   }\n \n+  handleDetailsChange(e) {\n+    this.setState({ details: e.target.value });","path":"app/containers/WriteReviewPage/index.js","position":57,"original_position":57,"commit_id":"74c8d94d500888d463400c6c1126d3c184af6a96","original_commit_id":"74c8d94d500888d463400c6c1126d3c184af6a96","user":{"login":"Octember","id":667653,"avatar_url":"https://avatars2.githubusercontent.com/u/667653?v=4","gravatar_id":"","url":"https://api.github.com/users/Octember","html_url":"https://github.com/Octember","followers_url":"https://api.github.com/users/Octember/followers","following_url":"https://api.github.com/users/Octember/following{/other_user}","gists_url":"https://api.github.com/users/Octember/gists{/gist_id}","starred_url":"https://api.github.com/users/Octember/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Octember/subscriptions","organizations_url":"https://api.github.com/users/Octember/orgs","repos_url":"https://api.github.com/users/Octember/repos","events_url":"https://api.github.com/users/Octember/events{/privacy}","received_events_url":"https://api.github.com/users/Octember/received_events","type":"User","site_admin":false},"body":"This will overwrite all state!! This is a big bug.\r\n\r\nRepro: Click a star rating. Then fill out any text in the details section. It kills the star rating!\r\n\r\nPlease never call setState without copying current state. This is a good example for why I lean redux for things like this. It makes state harder to fuck up","created_at":"2018-02-19T19:35:40Z","updated_at":"2018-02-19T19:35:40Z","html_url":"https://github.com/Octember/the-approach/pull/39#discussion_r169158168","pull_request_url":"https://api.github.com/repos/Octember/the-approach/pulls/39","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/comments/169158168"},"html":{"href":"https://github.com/Octember/the-approach/pull/39#discussion_r169158168"},"pull_request":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/Octember/the-approach/pulls/39","id":169879454,"html_url":"https://github.com/Octember/the-approach/pull/39","diff_url":"https://github.com/Octember/the-approach/pull/39.diff","patch_url":"https://github.com/Octember/the-approach/pull/39.patch","issue_url":"https://api.github.com/repos/Octember/the-approach/issues/39","number":39,"state":"open","locked":false,"title":"Review guide component","user":{"login":"RyuGuardian","id":13077199,"avatar_url":"https://avatars3.githubusercontent.com/u/13077199?v=4","gravatar_id":"","url":"https://api.github.com/users/RyuGuardian","html_url":"https://github.com/RyuGuardian","followers_url":"https://api.github.com/users/RyuGuardian/followers","following_url":"https://api.github.com/users/RyuGuardian/following{/other_user}","gists_url":"https://api.github.com/users/RyuGuardian/gists{/gist_id}","starred_url":"https://api.github.com/users/RyuGuardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyuGuardian/subscriptions","organizations_url":"https://api.github.com/users/RyuGuardian/orgs","repos_url":"https://api.github.com/users/RyuGuardian/repos","events_url":"https://api.github.com/users/RyuGuardian/events{/privacy}","received_events_url":"https://api.github.com/users/RyuGuardian/received_events","type":"User","site_admin":false},"body":"Took longer than expected, and changed more form-page code than just the scope of guide review. Still working with Stars component so it actually saves values; it's been super finicky.","created_at":"2018-02-19T05:11:57Z","updated_at":"2018-02-19T19:35:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"819a35a5d60ef5f73abf212a59e0fa7721787867","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Octember/the-approach/pulls/39/commits","review_comments_url":"https://api.github.com/repos/Octember/the-approach/pulls/39/comments","review_comment_url":"https://api.github.com/repos/Octember/the-approach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Octember/the-approach/issues/39/comments","statuses_url":"https://api.github.com/repos/Octember/the-approach/statuses/74c8d94d500888d463400c6c1126d3c184af6a96","head":{"label":"Octember:review-guide-component","ref":"review-guide-component","sha":"74c8d94d500888d463400c6c1126d3c184af6a96","user":{"login":"Octember","id":667653,"avatar_url":"https://avatars2.githubusercontent.com/u/667653?v=4","gravatar_id":"","url":"https://api.github.com/users/Octember","html_url":"https://github.com/Octember","followers_url":"https://api.github.com/users/Octember/followers","following_url":"https://api.github.com/users/Octember/following{/other_user}","gists_url":"https://api.github.com/users/Octember/gists{/gist_id}","starred_url":"https://api.github.com/users/Octember/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Octember/subscriptions","organizations_url":"https://api.github.com/users/Octember/orgs","repos_url":"https://api.github.com/users/Octember/repos","events_url":"https://api.github.com/users/Octember/events{/privacy}","received_events_url":"https://api.github.com/users/Octember/received_events","type":"User","site_admin":false},"repo":{"id":113700558,"name":"the-approach","full_name":"Octember/the-approach","owner":{"login":"Octember","id":667653,"avatar_url":"https://avatars2.githubusercontent.com/u/667653?v=4","gravatar_id":"","url":"https://api.github.com/users/Octember","html_url":"https://github.com/Octember","followers_url":"https://api.github.com/users/Octember/followers","following_url":"https://api.github.com/users/Octember/following{/other_user}","gists_url":"https://api.github.com/users/Octember/gists{/gist_id}","starred_url":"https://api.github.com/users/Octember/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Octember/subscriptions","organizations_url":"https://api.github.com/users/Octember/orgs","repos_url":"https://api.github.com/users/Octember/repos","events_url":"https://api.github.com/users/Octember/events{/privacy}","received_events_url":"https://api.github.com/users/Octember/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Octember/the-approach","description":null,"fork":false,"url":"https://api.github.com/repos/Octember/the-approach","forks_url":"https://api.github.com/repos/Octember/the-approach/forks","keys_url":"https://api.github.com/repos/Octember/the-approach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Octember/the-approach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Octember/the-approach/teams","hooks_url":"https://api.github.com/repos/Octember/the-approach/hooks","issue_events_url":"https://api.github.com/repos/Octember/the-approach/issues/events{/number}","events_url":"https://api.github.com/repos/Octember/the-approach/events","assignees_url":"https://api.github.com/repos/Octember/the-approach/assignees{/user}","branches_url":"https://api.github.com/repos/Octember/the-approach/branches{/branch}","tags_url":"https://api.github.com/repos/Octember/the-approach/tags","blobs_url":"https://api.github.com/repos/Octember/the-approach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Octember/the-approach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Octember/the-approach/git/refs{/sha}","trees_url":"https://api.github.com/repos/Octember/the-approach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Octember/the-approach/statuses/{sha}","languages_url":"https://api.github.com/repos/Octember/the-approach/languages","stargazers_url":"https://api.github.com/repos/Octember/the-approach/stargazers","contributors_url":"https://api.github.com/repos/Octember/the-approach/contributors","subscribers_url":"https://api.github.com/repos/Octember/the-approach/subscribers","subscription_url":"https://api.github.com/repos/Octember/the-approach/subscription","commits_url":"https://api.github.com/repos/Octember/the-approach/commits{/sha}","git_commits_url":"https://api.github.com/repos/Octember/the-approach/git/commits{/sha}","comments_url":"https://api.github.com/repos/Octember/the-approach/comments{/number}","issue_comment_url":"https://api.github.com/repos/Octember/the-approach/issues/comments{/number}","contents_url":"https://api.github.com/repos/Octember/the-approach/contents/{+path}","compare_url":"https://api.github.com/repos/Octember/the-approach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Octember/the-approach/merges","archive_url":"https://api.github.com/repos/Octember/the-approach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Octember/the-approach/downloads","issues_url":"https://api.github.com/repos/Octember/the-approach/issues{/number}","pulls_url":"https://api.github.com/repos/Octember/the-approach/pulls{/number}","milestones_url":"https://api.github.com/repos/Octember/the-approach/milestones{/number}","notifications_url":"https://api.github.com/repos/Octember/the-approach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Octember/the-approach/labels{/name}","releases_url":"https://api.github.com/repos/Octember/the-approach/releases{/id}","deployments_url":"https://api.github.com/repos/Octember/the-approach/deployments","created_at":"2017-12-09T20:54:16Z","updated_at":"2017-12-09T20:54:42Z","pushed_at":"2018-02-19T05:11:57Z","git_url":"git://github.com/Octember/the-approach.git","ssh_url":"git@github.com:Octember/the-approach.git","clone_url":"https://github.com/Octember/the-approach.git","svn_url":"https://github.com/Octember/the-approach","homepage":null,"size":1154,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Octember:master","ref":"master","sha":"778a4ffc3cc44d6585d4e02a763eef12725add3e","user":{"login":"Octember","id":667653,"avatar_url":"https://avatars2.githubusercontent.com/u/667653?v=4","gravatar_id":"","url":"https://api.github.com/users/Octember","html_url":"https://github.com/Octember","followers_url":"https://api.github.com/users/Octember/followers","following_url":"https://api.github.com/users/Octember/following{/other_user}","gists_url":"https://api.github.com/users/Octember/gists{/gist_id}","starred_url":"https://api.github.com/users/Octember/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Octember/subscriptions","organizations_url":"https://api.github.com/users/Octember/orgs","repos_url":"https://api.github.com/users/Octember/repos","events_url":"https://api.github.com/users/Octember/events{/privacy}","received_events_url":"https://api.github.com/users/Octember/received_events","type":"User","site_admin":false},"repo":{"id":113700558,"name":"the-approach","full_name":"Octember/the-approach","owner":{"login":"Octember","id":667653,"avatar_url":"https://avatars2.githubusercontent.com/u/667653?v=4","gravatar_id":"","url":"https://api.github.com/users/Octember","html_url":"https://github.com/Octember","followers_url":"https://api.github.com/users/Octember/followers","following_url":"https://api.github.com/users/Octember/following{/other_user}","gists_url":"https://api.github.com/users/Octember/gists{/gist_id}","starred_url":"https://api.github.com/users/Octember/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Octember/subscriptions","organizations_url":"https://api.github.com/users/Octember/orgs","repos_url":"https://api.github.com/users/Octember/repos","events_url":"https://api.github.com/users/Octember/events{/privacy}","received_events_url":"https://api.github.com/users/Octember/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Octember/the-approach","description":null,"fork":false,"url":"https://api.github.com/repos/Octember/the-approach","forks_url":"https://api.github.com/repos/Octember/the-approach/forks","keys_url":"https://api.github.com/repos/Octember/the-approach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Octember/the-approach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Octember/the-approach/teams","hooks_url":"https://api.github.com/repos/Octember/the-approach/hooks","issue_events_url":"https://api.github.com/repos/Octember/the-approach/issues/events{/number}","events_url":"https://api.github.com/repos/Octember/the-approach/events","assignees_url":"https://api.github.com/repos/Octember/the-approach/assignees{/user}","branches_url":"https://api.github.com/repos/Octember/the-approach/branches{/branch}","tags_url":"https://api.github.com/repos/Octember/the-approach/tags","blobs_url":"https://api.github.com/repos/Octember/the-approach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Octember/the-approach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Octember/the-approach/git/refs{/sha}","trees_url":"https://api.github.com/repos/Octember/the-approach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Octember/the-approach/statuses/{sha}","languages_url":"https://api.github.com/repos/Octember/the-approach/languages","stargazers_url":"https://api.github.com/repos/Octember/the-approach/stargazers","contributors_url":"https://api.github.com/repos/Octember/the-approach/contributors","subscribers_url":"https://api.github.com/repos/Octember/the-approach/subscribers","subscription_url":"https://api.github.com/repos/Octember/the-approach/subscription","commits_url":"https://api.github.com/repos/Octember/the-approach/commits{/sha}","git_commits_url":"https://api.github.com/repos/Octember/the-approach/git/commits{/sha}","comments_url":"https://api.github.com/repos/Octember/the-approach/comments{/number}","issue_comment_url":"https://api.github.com/repos/Octember/the-approach/issues/comments{/number}","contents_url":"https://api.github.com/repos/Octember/the-approach/contents/{+path}","compare_url":"https://api.github.com/repos/Octember/the-approach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Octember/the-approach/merges","archive_url":"https://api.github.com/repos/Octember/the-approach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Octember/the-approach/downloads","issues_url":"https://api.github.com/repos/Octember/the-approach/issues{/number}","pulls_url":"https://api.github.com/repos/Octember/the-approach/pulls{/number}","milestones_url":"https://api.github.com/repos/Octember/the-approach/milestones{/number}","notifications_url":"https://api.github.com/repos/Octember/the-approach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Octember/the-approach/labels{/name}","releases_url":"https://api.github.com/repos/Octember/the-approach/releases{/id}","deployments_url":"https://api.github.com/repos/Octember/the-approach/deployments","created_at":"2017-12-09T20:54:16Z","updated_at":"2017-12-09T20:54:42Z","pushed_at":"2018-02-19T05:11:57Z","git_url":"git://github.com/Octember/the-approach.git","ssh_url":"git@github.com:Octember/the-approach.git","clone_url":"https://github.com/Octember/the-approach.git","svn_url":"https://github.com/Octember/the-approach","homepage":null,"size":1154,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/39"},"html":{"href":"https://github.com/Octember/the-approach/pull/39"},"issue":{"href":"https://api.github.com/repos/Octember/the-approach/issues/39"},"comments":{"href":"https://api.github.com/repos/Octember/the-approach/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Octember/the-approach/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/Octember/the-approach/statuses/74c8d94d500888d463400c6c1126d3c184af6a96"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Octember"}}