{"action":"created","comment":{"url":"https://api.github.com/repos/streetmix/streetmix/pulls/comments/169966330","pull_request_review_id":98577992,"id":169966330,"diff_hunk":"@@ -58,33 +110,40 @@ class StreetName extends React.PureComponent {\n \n   renderHoverPrompt = () => {\n     if (this.props.isStreetReadOnly || !this.props.isHoverable) return null\n-    if (typeof this.props.onClick === 'function' && this.state.isHovered) {\n+    if (typeof this.props.handleStreetNameChange === 'function' && this.state.isHovered) {\n       return (\n         <div className=\"street-name-hover-prompt\">\n           {t('street.rename', 'Click to rename')}\n         </div>\n       )\n     }\n-\n     return null\n   }\n \n   render () {\n     let classString = 'street-name-text ' + (!needsUnicodeFont(this.props.name) ? '' : 'fallback-unicode-font')\n-\n-    return (\n-      <div\n+    if (!this.state.modify) {\n+      return (<div\n         className=\"street-name\"\n         ref={this.props.childRef}\n         onMouseEnter={this.onMouseEnter}\n         onMouseLeave={this.onMouseLeave}\n-        onClick={this.props.onClick}\n-        id={this.props.id}\n-      >\n+        onClick={() => this.setState({modify: true})}\n+        id={this.props.id}>\n         {this.renderHoverPrompt()}\n         <div className={classString}>{StreetName.normalizeStreetName(this.props.name)}</div>\n-      </div>\n-    )\n+      </div>)\n+    } else if (this.state.modify && this.props.editable) {\n+      return (<div\n+        className=\"street-name\"\n+        ref={this.props.childRef}\n+        id={this.props.id}>\n+        <input className={classString} type=\"text\"","path":"assets/scripts/streets/StreetName.jsx","position":118,"original_position":118,"commit_id":"24a51501d7680f4eabf9d1a4e739b8d76c656942","original_commit_id":"24a51501d7680f4eabf9d1a4e739b8d76c656942","user":{"login":"Ayush-Rawal","id":31813648,"avatar_url":"https://avatars1.githubusercontent.com/u/31813648?v=4","gravatar_id":"","url":"https://api.github.com/users/Ayush-Rawal","html_url":"https://github.com/Ayush-Rawal","followers_url":"https://api.github.com/users/Ayush-Rawal/followers","following_url":"https://api.github.com/users/Ayush-Rawal/following{/other_user}","gists_url":"https://api.github.com/users/Ayush-Rawal/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayush-Rawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayush-Rawal/subscriptions","organizations_url":"https://api.github.com/users/Ayush-Rawal/orgs","repos_url":"https://api.github.com/users/Ayush-Rawal/repos","events_url":"https://api.github.com/users/Ayush-Rawal/events{/privacy}","received_events_url":"https://api.github.com/users/Ayush-Rawal/received_events","type":"User","site_admin":false},"body":"How about adding two buttons at the top like the cancel button in the 'my streets' section? One for dismissing changes and the other for saving them","created_at":"2018-02-22T14:15:10Z","updated_at":"2018-02-22T14:15:10Z","html_url":"https://github.com/streetmix/streetmix/pull/804#discussion_r169966330","pull_request_url":"https://api.github.com/repos/streetmix/streetmix/pulls/804","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/comments/169966330"},"html":{"href":"https://github.com/streetmix/streetmix/pull/804#discussion_r169966330"},"pull_request":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/804"}},"in_reply_to_id":169848735},"pull_request":{"url":"https://api.github.com/repos/streetmix/streetmix/pulls/804","id":169856305,"html_url":"https://github.com/streetmix/streetmix/pull/804","diff_url":"https://github.com/streetmix/streetmix/pull/804.diff","patch_url":"https://github.com/streetmix/streetmix/pull/804.patch","issue_url":"https://api.github.com/repos/streetmix/streetmix/issues/804","number":804,"state":"open","locked":false,"title":"Better street name editing","user":{"login":"Ayush-Rawal","id":31813648,"avatar_url":"https://avatars1.githubusercontent.com/u/31813648?v=4","gravatar_id":"","url":"https://api.github.com/users/Ayush-Rawal","html_url":"https://github.com/Ayush-Rawal","followers_url":"https://api.github.com/users/Ayush-Rawal/followers","following_url":"https://api.github.com/users/Ayush-Rawal/following{/other_user}","gists_url":"https://api.github.com/users/Ayush-Rawal/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayush-Rawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayush-Rawal/subscriptions","organizations_url":"https://api.github.com/users/Ayush-Rawal/orgs","repos_url":"https://api.github.com/users/Ayush-Rawal/repos","events_url":"https://api.github.com/users/Ayush-Rawal/events{/privacy}","received_events_url":"https://api.github.com/users/Ayush-Rawal/received_events","type":"User","site_admin":false},"body":"Fixes #203 .\r\nOn clicking this would render an input box instead of the street name.\r\n\r\n@louh your notes were quite helpful 😄 . Please review.","created_at":"2018-02-18T23:14:24Z","updated_at":"2018-02-22T14:15:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3125031e2fa8983f7d0018368f254ce2793a064","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/streetmix/streetmix/pulls/804/commits","review_comments_url":"https://api.github.com/repos/streetmix/streetmix/pulls/804/comments","review_comment_url":"https://api.github.com/repos/streetmix/streetmix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/streetmix/streetmix/issues/804/comments","statuses_url":"https://api.github.com/repos/streetmix/streetmix/statuses/24a51501d7680f4eabf9d1a4e739b8d76c656942","head":{"label":"Ayush-Rawal:UI-street-rename","ref":"UI-street-rename","sha":"24a51501d7680f4eabf9d1a4e739b8d76c656942","user":{"login":"Ayush-Rawal","id":31813648,"avatar_url":"https://avatars1.githubusercontent.com/u/31813648?v=4","gravatar_id":"","url":"https://api.github.com/users/Ayush-Rawal","html_url":"https://github.com/Ayush-Rawal","followers_url":"https://api.github.com/users/Ayush-Rawal/followers","following_url":"https://api.github.com/users/Ayush-Rawal/following{/other_user}","gists_url":"https://api.github.com/users/Ayush-Rawal/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayush-Rawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayush-Rawal/subscriptions","organizations_url":"https://api.github.com/users/Ayush-Rawal/orgs","repos_url":"https://api.github.com/users/Ayush-Rawal/repos","events_url":"https://api.github.com/users/Ayush-Rawal/events{/privacy}","received_events_url":"https://api.github.com/users/Ayush-Rawal/received_events","type":"User","site_admin":false},"repo":{"id":121970916,"name":"streetmix","full_name":"Ayush-Rawal/streetmix","owner":{"login":"Ayush-Rawal","id":31813648,"avatar_url":"https://avatars1.githubusercontent.com/u/31813648?v=4","gravatar_id":"","url":"https://api.github.com/users/Ayush-Rawal","html_url":"https://github.com/Ayush-Rawal","followers_url":"https://api.github.com/users/Ayush-Rawal/followers","following_url":"https://api.github.com/users/Ayush-Rawal/following{/other_user}","gists_url":"https://api.github.com/users/Ayush-Rawal/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayush-Rawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayush-Rawal/subscriptions","organizations_url":"https://api.github.com/users/Ayush-Rawal/orgs","repos_url":"https://api.github.com/users/Ayush-Rawal/repos","events_url":"https://api.github.com/users/Ayush-Rawal/events{/privacy}","received_events_url":"https://api.github.com/users/Ayush-Rawal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ayush-Rawal/streetmix","description":"Design, remix, and share your neighborhood street.","fork":true,"url":"https://api.github.com/repos/Ayush-Rawal/streetmix","forks_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/forks","keys_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/teams","hooks_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/hooks","issue_events_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/issues/events{/number}","events_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/events","assignees_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/assignees{/user}","branches_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/branches{/branch}","tags_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/tags","blobs_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/statuses/{sha}","languages_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/languages","stargazers_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/stargazers","contributors_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/contributors","subscribers_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/subscribers","subscription_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/subscription","commits_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/contents/{+path}","compare_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/merges","archive_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/downloads","issues_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/issues{/number}","pulls_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/pulls{/number}","milestones_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/milestones{/number}","notifications_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/labels{/name}","releases_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/releases{/id}","deployments_url":"https://api.github.com/repos/Ayush-Rawal/streetmix/deployments","created_at":"2018-02-18T16:57:02Z","updated_at":"2018-02-18T16:57:04Z","pushed_at":"2018-02-22T08:52:12Z","git_url":"git://github.com/Ayush-Rawal/streetmix.git","ssh_url":"git@github.com:Ayush-Rawal/streetmix.git","clone_url":"https://github.com/Ayush-Rawal/streetmix.git","svn_url":"https://github.com/Ayush-Rawal/streetmix","homepage":"https://streetmix.net","size":34490,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"streetmix:master","ref":"master","sha":"c45ac31e1cf2d44684be4339d75dec327ad4a023","user":{"login":"streetmix","id":6877271,"avatar_url":"https://avatars1.githubusercontent.com/u/6877271?v=4","gravatar_id":"","url":"https://api.github.com/users/streetmix","html_url":"https://github.com/streetmix","followers_url":"https://api.github.com/users/streetmix/followers","following_url":"https://api.github.com/users/streetmix/following{/other_user}","gists_url":"https://api.github.com/users/streetmix/gists{/gist_id}","starred_url":"https://api.github.com/users/streetmix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/streetmix/subscriptions","organizations_url":"https://api.github.com/users/streetmix/orgs","repos_url":"https://api.github.com/users/streetmix/repos","events_url":"https://api.github.com/users/streetmix/events{/privacy}","received_events_url":"https://api.github.com/users/streetmix/received_events","type":"Organization","site_admin":false},"repo":{"id":7708819,"name":"streetmix","full_name":"streetmix/streetmix","owner":{"login":"streetmix","id":6877271,"avatar_url":"https://avatars1.githubusercontent.com/u/6877271?v=4","gravatar_id":"","url":"https://api.github.com/users/streetmix","html_url":"https://github.com/streetmix","followers_url":"https://api.github.com/users/streetmix/followers","following_url":"https://api.github.com/users/streetmix/following{/other_user}","gists_url":"https://api.github.com/users/streetmix/gists{/gist_id}","starred_url":"https://api.github.com/users/streetmix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/streetmix/subscriptions","organizations_url":"https://api.github.com/users/streetmix/orgs","repos_url":"https://api.github.com/users/streetmix/repos","events_url":"https://api.github.com/users/streetmix/events{/privacy}","received_events_url":"https://api.github.com/users/streetmix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/streetmix/streetmix","description":"Design, remix, and share your neighborhood street.","fork":false,"url":"https://api.github.com/repos/streetmix/streetmix","forks_url":"https://api.github.com/repos/streetmix/streetmix/forks","keys_url":"https://api.github.com/repos/streetmix/streetmix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/streetmix/streetmix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/streetmix/streetmix/teams","hooks_url":"https://api.github.com/repos/streetmix/streetmix/hooks","issue_events_url":"https://api.github.com/repos/streetmix/streetmix/issues/events{/number}","events_url":"https://api.github.com/repos/streetmix/streetmix/events","assignees_url":"https://api.github.com/repos/streetmix/streetmix/assignees{/user}","branches_url":"https://api.github.com/repos/streetmix/streetmix/branches{/branch}","tags_url":"https://api.github.com/repos/streetmix/streetmix/tags","blobs_url":"https://api.github.com/repos/streetmix/streetmix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/streetmix/streetmix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/streetmix/streetmix/git/refs{/sha}","trees_url":"https://api.github.com/repos/streetmix/streetmix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/streetmix/streetmix/statuses/{sha}","languages_url":"https://api.github.com/repos/streetmix/streetmix/languages","stargazers_url":"https://api.github.com/repos/streetmix/streetmix/stargazers","contributors_url":"https://api.github.com/repos/streetmix/streetmix/contributors","subscribers_url":"https://api.github.com/repos/streetmix/streetmix/subscribers","subscription_url":"https://api.github.com/repos/streetmix/streetmix/subscription","commits_url":"https://api.github.com/repos/streetmix/streetmix/commits{/sha}","git_commits_url":"https://api.github.com/repos/streetmix/streetmix/git/commits{/sha}","comments_url":"https://api.github.com/repos/streetmix/streetmix/comments{/number}","issue_comment_url":"https://api.github.com/repos/streetmix/streetmix/issues/comments{/number}","contents_url":"https://api.github.com/repos/streetmix/streetmix/contents/{+path}","compare_url":"https://api.github.com/repos/streetmix/streetmix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/streetmix/streetmix/merges","archive_url":"https://api.github.com/repos/streetmix/streetmix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/streetmix/streetmix/downloads","issues_url":"https://api.github.com/repos/streetmix/streetmix/issues{/number}","pulls_url":"https://api.github.com/repos/streetmix/streetmix/pulls{/number}","milestones_url":"https://api.github.com/repos/streetmix/streetmix/milestones{/number}","notifications_url":"https://api.github.com/repos/streetmix/streetmix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/streetmix/streetmix/labels{/name}","releases_url":"https://api.github.com/repos/streetmix/streetmix/releases{/id}","deployments_url":"https://api.github.com/repos/streetmix/streetmix/deployments","created_at":"2013-01-19T21:03:45Z","updated_at":"2018-02-18T18:13:09Z","pushed_at":"2018-02-22T02:50:14Z","git_url":"git://github.com/streetmix/streetmix.git","ssh_url":"git@github.com:streetmix/streetmix.git","clone_url":"https://github.com/streetmix/streetmix.git","svn_url":"https://github.com/streetmix/streetmix","homepage":"https://streetmix.net","size":34489,"stargazers_count":284,"watchers_count":284,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":null,"archived":false,"open_issues_count":141,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":96,"open_issues":141,"watchers":284,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/804"},"html":{"href":"https://github.com/streetmix/streetmix/pull/804"},"issue":{"href":"https://api.github.com/repos/streetmix/streetmix/issues/804"},"comments":{"href":"https://api.github.com/repos/streetmix/streetmix/issues/804/comments"},"review_comments":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/804/comments"},"review_comment":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/streetmix/streetmix/pulls/804/commits"},"statuses":{"href":"https://api.github.com/repos/streetmix/streetmix/statuses/24a51501d7680f4eabf9d1a4e739b8d76c656942"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Ayush-Rawal"}}