{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/28860706","id":28860706,"diff_hunk":"@@ -262,6 +265,24 @@ class Content protected (val apiContent: ApiContentWithMeta) extends Trail with\n     height <- apiContent.metaData.flatMap(_.imageCutoutSrcHeight).flatMap(s => Try(s.toInt).toOption)\n   } yield FaciaImageElement(src, width, height)\n \n+  override lazy val slideshowImages: Boolean = {\n+    apiContent.metaData.flatMap(_.json.get(\"slideshowImages\").flatMap(_.asOpt[Boolean])).getOrElse(false)\n+  }\n+\n+  override lazy val slideshow: Iterable[FaciaImageElement] =\n+    (for {\n+      x <- apiContent.metaData\n+      z <- x.json.get(\"slideshow\")\n+      w = for {\n+        a <- z.asInstanceOf[JsArray].value\n+        y = for {\n+          src <- a.asInstanceOf[JsObject].\\(\"src\").asOpt[String]\n+          width <- a.asInstanceOf[JsObject].\\(\"width\").asOpt[String].flatMap(s => Try(s.toInt).toOption)\n+          height <- a.asInstanceOf[JsObject].\\(\"height\").asOpt[String].flatMap(s => Try(s.toInt).toOption)\n+        } yield FaciaImageElement(src, width, height)\n+      } yield y\n+    } yield w).getOrElse(Nil).flatten\n+","path":"common/app/model/content.scala","position":31,"original_position":31,"commit_id":"8364addfb1f35d16bcbdca3951b78c9e1c2dcb4c","original_commit_id":"8364addfb1f35d16bcbdca3951b78c9e1c2dcb4c","user":{"login":"JustinPinner","id":690395,"avatar_url":"https://avatars.githubusercontent.com/u/690395?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinPinner","html_url":"https://github.com/JustinPinner","followers_url":"https://api.github.com/users/JustinPinner/followers","following_url":"https://api.github.com/users/JustinPinner/following{/other_user}","gists_url":"https://api.github.com/users/JustinPinner/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinPinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinPinner/subscriptions","organizations_url":"https://api.github.com/users/JustinPinner/orgs","repos_url":"https://api.github.com/users/JustinPinner/repos","events_url":"https://api.github.com/users/JustinPinner/events{/privacy}","received_events_url":"https://api.github.com/users/JustinPinner/received_events","type":"User","site_admin":false},"body":"Can we use more meaningful names? x, y, z etc save space but it's not immediately clear what we're yielding.","created_at":"2015-04-22T10:34:46Z","updated_at":"2015-04-22T10:34:46Z","html_url":"https://github.com/guardian/frontend/pull/8946#discussion_r28860706","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/8946","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/28860706"},"html":{"href":"https://github.com/guardian/frontend/pull/8946#discussion_r28860706"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8946"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/8946","id":33772557,"html_url":"https://github.com/guardian/frontend/pull/8946","diff_url":"https://github.com/guardian/frontend/pull/8946.diff","patch_url":"https://github.com/guardian/frontend/pull/8946.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/8946","number":8946,"state":"open","locked":false,"title":"Slideshow","user":{"login":"piuccio","id":680284,"avatar_url":"https://avatars.githubusercontent.com/u/680284?v=3","gravatar_id":"","url":"https://api.github.com/users/piuccio","html_url":"https://github.com/piuccio","followers_url":"https://api.github.com/users/piuccio/followers","following_url":"https://api.github.com/users/piuccio/following{/other_user}","gists_url":"https://api.github.com/users/piuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/piuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piuccio/subscriptions","organizations_url":"https://api.github.com/users/piuccio/orgs","repos_url":"https://api.github.com/users/piuccio/repos","events_url":"https://api.github.com/users/piuccio/events{/privacy}","received_events_url":"https://api.github.com/users/piuccio/received_events","type":"User","site_admin":false},"body":"Display slideshow of images on a front.\r\n\r\nSlideshow must be manually curated by editors, they can choose up to 5 images to display.\r\n\r\nEverything is behind a switch and an A/B test","created_at":"2015-04-21T15:24:19Z","updated_at":"2015-04-22T10:34:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6a32e148569d8f9c7c41b707cf4e79cae9de0d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/8946/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/8946/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/8946/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/8364addfb1f35d16bcbdca3951b78c9e1c2dcb4c","head":{"label":"guardian:facia-tool-slideshow","ref":"facia-tool-slideshow","sha":"8364addfb1f35d16bcbdca3951b78c9e1c2dcb4c","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-04-22T10:33:02Z","pushed_at":"2015-04-22T10:33:02Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":534863,"stargazers_count":2761,"watchers_count":2761,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":258,"mirror_url":null,"open_issues_count":258,"forks":258,"open_issues":258,"watchers":2761,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"91fdfa9d6814c9180530325c47263703fa79d21e","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-04-22T10:33:02Z","pushed_at":"2015-04-22T10:33:02Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":534863,"stargazers_count":2761,"watchers_count":2761,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":258,"mirror_url":null,"open_issues_count":258,"forks":258,"open_issues":258,"watchers":2761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8946"},"html":{"href":"https://github.com/guardian/frontend/pull/8946"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/8946"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/8946/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8946/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/8946/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/8364addfb1f35d16bcbdca3951b78c9e1c2dcb4c"}}}}