{"action":"created","comment":{"url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/comments/82241456","pull_request_review_id":3156896,"id":82241456,"diff_hunk":"@@ -216,51 +217,69 @@ export default class PostContent extends React.Component {\n     );\n   }\n \n-  renderTextEditor(/*selfText*/) {\n-    // const {\n-    //   editError,\n-    //   toggleEditing,\n-    // } = this.props;\n-    //\n-    // return (\n-    //   <div className='PostContent__edit-wrapper'>\n-    //     <div className='PostContent__textarea-holder'>\n-    //       <textarea\n-    //         className='PostContent__textarea form-control'\n-    //         defaultValue={ selfText }\n-    //         ref='selfTextEditor'\n-    //       />\n-    //     </div>\n-    //     { editError ? this.renderEditingError(editError) : null }\n-    //     <div className='PostContent__edit-controls'>\n-    //       <div className='PostContent__edit-button'>\n-    //         <SquareButton\n-    //           text='Cancel'\n-    //           onClick={ toggleEditing }\n-    //         />\n-    //       </div>\n-    //       <div className='PostContent__edit-button'>\n-    //         <SquareButton\n-    //           text='Save'\n-    //           onClick={ this.saveText }\n-    //         />\n-    //       </div>\n-    //     </div>\n-    //   </div>\n-    // );\n+  updateSelfText() {\n+    const newSelfText = this.refs.selfTextEditor.value.trim();\n+    if (newSelfText !== this.props.post.selfTextMD) {\n+      this.props.onUpdateSelftext(newSelfText);\n+    }\n+  }\n+\n+  renderTextEditor(selfText) {\n+    const {\n+      editPending,\n+      editError,\n+    } = this.props;\n+\n+    return (\n+      <div className='PostContent__edit-wrapper'>\n+        <div className='PostContent__textarea-holder'>\n+          <textarea\n+            className='PostContent__textarea'\n+            defaultValue={ selfText }\n+            disabled={ editPending }\n+            ref='selfTextEditor'\n+          />\n+        </div>\n+        { editError ? this.renderEditingError(editError) : null }\n+        { this.renderEditControls() }\n+      </div>\n+    );\n+  }\n+\n+  renderEditControls() {\n+    const { editPending, onToggleEdit } = this.props;\n+\n+    if (editPending) {\n+      return (\n+        <div className='PostContent__edit-pending'>\n+          Saving\n+        </div>\n+      );\n+    }\n+\n+    return (\n+      <div className='PostContent__edit-controls'>\n+        <div className='PostContent__edit-button'onClick={ onToggleEdit }>","path":"src/app/components/Post/PostContent/index.jsx","position":133,"original_position":133,"commit_id":"bbe05af1245fe9e564b7287cd66a974ad554cfb9","original_commit_id":"bbe05af1245fe9e564b7287cd66a974ad554cfb9","user":{"login":"phil303","id":787203,"avatar_url":"https://avatars.githubusercontent.com/u/787203?v=3","gravatar_id":"","url":"https://api.github.com/users/phil303","html_url":"https://github.com/phil303","followers_url":"https://api.github.com/users/phil303/followers","following_url":"https://api.github.com/users/phil303/following{/other_user}","gists_url":"https://api.github.com/users/phil303/gists{/gist_id}","starred_url":"https://api.github.com/users/phil303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil303/subscriptions","organizations_url":"https://api.github.com/users/phil303/orgs","repos_url":"https://api.github.com/users/phil303/repos","events_url":"https://api.github.com/users/phil303/events{/privacy}","received_events_url":"https://api.github.com/users/phil303/received_events","type":"User","site_admin":false},"body":"Weird because I'd think JS would freak out - you're missing a space between the string and `onClick`.","created_at":"2016-10-06T17:33:05Z","updated_at":"2016-10-06T17:33:05Z","html_url":"https://github.com/reddit/reddit-mobile/pull/804#discussion_r82241456","pull_request_url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804","_links":{"self":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/comments/82241456"},"html":{"href":"https://github.com/reddit/reddit-mobile/pull/804#discussion_r82241456"},"pull_request":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804"}}},"pull_request":{"url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804","id":88187676,"html_url":"https://github.com/reddit/reddit-mobile/pull/804","diff_url":"https://github.com/reddit/reddit-mobile/pull/804.diff","patch_url":"https://github.com/reddit/reddit-mobile/pull/804.patch","issue_url":"https://api.github.com/repos/reddit/reddit-mobile/issues/804","number":804,"state":"open","locked":false,"title":"2 x edit posts comments","user":{"login":"schwers","id":307983,"avatar_url":"https://avatars.githubusercontent.com/u/307983?v=3","gravatar_id":"","url":"https://api.github.com/users/schwers","html_url":"https://github.com/schwers","followers_url":"https://api.github.com/users/schwers/followers","following_url":"https://api.github.com/users/schwers/following{/other_user}","gists_url":"https://api.github.com/users/schwers/gists{/gist_id}","starred_url":"https://api.github.com/users/schwers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwers/subscriptions","organizations_url":"https://api.github.com/users/schwers/orgs","repos_url":"https://api.github.com/users/schwers/repos","events_url":"https://api.github.com/users/schwers/events{/privacy}","received_events_url":"https://api.github.com/users/schwers/received_events","type":"User","site_admin":false},"body":"Supports editing posts / comments. \r\n\r\nDepends on https://github.com/reddit/node-api-client/pull/166\r\n\r\nLet me know if the reducer structure makes sense. I'm thinking of removing the pending text from the reducer. My original thinking was it could be useful for preventing extra submits or re-filling in text-areas as they get re-rendered, but I didn't have any troubles.\r\n\r\nI'll squash the [wip] commits with a nice message once review is done\r\n\r\n👓  @phil303  || @uzi  || @nramadas \r\n\r\n","created_at":"2016-10-06T02:00:11Z","updated_at":"2016-10-06T17:45:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7455c958afa70a3cd6e621317381011d169eadbf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804/commits","review_comments_url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804/comments","review_comment_url":"https://api.github.com/repos/reddit/reddit-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reddit/reddit-mobile/issues/804/comments","statuses_url":"https://api.github.com/repos/reddit/reddit-mobile/statuses/bbe05af1245fe9e564b7287cd66a974ad554cfb9","head":{"label":"schwers:2X-edit-posts-comments","ref":"2X-edit-posts-comments","sha":"bbe05af1245fe9e564b7287cd66a974ad554cfb9","user":{"login":"schwers","id":307983,"avatar_url":"https://avatars.githubusercontent.com/u/307983?v=3","gravatar_id":"","url":"https://api.github.com/users/schwers","html_url":"https://github.com/schwers","followers_url":"https://api.github.com/users/schwers/followers","following_url":"https://api.github.com/users/schwers/following{/other_user}","gists_url":"https://api.github.com/users/schwers/gists{/gist_id}","starred_url":"https://api.github.com/users/schwers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwers/subscriptions","organizations_url":"https://api.github.com/users/schwers/orgs","repos_url":"https://api.github.com/users/schwers/repos","events_url":"https://api.github.com/users/schwers/events{/privacy}","received_events_url":"https://api.github.com/users/schwers/received_events","type":"User","site_admin":false},"repo":{"id":46595984,"name":"reddit-mobile","full_name":"schwers/reddit-mobile","owner":{"login":"schwers","id":307983,"avatar_url":"https://avatars.githubusercontent.com/u/307983?v=3","gravatar_id":"","url":"https://api.github.com/users/schwers","html_url":"https://github.com/schwers","followers_url":"https://api.github.com/users/schwers/followers","following_url":"https://api.github.com/users/schwers/following{/other_user}","gists_url":"https://api.github.com/users/schwers/gists{/gist_id}","starred_url":"https://api.github.com/users/schwers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwers/subscriptions","organizations_url":"https://api.github.com/users/schwers/orgs","repos_url":"https://api.github.com/users/schwers/repos","events_url":"https://api.github.com/users/schwers/events{/privacy}","received_events_url":"https://api.github.com/users/schwers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schwers/reddit-mobile","description":"","fork":true,"url":"https://api.github.com/repos/schwers/reddit-mobile","forks_url":"https://api.github.com/repos/schwers/reddit-mobile/forks","keys_url":"https://api.github.com/repos/schwers/reddit-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schwers/reddit-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schwers/reddit-mobile/teams","hooks_url":"https://api.github.com/repos/schwers/reddit-mobile/hooks","issue_events_url":"https://api.github.com/repos/schwers/reddit-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/schwers/reddit-mobile/events","assignees_url":"https://api.github.com/repos/schwers/reddit-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/schwers/reddit-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/schwers/reddit-mobile/tags","blobs_url":"https://api.github.com/repos/schwers/reddit-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schwers/reddit-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schwers/reddit-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/schwers/reddit-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schwers/reddit-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/schwers/reddit-mobile/languages","stargazers_url":"https://api.github.com/repos/schwers/reddit-mobile/stargazers","contributors_url":"https://api.github.com/repos/schwers/reddit-mobile/contributors","subscribers_url":"https://api.github.com/repos/schwers/reddit-mobile/subscribers","subscription_url":"https://api.github.com/repos/schwers/reddit-mobile/subscription","commits_url":"https://api.github.com/repos/schwers/reddit-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/schwers/reddit-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/schwers/reddit-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/schwers/reddit-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/schwers/reddit-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/schwers/reddit-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schwers/reddit-mobile/merges","archive_url":"https://api.github.com/repos/schwers/reddit-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schwers/reddit-mobile/downloads","issues_url":"https://api.github.com/repos/schwers/reddit-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/schwers/reddit-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/schwers/reddit-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/schwers/reddit-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schwers/reddit-mobile/labels{/name}","releases_url":"https://api.github.com/repos/schwers/reddit-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/schwers/reddit-mobile/deployments","created_at":"2015-11-21T01:25:16Z","updated_at":"2016-01-11T22:32:21Z","pushed_at":"2016-10-06T01:54:17Z","git_url":"git://github.com/schwers/reddit-mobile.git","ssh_url":"git@github.com:schwers/reddit-mobile.git","clone_url":"https://github.com/schwers/reddit-mobile.git","svn_url":"https://github.com/schwers/reddit-mobile","homepage":null,"size":7229,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"reddit:2X","ref":"2X","sha":"3cd9e1f008e568163980d4cf0b6a101af859f0be","user":{"login":"reddit","id":14248,"avatar_url":"https://avatars.githubusercontent.com/u/14248?v=3","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"repo":{"id":23087554,"name":"reddit-mobile","full_name":"reddit/reddit-mobile","owner":{"login":"reddit","id":14248,"avatar_url":"https://avatars.githubusercontent.com/u/14248?v=3","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reddit/reddit-mobile","description":"","fork":false,"url":"https://api.github.com/repos/reddit/reddit-mobile","forks_url":"https://api.github.com/repos/reddit/reddit-mobile/forks","keys_url":"https://api.github.com/repos/reddit/reddit-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reddit/reddit-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reddit/reddit-mobile/teams","hooks_url":"https://api.github.com/repos/reddit/reddit-mobile/hooks","issue_events_url":"https://api.github.com/repos/reddit/reddit-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/reddit/reddit-mobile/events","assignees_url":"https://api.github.com/repos/reddit/reddit-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/reddit/reddit-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/reddit/reddit-mobile/tags","blobs_url":"https://api.github.com/repos/reddit/reddit-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reddit/reddit-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reddit/reddit-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/reddit/reddit-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reddit/reddit-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/reddit/reddit-mobile/languages","stargazers_url":"https://api.github.com/repos/reddit/reddit-mobile/stargazers","contributors_url":"https://api.github.com/repos/reddit/reddit-mobile/contributors","subscribers_url":"https://api.github.com/repos/reddit/reddit-mobile/subscribers","subscription_url":"https://api.github.com/repos/reddit/reddit-mobile/subscription","commits_url":"https://api.github.com/repos/reddit/reddit-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/reddit/reddit-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/reddit/reddit-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/reddit/reddit-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/reddit/reddit-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/reddit/reddit-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reddit/reddit-mobile/merges","archive_url":"https://api.github.com/repos/reddit/reddit-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reddit/reddit-mobile/downloads","issues_url":"https://api.github.com/repos/reddit/reddit-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/reddit/reddit-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/reddit/reddit-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/reddit/reddit-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reddit/reddit-mobile/labels{/name}","releases_url":"https://api.github.com/repos/reddit/reddit-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/reddit/reddit-mobile/deployments","created_at":"2014-08-18T21:42:05Z","updated_at":"2016-10-05T19:00:25Z","pushed_at":"2016-10-06T17:45:32Z","git_url":"git://github.com/reddit/reddit-mobile.git","ssh_url":"git@github.com:reddit/reddit-mobile.git","clone_url":"https://github.com/reddit/reddit-mobile.git","svn_url":"https://github.com/reddit/reddit-mobile","homepage":null,"size":10664,"stargazers_count":855,"watchers_count":855,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":146,"mirror_url":null,"open_issues_count":29,"forks":146,"open_issues":29,"watchers":855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804"},"html":{"href":"https://github.com/reddit/reddit-mobile/pull/804"},"issue":{"href":"https://api.github.com/repos/reddit/reddit-mobile/issues/804"},"comments":{"href":"https://api.github.com/repos/reddit/reddit-mobile/issues/804/comments"},"review_comments":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804/comments"},"review_comment":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reddit/reddit-mobile/pulls/804/commits"},"statuses":{"href":"https://api.github.com/repos/reddit/reddit-mobile/statuses/bbe05af1245fe9e564b7287cd66a974ad554cfb9"}}}}
{"actor":{"display_login":"phil303"}}