{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/support-frontend/pulls/comments/135760741","pull_request_review_id":59207179,"id":135760741,"diff_hunk":"@@ -0,0 +1,26 @@\n+// @flow\n+\n+// ----- Imports ----- //\n+\n+import React from 'react';\n+\n+\n+// ----- Component ----- //\n+\n+export default function ContributionsContextIntro() {","path":"assets/pages/contributions-landing/components/contributionsContextIntro.jsx","position":10,"original_position":10,"commit_id":"1c6608bfdfc16c4521c0593b044ed379c868e3fc","original_commit_id":"1c6608bfdfc16c4521c0593b044ed379c868e3fc","user":{"login":"Ap0c","id":5131341,"avatar_url":"https://avatars3.githubusercontent.com/u/5131341?v=4","gravatar_id":"","url":"https://api.github.com/users/Ap0c","html_url":"https://github.com/Ap0c","followers_url":"https://api.github.com/users/Ap0c/followers","following_url":"https://api.github.com/users/Ap0c/following{/other_user}","gists_url":"https://api.github.com/users/Ap0c/gists{/gist_id}","starred_url":"https://api.github.com/users/Ap0c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ap0c/subscriptions","organizations_url":"https://api.github.com/users/Ap0c/orgs","repos_url":"https://api.github.com/users/Ap0c/repos","events_url":"https://api.github.com/users/Ap0c/events{/privacy}","received_events_url":"https://api.github.com/users/Ap0c/received_events","type":"User","site_admin":false},"body":"It's complicated, but it boils down to: CSS. These components have to flow in different ways at different breakpoints to fit the designs; they both have to be at the same level as the bundle, and they can't be wrapped together in the same div.\r\n\r\nCurrently React/Preact don't allow you to return arrays of elements from a component, they have to be wrapped in an enclosing element. I believe this is being introduced in [React Fiber](https://github.com/facebook/react/issues/2127), and it looks like [some work](https://github.com/developit/preact/pull/703) is happening for Preact as well.","created_at":"2017-08-29T11:15:36Z","updated_at":"2017-08-29T11:15:36Z","html_url":"https://github.com/guardian/support-frontend/pull/195#discussion_r135760741","pull_request_url":"https://api.github.com/repos/guardian/support-frontend/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/comments/135760741"},"html":{"href":"https://github.com/guardian/support-frontend/pull/195#discussion_r135760741"},"pull_request":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/195"}},"in_reply_to_id":135754846},"pull_request":{"url":"https://api.github.com/repos/guardian/support-frontend/pulls/195","id":137697223,"html_url":"https://github.com/guardian/support-frontend/pull/195","diff_url":"https://github.com/guardian/support-frontend/pull/195.diff","patch_url":"https://github.com/guardian/support-frontend/pull/195.patch","issue_url":"https://api.github.com/repos/guardian/support-frontend/issues/195","number":195,"state":"open","locked":false,"title":"Add Context Version Of Contributions Landing","user":{"login":"Ap0c","id":5131341,"avatar_url":"https://avatars3.githubusercontent.com/u/5131341?v=4","gravatar_id":"","url":"https://api.github.com/users/Ap0c","html_url":"https://github.com/Ap0c","followers_url":"https://api.github.com/users/Ap0c/followers","following_url":"https://api.github.com/users/Ap0c/following{/other_user}","gists_url":"https://api.github.com/users/Ap0c/gists{/gist_id}","starred_url":"https://api.github.com/users/Ap0c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ap0c/subscriptions","organizations_url":"https://api.github.com/users/Ap0c/orgs","repos_url":"https://api.github.com/users/Ap0c/repos","events_url":"https://api.github.com/users/Ap0c/events{/privacy}","received_events_url":"https://api.github.com/users/Ap0c/received_events","type":"User","site_admin":false},"body":"## Why are you doing this?\r\n\r\nThe Epic has some context (paragraphs of copy) for why you might want to support the guardian/make a contribution. The engagement banner doesn't, so contributions use an alternate landing page that includes this copy. We're going to do the same. It could be argued that we should show this page for header traffic as well, as there's no context there either.\r\n\r\nI've done this by adding a query parameter to the URL called `context`, which can be either true or false (or missing, 3VL all the way!). This will trigger the context version of the page with extra copy (see screenshots below).\r\n\r\n**Note:** I haven't added this to the UK page yet, as it's currently only needed for the US test, and the query param stuff will probably get refactored.\r\n\r\ncc: @Amohkhan\r\n\r\n[**Trello Card**](https://trello.com/c/d0jVHDB1/815-engagement-banner-header-version-of-contributions-landing-page)\r\n\r\n## Changes\r\n\r\n- Added a utility function for parsing a boolean from a string (JavaScript doesn't have a standard library).\r\n- Added a new action for setting the context in the reducer.\r\n- Added components for the context text and the context intro.\r\n- Styled the new context, and tweaked the styling of the default page to only use the bundle overlay on desktop and above.\r\n- Added the context logic to the US contributions landing page.\r\n- Updated the reducer to take the new `context`, and the tweaked the corresponding tests.\r\n\r\n## Screenshots\r\n\r\nTo follow.\r\n","created_at":"2017-08-25T15:21:05Z","updated_at":"2017-08-29T11:15:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04580907ad04e46b345f5b9dd11691422aaf16a4","assignee":null,"assignees":[],"requested_reviewers":[{"login":"svillafe","id":825398,"avatar_url":"https://avatars1.githubusercontent.com/u/825398?v=4","gravatar_id":"","url":"https://api.github.com/users/svillafe","html_url":"https://github.com/svillafe","followers_url":"https://api.github.com/users/svillafe/followers","following_url":"https://api.github.com/users/svillafe/following{/other_user}","gists_url":"https://api.github.com/users/svillafe/gists{/gist_id}","starred_url":"https://api.github.com/users/svillafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svillafe/subscriptions","organizations_url":"https://api.github.com/users/svillafe/orgs","repos_url":"https://api.github.com/users/svillafe/repos","events_url":"https://api.github.com/users/svillafe/events{/privacy}","received_events_url":"https://api.github.com/users/svillafe/received_events","type":"User","site_admin":false},{"login":"superfrank","id":6727874,"avatar_url":"https://avatars1.githubusercontent.com/u/6727874?v=4","gravatar_id":"","url":"https://api.github.com/users/superfrank","html_url":"https://github.com/superfrank","followers_url":"https://api.github.com/users/superfrank/followers","following_url":"https://api.github.com/users/superfrank/following{/other_user}","gists_url":"https://api.github.com/users/superfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/superfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superfrank/subscriptions","organizations_url":"https://api.github.com/users/superfrank/orgs","repos_url":"https://api.github.com/users/superfrank/repos","events_url":"https://api.github.com/users/superfrank/events{/privacy}","received_events_url":"https://api.github.com/users/superfrank/received_events","type":"User","site_admin":false},{"login":"jacobwinch","id":19384074,"avatar_url":"https://avatars3.githubusercontent.com/u/19384074?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobwinch","html_url":"https://github.com/jacobwinch","followers_url":"https://api.github.com/users/jacobwinch/followers","following_url":"https://api.github.com/users/jacobwinch/following{/other_user}","gists_url":"https://api.github.com/users/jacobwinch/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwinch/subscriptions","organizations_url":"https://api.github.com/users/jacobwinch/orgs","repos_url":"https://api.github.com/users/jacobwinch/repos","events_url":"https://api.github.com/users/jacobwinch/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwinch/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/support-frontend/pulls/195/commits","review_comments_url":"https://api.github.com/repos/guardian/support-frontend/pulls/195/comments","review_comment_url":"https://api.github.com/repos/guardian/support-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/support-frontend/issues/195/comments","statuses_url":"https://api.github.com/repos/guardian/support-frontend/statuses/1c6608bfdfc16c4521c0593b044ed379c868e3fc","head":{"label":"guardian:add-context-version-of-contributions-landing","ref":"add-context-version-of-contributions-landing","sha":"1c6608bfdfc16c4521c0593b044ed379c868e3fc","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","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":87204582,"name":"support-frontend","full_name":"guardian/support-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","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/support-frontend","description":"Frontend for the new supporter platform","fork":false,"url":"https://api.github.com/repos/guardian/support-frontend","forks_url":"https://api.github.com/repos/guardian/support-frontend/forks","keys_url":"https://api.github.com/repos/guardian/support-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/support-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/support-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/support-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/support-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/support-frontend/events","assignees_url":"https://api.github.com/repos/guardian/support-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/support-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/support-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/support-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/support-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/support-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/support-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/support-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/support-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/support-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/support-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/support-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/support-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/support-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/support-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/support-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/support-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/support-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/support-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/support-frontend/merges","archive_url":"https://api.github.com/repos/guardian/support-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/support-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/support-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/support-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/support-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/support-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/support-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/support-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/support-frontend/deployments","created_at":"2017-04-04T15:37:12Z","updated_at":"2017-06-07T15:51:49Z","pushed_at":"2017-08-25T15:21:06Z","git_url":"git://github.com/guardian/support-frontend.git","ssh_url":"git@github.com:guardian/support-frontend.git","clone_url":"https://github.com/guardian/support-frontend.git","svn_url":"https://github.com/guardian/support-frontend","homepage":"https://support.theguardian.com/","size":1130,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"cfb5b67f4d55df0d3d2de57e51d58aa90ddd3a4e","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","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":87204582,"name":"support-frontend","full_name":"guardian/support-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","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/support-frontend","description":"Frontend for the new supporter platform","fork":false,"url":"https://api.github.com/repos/guardian/support-frontend","forks_url":"https://api.github.com/repos/guardian/support-frontend/forks","keys_url":"https://api.github.com/repos/guardian/support-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/support-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/support-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/support-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/support-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/support-frontend/events","assignees_url":"https://api.github.com/repos/guardian/support-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/support-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/support-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/support-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/support-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/support-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/support-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/support-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/support-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/support-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/support-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/support-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/support-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/support-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/support-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/support-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/support-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/support-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/support-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/support-frontend/merges","archive_url":"https://api.github.com/repos/guardian/support-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/support-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/support-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/support-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/support-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/support-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/support-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/support-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/support-frontend/deployments","created_at":"2017-04-04T15:37:12Z","updated_at":"2017-06-07T15:51:49Z","pushed_at":"2017-08-25T15:21:06Z","git_url":"git://github.com/guardian/support-frontend.git","ssh_url":"git@github.com:guardian/support-frontend.git","clone_url":"https://github.com/guardian/support-frontend.git","svn_url":"https://github.com/guardian/support-frontend","homepage":"https://support.theguardian.com/","size":1130,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/195"},"html":{"href":"https://github.com/guardian/support-frontend/pull/195"},"issue":{"href":"https://api.github.com/repos/guardian/support-frontend/issues/195"},"comments":{"href":"https://api.github.com/repos/guardian/support-frontend/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/support-frontend/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/support-frontend/statuses/1c6608bfdfc16c4521c0593b044ed379c868e3fc"}}}}
{"actor":{"display_login":"Ap0c"}}