{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/63182282","id":63182282,"diff_hunk":"@@ -233,6 +232,28 @@ FullPostView = React.createClass( {\n \t\t/*eslint-enable react/no-danger*/\n \t},\n \n+\trenderGalleryScripts: function() {\n+\t\t/**\n+\t\t * NOTE: Reuse methods from components/tinymce/plugins/wpcom-view/plugin.js\n+\t\t * to parse content and apply divs/scripts, below is a placeholder for now\n+\t\t */\n+\t\treturn React.createElement( GalleryView, {\n+\t\t\tsiteId: 18561139,\n+\t\t\tcontent: '[gallery ids=\\\"2247,2246,2245,2250,2251,2255,2252\\\" type=\\\"slideshow\\\"]'\n+\t\t} );\n+\t},\n+\n+\trenderFullPostContent: function( content ) {\n+\t\treturn (\n+\t\t\t<div>\n+\t\t\t\t<EmbedContainer>\n+\t\t\t\t\t<div className=\"reader__full-post-content\" _dangerouslySetInnerHTML={ { __html: content } } />\n+\t\t\t\t</EmbedContainer>\n+\t\t\t\t{ /data-gallery/.test( content ) ? this.renderGalleryScripts() : null }","path":"client/reader/full-post/index.jsx","position":40,"original_position":40,"commit_id":"41529c5f6e3732429f583c5f09b3077e780fe288","original_commit_id":"41529c5f6e3732429f583c5f09b3077e780fe288","user":{"login":"blowery","id":14350,"avatar_url":"https://avatars.githubusercontent.com/u/14350?v=3","gravatar_id":"","url":"https://api.github.com/users/blowery","html_url":"https://github.com/blowery","followers_url":"https://api.github.com/users/blowery/followers","following_url":"https://api.github.com/users/blowery/following{/other_user}","gists_url":"https://api.github.com/users/blowery/gists{/gist_id}","starred_url":"https://api.github.com/users/blowery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowery/subscriptions","organizations_url":"https://api.github.com/users/blowery/orgs","repos_url":"https://api.github.com/users/blowery/repos","events_url":"https://api.github.com/users/blowery/events{/privacy}","received_events_url":"https://api.github.com/users/blowery/received_events","type":"User","site_admin":false},"body":"i don't think we want to do this on every render call. probably either do it after mount / update, or up in post-normalizer. ","created_at":"2016-05-13T13:31:52Z","updated_at":"2016-05-13T13:31:52Z","html_url":"https://github.com/Automattic/wp-calypso/pull/5368#discussion_r63182282","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/63182282"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5368#discussion_r63182282"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368","id":69987103,"html_url":"https://github.com/Automattic/wp-calypso/pull/5368","diff_url":"https://github.com/Automattic/wp-calypso/pull/5368.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5368.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5368","number":5368,"state":"open","locked":false,"title":"Reader: use shortcodes to render Slideshow gallery","user":{"login":"psealock","id":1922453,"avatar_url":"https://avatars.githubusercontent.com/u/1922453?v=3","gravatar_id":"","url":"https://api.github.com/users/psealock","html_url":"https://github.com/psealock","followers_url":"https://api.github.com/users/psealock/followers","following_url":"https://api.github.com/users/psealock/following{/other_user}","gists_url":"https://api.github.com/users/psealock/gists{/gist_id}","starred_url":"https://api.github.com/users/psealock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psealock/subscriptions","organizations_url":"https://api.github.com/users/psealock/orgs","repos_url":"https://api.github.com/users/psealock/repos","events_url":"https://api.github.com/users/psealock/events{/privacy}","received_events_url":"https://api.github.com/users/psealock/received_events","type":"User","site_admin":false},"body":"**Issue**\r\nThe slideshow doesn't render on Reader\r\n<img width=\"426\" alt=\"screen shot 2016-05-14 at 12 05 31 am\" src=\"https://cloud.githubusercontent.com/assets/1922453/15247352/c93e23e4-1967-11e6-9a20-7633a22c9f52.png\">\r\n\r\nBut does render in the WYSIWYG editor in My Sites. More details on how to reproduce in https://github.com/Automattic/wp-calypso/issues/766\r\n\r\n**Problem**\r\nIn Reader, a post's content is a string of html that is ```dangerouslySetInnerHTML```'ed. Included is an empty div whose data attributes contain the information required to create a slideshow, but no javascript is ever included to make that happen.\r\n\r\nMy solution will be to Reuse methods from [wpcom-view plugin](https://github.com/Automattic/wp-calypso/blob/master/client/components/tinymce/plugins/wpcom-view/plugin.js) to parse the post's content, apply marker divs, and call the appropriate scripts (from wp.com) to render a slideshow.\r\n\r\ncc @blowery @bluefuton \r\n\r\n","created_at":"2016-05-13T12:22:23Z","updated_at":"2016-05-13T13:31:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab2298d88774901f52d8ae3c457664b75c8c1e13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5368/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/41529c5f6e3732429f583c5f09b3077e780fe288","head":{"label":"Automattic:Add/Reader-old-slideshow-implementation","ref":"Add/Reader-old-slideshow-implementation","sha":"41529c5f6e3732429f583c5f09b3077e780fe288","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-13T12:00:05Z","pushed_at":"2016-05-13T13:11:04Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75951,"stargazers_count":7286,"watchers_count":7286,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":884,"mirror_url":null,"open_issues_count":1322,"forks":884,"open_issues":1322,"watchers":7286,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"37365af16594f76dc0bc9a0a5ff20fc58c2104f4","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-13T12:00:05Z","pushed_at":"2016-05-13T13:11:04Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75951,"stargazers_count":7286,"watchers_count":7286,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":884,"mirror_url":null,"open_issues_count":1322,"forks":884,"open_issues":1322,"watchers":7286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5368"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5368"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5368/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5368/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/41529c5f6e3732429f583c5f09b3077e780fe288"}}}}