{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/comments/192590092","pull_request_review_id":125396238,"id":192590092,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjU5MDA5Mg==","diff_hunk":"@@ -25,33 +66,131 @@ export default class App extends Component<Props, State> {\n     }\n   }\n \n+  getEncoderName(type: ImageType, options: CodecOptions) {\n+    const name = EncoderNames[type];\n+    if (typeof name === 'function') return name(options);\n+    return name;\n+  }\n+\n+  @bind\n+  setLeftType(leftType: ImageType) {\n+    this.setState({ leftType, leftOptions: {} });\n+    this.optionsUpdated();","path":"src/components/app/index.tsx","position":75,"original_position":75,"commit_id":"62184da1f3580544a0c47c51432008195ac07e14","original_commit_id":"62184da1f3580544a0c47c51432008195ac07e14","user":{"login":"developit","id":105127,"node_id":"MDQ6VXNlcjEwNTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/105127?v=4","gravatar_id":"","url":"https://api.github.com/users/developit","html_url":"https://github.com/developit","followers_url":"https://api.github.com/users/developit/followers","following_url":"https://api.github.com/users/developit/following{/other_user}","gists_url":"https://api.github.com/users/developit/gists{/gist_id}","starred_url":"https://api.github.com/users/developit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developit/subscriptions","organizations_url":"https://api.github.com/users/developit/orgs","repos_url":"https://api.github.com/users/developit/repos","events_url":"https://api.github.com/users/developit/events{/privacy}","received_events_url":"https://api.github.com/users/developit/received_events","type":"User","site_admin":false},"body":"I had a few different implementations of this, including the abstracted \"setter with optionsUpdated\", a componentDidUpdate() hook with a comparison, etc.  TBH I don't care which we go with, these were just the most explicit.","created_at":"2018-06-03T13:38:32Z","updated_at":"2018-06-03T13:38:32Z","html_url":"https://github.com/GoogleChromeLabs/squoosh/pull/39#discussion_r192590092","pull_request_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/comments/192590092"},"html":{"href":"https://github.com/GoogleChromeLabs/squoosh/pull/39#discussion_r192590092"},"pull_request":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39"}},"in_reply_to_id":191267083},"pull_request":{"url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39","id":190453912,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwNDUzOTEy","html_url":"https://github.com/GoogleChromeLabs/squoosh/pull/39","diff_url":"https://github.com/GoogleChromeLabs/squoosh/pull/39.diff","patch_url":"https://github.com/GoogleChromeLabs/squoosh/pull/39.patch","issue_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/39","number":39,"state":"open","locked":false,"title":"Options UI","user":{"login":"developit","id":105127,"node_id":"MDQ6VXNlcjEwNTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/105127?v=4","gravatar_id":"","url":"https://api.github.com/users/developit","html_url":"https://github.com/developit","followers_url":"https://api.github.com/users/developit/followers","following_url":"https://api.github.com/users/developit/following{/other_user}","gists_url":"https://api.github.com/users/developit/gists{/gist_id}","starred_url":"https://api.github.com/users/developit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developit/subscriptions","organizations_url":"https://api.github.com/users/developit/orgs","repos_url":"https://api.github.com/users/developit/repos","events_url":"https://api.github.com/users/developit/events{/privacy}","received_events_url":"https://api.github.com/users/developit/received_events","type":"User","site_admin":false},"body":"Implements basic support for options (#30), configurable for both the left and right panels. One of the modes is \"original\", which is a pass-through that displays the source image.\r\n\r\n<img width=\"600\" src=\"https://user-images.githubusercontent.com/105127/40520075-7f08ca28-5f91-11e8-85bf-f55f09dddd9b.gif\">","created_at":"2018-05-25T00:25:39Z","updated_at":"2018-06-03T13:38:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1104cae0a8a49a9d5b39590871b6a8cdd5e4407","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39/commits","review_comments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39/comments","review_comment_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/39/comments","statuses_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/statuses/62184da1f3580544a0c47c51432008195ac07e14","head":{"label":"GoogleChromeLabs:options","ref":"options","sha":"62184da1f3580544a0c47c51432008195ac07e14","user":{"login":"GoogleChromeLabs","id":31970254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTcwMjU0","avatar_url":"https://avatars1.githubusercontent.com/u/31970254?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChromeLabs","html_url":"https://github.com/GoogleChromeLabs","followers_url":"https://api.github.com/users/GoogleChromeLabs/followers","following_url":"https://api.github.com/users/GoogleChromeLabs/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChromeLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChromeLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChromeLabs/subscriptions","organizations_url":"https://api.github.com/users/GoogleChromeLabs/orgs","repos_url":"https://api.github.com/users/GoogleChromeLabs/repos","events_url":"https://api.github.com/users/GoogleChromeLabs/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChromeLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":124303364,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQzMDMzNjQ=","name":"squoosh","full_name":"GoogleChromeLabs/squoosh","owner":{"login":"GoogleChromeLabs","id":31970254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTcwMjU0","avatar_url":"https://avatars1.githubusercontent.com/u/31970254?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChromeLabs","html_url":"https://github.com/GoogleChromeLabs","followers_url":"https://api.github.com/users/GoogleChromeLabs/followers","following_url":"https://api.github.com/users/GoogleChromeLabs/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChromeLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChromeLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChromeLabs/subscriptions","organizations_url":"https://api.github.com/users/GoogleChromeLabs/orgs","repos_url":"https://api.github.com/users/GoogleChromeLabs/repos","events_url":"https://api.github.com/users/GoogleChromeLabs/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChromeLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChromeLabs/squoosh","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChromeLabs/squoosh","forks_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/forks","keys_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/teams","hooks_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/hooks","issue_events_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/events","assignees_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/tags","blobs_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/languages","stargazers_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/stargazers","contributors_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/contributors","subscribers_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/subscribers","subscription_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/subscription","commits_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/merges","archive_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/downloads","issues_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/deployments","created_at":"2018-03-07T22:42:03Z","updated_at":"2018-06-01T03:25:14Z","pushed_at":"2018-06-01T15:38:40Z","git_url":"git://github.com/GoogleChromeLabs/squoosh.git","ssh_url":"git@github.com:GoogleChromeLabs/squoosh.git","clone_url":"https://github.com/GoogleChromeLabs/squoosh.git","svn_url":"https://github.com/GoogleChromeLabs/squoosh","homepage":null,"size":4467,"stargazers_count":10,"watchers_count":10,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":23,"watchers":10,"default_branch":"master"}},"base":{"label":"GoogleChromeLabs:master","ref":"master","sha":"79dfe399789860119345a4df505c34815b13b9cf","user":{"login":"GoogleChromeLabs","id":31970254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTcwMjU0","avatar_url":"https://avatars1.githubusercontent.com/u/31970254?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChromeLabs","html_url":"https://github.com/GoogleChromeLabs","followers_url":"https://api.github.com/users/GoogleChromeLabs/followers","following_url":"https://api.github.com/users/GoogleChromeLabs/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChromeLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChromeLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChromeLabs/subscriptions","organizations_url":"https://api.github.com/users/GoogleChromeLabs/orgs","repos_url":"https://api.github.com/users/GoogleChromeLabs/repos","events_url":"https://api.github.com/users/GoogleChromeLabs/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChromeLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":124303364,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQzMDMzNjQ=","name":"squoosh","full_name":"GoogleChromeLabs/squoosh","owner":{"login":"GoogleChromeLabs","id":31970254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTcwMjU0","avatar_url":"https://avatars1.githubusercontent.com/u/31970254?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChromeLabs","html_url":"https://github.com/GoogleChromeLabs","followers_url":"https://api.github.com/users/GoogleChromeLabs/followers","following_url":"https://api.github.com/users/GoogleChromeLabs/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChromeLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChromeLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChromeLabs/subscriptions","organizations_url":"https://api.github.com/users/GoogleChromeLabs/orgs","repos_url":"https://api.github.com/users/GoogleChromeLabs/repos","events_url":"https://api.github.com/users/GoogleChromeLabs/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChromeLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChromeLabs/squoosh","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChromeLabs/squoosh","forks_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/forks","keys_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/teams","hooks_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/hooks","issue_events_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/events","assignees_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/tags","blobs_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/languages","stargazers_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/stargazers","contributors_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/contributors","subscribers_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/subscribers","subscription_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/subscription","commits_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/merges","archive_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/downloads","issues_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChromeLabs/squoosh/deployments","created_at":"2018-03-07T22:42:03Z","updated_at":"2018-06-01T03:25:14Z","pushed_at":"2018-06-01T15:38:40Z","git_url":"git://github.com/GoogleChromeLabs/squoosh.git","ssh_url":"git@github.com:GoogleChromeLabs/squoosh.git","clone_url":"https://github.com/GoogleChromeLabs/squoosh.git","svn_url":"https://github.com/GoogleChromeLabs/squoosh","homepage":null,"size":4467,"stargazers_count":10,"watchers_count":10,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":23,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39"},"html":{"href":"https://github.com/GoogleChromeLabs/squoosh/pull/39"},"issue":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/39"},"comments":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChromeLabs/squoosh/statuses/62184da1f3580544a0c47c51432008195ac07e14"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"developit"}}