{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/starter-theme/pulls/comments/209742529","pull_request_review_id":145815006,"id":209742529,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTc0MjUyOQ==","diff_hunk":"@@ -79,6 +83,34 @@ export default register('product', {\n         this.updateImages.bind(this),\n       );\n     }\n+\n+    this.initImageSwitch();\n+  },\n+\n+  initImageSwitch() {\n+    if (!$(selectors.productThumbs).length) {\n+      return;\n+    }\n+\n+    $(selectors.productThumbs)\n+      .on('click', (evt) => {\n+        evt.preventDefault();\n+\n+        const imageId = evt.currentTarget.dataset.thumbnailId;\n+        this.switchImage(imageId);\n+        this.setActiveThumbnail(imageId);\n+      })\n+      .on('keyup', this.handleImageFocus.bind(this));\n+  },\n+\n+  handleImageFocus(evt) {\n+    if (evt.keyCode !== keyboardKeys.ENTER) {\n+      return;\n+    }\n+\n+    $(`${selectors.productFeaturedImage}`, this.$container)","path":"src/assets/scripts/sections/product.js","position":40,"original_position":40,"commit_id":"af6ebd7a4e0ba0339d2f313647944d8e03ec8b47","original_commit_id":"af6ebd7a4e0ba0339d2f313647944d8e03ec8b47","user":{"login":"chrisberthe","id":991693,"node_id":"MDQ6VXNlcjk5MTY5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/991693?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisberthe","html_url":"https://github.com/chrisberthe","followers_url":"https://api.github.com/users/chrisberthe/followers","following_url":"https://api.github.com/users/chrisberthe/following{/other_user}","gists_url":"https://api.github.com/users/chrisberthe/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisberthe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisberthe/subscriptions","organizations_url":"https://api.github.com/users/chrisberthe/orgs","repos_url":"https://api.github.com/users/chrisberthe/repos","events_url":"https://api.github.com/users/chrisberthe/events{/privacy}","received_events_url":"https://api.github.com/users/chrisberthe/received_events","type":"User","site_admin":false},"body":"No need for string interpolation: `$(selectors.productFeaturedImage, this.$container)`.","created_at":"2018-08-13T20:12:35Z","updated_at":"2018-08-13T20:13:52Z","html_url":"https://github.com/Shopify/starter-theme/pull/100#discussion_r209742529","pull_request_url":"https://api.github.com/repos/Shopify/starter-theme/pulls/100","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/comments/209742529"},"html":{"href":"https://github.com/Shopify/starter-theme/pull/100#discussion_r209742529"},"pull_request":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/starter-theme/pulls/100","id":208077597,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MDc3NTk3","html_url":"https://github.com/Shopify/starter-theme/pull/100","diff_url":"https://github.com/Shopify/starter-theme/pull/100.diff","patch_url":"https://github.com/Shopify/starter-theme/pull/100.patch","issue_url":"https://api.github.com/repos/Shopify/starter-theme/issues/100","number":100,"state":"open","locked":false,"title":"Added clicking product thumbnail","user":{"login":"tauthomas01","id":658169,"node_id":"MDQ6VXNlcjY1ODE2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/658169?v=4","gravatar_id":"","url":"https://api.github.com/users/tauthomas01","html_url":"https://github.com/tauthomas01","followers_url":"https://api.github.com/users/tauthomas01/followers","following_url":"https://api.github.com/users/tauthomas01/following{/other_user}","gists_url":"https://api.github.com/users/tauthomas01/gists{/gist_id}","starred_url":"https://api.github.com/users/tauthomas01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tauthomas01/subscriptions","organizations_url":"https://api.github.com/users/tauthomas01/orgs","repos_url":"https://api.github.com/users/tauthomas01/repos","events_url":"https://api.github.com/users/tauthomas01/events{/privacy}","received_events_url":"https://api.github.com/users/tauthomas01/received_events","type":"User","site_admin":false},"body":"Fix https://github.com/Shopify/starter-theme/issues/6\r\n\r\n### What this PR does\r\nThis PR adds the functionality to show the product featured image when you click on a thumbnail.\r\n\r\n#### :tophat: instructions\r\n- [] Ensure the selected image is loaded.\r\n- [] Test keyboard navigation (+ `ENTER` key)\r\n- [] Test on multiple instances (sections)\r\n- [] I would like a :tophat:, please.\r\n\r\n**Changes**\r\n- Added the `onClick` event to show the select image (copied and slightly modified from Debut)\r\n- Removed the `[tabindex='-1']:focus` CSS selector because we need to have the focus ring when we programatically use focus() for `tabindex=-1` elements\r\n\r\n[Demo store](https://j0hqchcf6f8dplpl-662601789.shopifypreview.com/products/christina-dress-test)","created_at":"2018-08-13T19:24:10Z","updated_at":"2018-08-13T20:13:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76feff3ceb542052652aad4087a28379585adfda","assignee":{"login":"tauthomas01","id":658169,"node_id":"MDQ6VXNlcjY1ODE2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/658169?v=4","gravatar_id":"","url":"https://api.github.com/users/tauthomas01","html_url":"https://github.com/tauthomas01","followers_url":"https://api.github.com/users/tauthomas01/followers","following_url":"https://api.github.com/users/tauthomas01/following{/other_user}","gists_url":"https://api.github.com/users/tauthomas01/gists{/gist_id}","starred_url":"https://api.github.com/users/tauthomas01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tauthomas01/subscriptions","organizations_url":"https://api.github.com/users/tauthomas01/orgs","repos_url":"https://api.github.com/users/tauthomas01/repos","events_url":"https://api.github.com/users/tauthomas01/events{/privacy}","received_events_url":"https://api.github.com/users/tauthomas01/received_events","type":"User","site_admin":false},"assignees":[{"login":"tauthomas01","id":658169,"node_id":"MDQ6VXNlcjY1ODE2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/658169?v=4","gravatar_id":"","url":"https://api.github.com/users/tauthomas01","html_url":"https://github.com/tauthomas01","followers_url":"https://api.github.com/users/tauthomas01/followers","following_url":"https://api.github.com/users/tauthomas01/following{/other_user}","gists_url":"https://api.github.com/users/tauthomas01/gists{/gist_id}","starred_url":"https://api.github.com/users/tauthomas01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tauthomas01/subscriptions","organizations_url":"https://api.github.com/users/tauthomas01/orgs","repos_url":"https://api.github.com/users/tauthomas01/repos","events_url":"https://api.github.com/users/tauthomas01/events{/privacy}","received_events_url":"https://api.github.com/users/tauthomas01/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"t-kelly","id":4837696,"node_id":"MDQ6VXNlcjQ4Mzc2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/4837696?v=4","gravatar_id":"","url":"https://api.github.com/users/t-kelly","html_url":"https://github.com/t-kelly","followers_url":"https://api.github.com/users/t-kelly/followers","following_url":"https://api.github.com/users/t-kelly/following{/other_user}","gists_url":"https://api.github.com/users/t-kelly/gists{/gist_id}","starred_url":"https://api.github.com/users/t-kelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-kelly/subscriptions","organizations_url":"https://api.github.com/users/t-kelly/orgs","repos_url":"https://api.github.com/users/t-kelly/repos","events_url":"https://api.github.com/users/t-kelly/events{/privacy}","received_events_url":"https://api.github.com/users/t-kelly/received_events","type":"User","site_admin":false},{"login":"huguestennier","id":6691035,"node_id":"MDQ6VXNlcjY2OTEwMzU=","avatar_url":"https://avatars0.githubusercontent.com/u/6691035?v=4","gravatar_id":"","url":"https://api.github.com/users/huguestennier","html_url":"https://github.com/huguestennier","followers_url":"https://api.github.com/users/huguestennier/followers","following_url":"https://api.github.com/users/huguestennier/following{/other_user}","gists_url":"https://api.github.com/users/huguestennier/gists{/gist_id}","starred_url":"https://api.github.com/users/huguestennier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huguestennier/subscriptions","organizations_url":"https://api.github.com/users/huguestennier/orgs","repos_url":"https://api.github.com/users/huguestennier/repos","events_url":"https://api.github.com/users/huguestennier/events{/privacy}","received_events_url":"https://api.github.com/users/huguestennier/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/starter-theme/pulls/100/commits","review_comments_url":"https://api.github.com/repos/Shopify/starter-theme/pulls/100/comments","review_comment_url":"https://api.github.com/repos/Shopify/starter-theme/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/starter-theme/issues/100/comments","statuses_url":"https://api.github.com/repos/Shopify/starter-theme/statuses/af6ebd7a4e0ba0339d2f313647944d8e03ec8b47","head":{"label":"Shopify:feature-productthumbnail","ref":"feature-productthumbnail","sha":"af6ebd7a4e0ba0339d2f313647944d8e03ec8b47","user":{"login":"Shopify","id":8085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwODU=","avatar_url":"https://avatars1.githubusercontent.com/u/8085?v=4","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":110152877,"node_id":"MDEwOlJlcG9zaXRvcnkxMTAxNTI4Nzc=","name":"starter-theme","full_name":"Shopify/starter-theme","owner":{"login":"Shopify","id":8085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwODU=","avatar_url":"https://avatars1.githubusercontent.com/u/8085?v=4","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/starter-theme","description":"The Shopify Themes Team opinionated starting point for new a Slate project","fork":false,"url":"https://api.github.com/repos/Shopify/starter-theme","forks_url":"https://api.github.com/repos/Shopify/starter-theme/forks","keys_url":"https://api.github.com/repos/Shopify/starter-theme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/starter-theme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/starter-theme/teams","hooks_url":"https://api.github.com/repos/Shopify/starter-theme/hooks","issue_events_url":"https://api.github.com/repos/Shopify/starter-theme/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/starter-theme/events","assignees_url":"https://api.github.com/repos/Shopify/starter-theme/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/starter-theme/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/starter-theme/tags","blobs_url":"https://api.github.com/repos/Shopify/starter-theme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/starter-theme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/starter-theme/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/starter-theme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/starter-theme/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/starter-theme/languages","stargazers_url":"https://api.github.com/repos/Shopify/starter-theme/stargazers","contributors_url":"https://api.github.com/repos/Shopify/starter-theme/contributors","subscribers_url":"https://api.github.com/repos/Shopify/starter-theme/subscribers","subscription_url":"https://api.github.com/repos/Shopify/starter-theme/subscription","commits_url":"https://api.github.com/repos/Shopify/starter-theme/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/starter-theme/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/starter-theme/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/starter-theme/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/starter-theme/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/starter-theme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/starter-theme/merges","archive_url":"https://api.github.com/repos/Shopify/starter-theme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/starter-theme/downloads","issues_url":"https://api.github.com/repos/Shopify/starter-theme/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/starter-theme/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/starter-theme/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/starter-theme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/starter-theme/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/starter-theme/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/starter-theme/deployments","created_at":"2017-11-09T18:42:22Z","updated_at":"2018-08-13T19:30:19Z","pushed_at":"2018-08-13T19:30:20Z","git_url":"git://github.com/Shopify/starter-theme.git","ssh_url":"git@github.com:Shopify/starter-theme.git","clone_url":"https://github.com/Shopify/starter-theme.git","svn_url":"https://github.com/Shopify/starter-theme","homepage":"","size":595,"stargazers_count":76,"watchers_count":76,"language":"Liquid","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":17,"open_issues":13,"watchers":76,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"98e2292d50572304990bfaf41ac675257c5c82d0","user":{"login":"Shopify","id":8085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwODU=","avatar_url":"https://avatars1.githubusercontent.com/u/8085?v=4","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":110152877,"node_id":"MDEwOlJlcG9zaXRvcnkxMTAxNTI4Nzc=","name":"starter-theme","full_name":"Shopify/starter-theme","owner":{"login":"Shopify","id":8085,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwODU=","avatar_url":"https://avatars1.githubusercontent.com/u/8085?v=4","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/starter-theme","description":"The Shopify Themes Team opinionated starting point for new a Slate project","fork":false,"url":"https://api.github.com/repos/Shopify/starter-theme","forks_url":"https://api.github.com/repos/Shopify/starter-theme/forks","keys_url":"https://api.github.com/repos/Shopify/starter-theme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/starter-theme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/starter-theme/teams","hooks_url":"https://api.github.com/repos/Shopify/starter-theme/hooks","issue_events_url":"https://api.github.com/repos/Shopify/starter-theme/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/starter-theme/events","assignees_url":"https://api.github.com/repos/Shopify/starter-theme/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/starter-theme/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/starter-theme/tags","blobs_url":"https://api.github.com/repos/Shopify/starter-theme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/starter-theme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/starter-theme/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/starter-theme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/starter-theme/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/starter-theme/languages","stargazers_url":"https://api.github.com/repos/Shopify/starter-theme/stargazers","contributors_url":"https://api.github.com/repos/Shopify/starter-theme/contributors","subscribers_url":"https://api.github.com/repos/Shopify/starter-theme/subscribers","subscription_url":"https://api.github.com/repos/Shopify/starter-theme/subscription","commits_url":"https://api.github.com/repos/Shopify/starter-theme/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/starter-theme/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/starter-theme/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/starter-theme/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/starter-theme/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/starter-theme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/starter-theme/merges","archive_url":"https://api.github.com/repos/Shopify/starter-theme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/starter-theme/downloads","issues_url":"https://api.github.com/repos/Shopify/starter-theme/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/starter-theme/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/starter-theme/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/starter-theme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/starter-theme/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/starter-theme/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/starter-theme/deployments","created_at":"2017-11-09T18:42:22Z","updated_at":"2018-08-13T19:30:19Z","pushed_at":"2018-08-13T19:30:20Z","git_url":"git://github.com/Shopify/starter-theme.git","ssh_url":"git@github.com:Shopify/starter-theme.git","clone_url":"https://github.com/Shopify/starter-theme.git","svn_url":"https://github.com/Shopify/starter-theme","homepage":"","size":595,"stargazers_count":76,"watchers_count":76,"language":"Liquid","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":17,"open_issues":13,"watchers":76,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/100"},"html":{"href":"https://github.com/Shopify/starter-theme/pull/100"},"issue":{"href":"https://api.github.com/repos/Shopify/starter-theme/issues/100"},"comments":{"href":"https://api.github.com/repos/Shopify/starter-theme/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/starter-theme/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/starter-theme/statuses/af6ebd7a4e0ba0339d2f313647944d8e03ec8b47"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chrisberthe"}}