{"action":"created","comment":{"url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/comments/196741449","pull_request_review_id":130347818,"id":196741449,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njc0MTQ0OQ==","diff_hunk":"@@ -0,0 +1,41 @@\n+import React from 'react';\n+import PropTypes from 'prop-types';\n+import TitleWithAccordionList from './section-list';\n+import HeaderSection from './section-header';\n+import HeaderLink from './section-header-link';\n+import { hasChildren } from './accordion-list';\n+\n+const NestedAccordionList = ({ title, list, styles }) => (\n+  <amp-accordion id=\"accordion\">\n+    <section className={styles.StyledSection}>\n+      <HeaderSection title={title} styles={styles} />\n+      <div>\n+        {list.hasPart.parts.map(\n+          (listItem) =>\n+            hasChildren(listItem) ? (","path":"src/app/components/navigation-menu/section-nested-list.js","position":15,"original_position":15,"commit_id":"f7327f240aa7c61ecee7bd9c0f30f5674dff8d88","original_commit_id":"f7327f240aa7c61ecee7bd9c0f30f5674dff8d88","user":{"login":"dosyara","id":938947,"node_id":"MDQ6VXNlcjkzODk0Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/938947?v=4","gravatar_id":"","url":"https://api.github.com/users/dosyara","html_url":"https://github.com/dosyara","followers_url":"https://api.github.com/users/dosyara/followers","following_url":"https://api.github.com/users/dosyara/following{/other_user}","gists_url":"https://api.github.com/users/dosyara/gists{/gist_id}","starred_url":"https://api.github.com/users/dosyara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dosyara/subscriptions","organizations_url":"https://api.github.com/users/dosyara/orgs","repos_url":"https://api.github.com/users/dosyara/repos","events_url":"https://api.github.com/users/dosyara/events{/privacy}","received_events_url":"https://api.github.com/users/dosyara/received_events","type":"User","site_admin":false},"body":"I believe this logic repeats `AccordionListItem`. I did quick test, it seems that we can replace this ternary with `AccordionListItem` component","created_at":"2018-06-20T11:36:44Z","updated_at":"2018-06-20T11:44:16Z","html_url":"https://github.com/EconomistDigitalSolutions/amp/pull/67#discussion_r196741449","pull_request_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/comments/196741449"},"html":{"href":"https://github.com/EconomistDigitalSolutions/amp/pull/67#discussion_r196741449"},"pull_request":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67","id":195865830,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODY1ODMw","html_url":"https://github.com/EconomistDigitalSolutions/amp/pull/67","diff_url":"https://github.com/EconomistDigitalSolutions/amp/pull/67.diff","patch_url":"https://github.com/EconomistDigitalSolutions/amp/pull/67.patch","issue_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/67","number":67,"state":"open","locked":false,"title":"AMP-64 - Draft version 2","user":{"login":"yasgreen93","id":15678246,"node_id":"MDQ6VXNlcjE1Njc4MjQ2","avatar_url":"https://avatars1.githubusercontent.com/u/15678246?v=4","gravatar_id":"","url":"https://api.github.com/users/yasgreen93","html_url":"https://github.com/yasgreen93","followers_url":"https://api.github.com/users/yasgreen93/followers","following_url":"https://api.github.com/users/yasgreen93/following{/other_user}","gists_url":"https://api.github.com/users/yasgreen93/gists{/gist_id}","starred_url":"https://api.github.com/users/yasgreen93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasgreen93/subscriptions","organizations_url":"https://api.github.com/users/yasgreen93/orgs","repos_url":"https://api.github.com/users/yasgreen93/repos","events_url":"https://api.github.com/users/yasgreen93/events{/privacy}","received_events_url":"https://api.github.com/users/yasgreen93/received_events","type":"User","site_admin":false},"body":"This PR basically refactors the accordion menu into something less recursive and more readable.\r\n\r\nTake your pick - which way is best? If you have something better, let's go through it!","created_at":"2018-06-19T15:22:09Z","updated_at":"2018-06-20T11:44:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa3f18e07edd4afb64f9ea37924e4359ecf3d21f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67/commits","review_comments_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67/comments","review_comment_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/67/comments","statuses_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/statuses/f7327f240aa7c61ecee7bd9c0f30f5674dff8d88","head":{"label":"yasgreen93:accordion-refactoring","ref":"accordion-refactoring","sha":"f7327f240aa7c61ecee7bd9c0f30f5674dff8d88","user":{"login":"yasgreen93","id":15678246,"node_id":"MDQ6VXNlcjE1Njc4MjQ2","avatar_url":"https://avatars1.githubusercontent.com/u/15678246?v=4","gravatar_id":"","url":"https://api.github.com/users/yasgreen93","html_url":"https://github.com/yasgreen93","followers_url":"https://api.github.com/users/yasgreen93/followers","following_url":"https://api.github.com/users/yasgreen93/following{/other_user}","gists_url":"https://api.github.com/users/yasgreen93/gists{/gist_id}","starred_url":"https://api.github.com/users/yasgreen93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasgreen93/subscriptions","organizations_url":"https://api.github.com/users/yasgreen93/orgs","repos_url":"https://api.github.com/users/yasgreen93/repos","events_url":"https://api.github.com/users/yasgreen93/events{/privacy}","received_events_url":"https://api.github.com/users/yasgreen93/received_events","type":"User","site_admin":false},"repo":{"id":131695344,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE2OTUzNDQ=","name":"amp","full_name":"yasgreen93/amp","owner":{"login":"yasgreen93","id":15678246,"node_id":"MDQ6VXNlcjE1Njc4MjQ2","avatar_url":"https://avatars1.githubusercontent.com/u/15678246?v=4","gravatar_id":"","url":"https://api.github.com/users/yasgreen93","html_url":"https://github.com/yasgreen93","followers_url":"https://api.github.com/users/yasgreen93/followers","following_url":"https://api.github.com/users/yasgreen93/following{/other_user}","gists_url":"https://api.github.com/users/yasgreen93/gists{/gist_id}","starred_url":"https://api.github.com/users/yasgreen93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasgreen93/subscriptions","organizations_url":"https://api.github.com/users/yasgreen93/orgs","repos_url":"https://api.github.com/users/yasgreen93/repos","events_url":"https://api.github.com/users/yasgreen93/events{/privacy}","received_events_url":"https://api.github.com/users/yasgreen93/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yasgreen93/amp","description":null,"fork":true,"url":"https://api.github.com/repos/yasgreen93/amp","forks_url":"https://api.github.com/repos/yasgreen93/amp/forks","keys_url":"https://api.github.com/repos/yasgreen93/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yasgreen93/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yasgreen93/amp/teams","hooks_url":"https://api.github.com/repos/yasgreen93/amp/hooks","issue_events_url":"https://api.github.com/repos/yasgreen93/amp/issues/events{/number}","events_url":"https://api.github.com/repos/yasgreen93/amp/events","assignees_url":"https://api.github.com/repos/yasgreen93/amp/assignees{/user}","branches_url":"https://api.github.com/repos/yasgreen93/amp/branches{/branch}","tags_url":"https://api.github.com/repos/yasgreen93/amp/tags","blobs_url":"https://api.github.com/repos/yasgreen93/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yasgreen93/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yasgreen93/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/yasgreen93/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yasgreen93/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/yasgreen93/amp/languages","stargazers_url":"https://api.github.com/repos/yasgreen93/amp/stargazers","contributors_url":"https://api.github.com/repos/yasgreen93/amp/contributors","subscribers_url":"https://api.github.com/repos/yasgreen93/amp/subscribers","subscription_url":"https://api.github.com/repos/yasgreen93/amp/subscription","commits_url":"https://api.github.com/repos/yasgreen93/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/yasgreen93/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/yasgreen93/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/yasgreen93/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/yasgreen93/amp/contents/{+path}","compare_url":"https://api.github.com/repos/yasgreen93/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yasgreen93/amp/merges","archive_url":"https://api.github.com/repos/yasgreen93/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yasgreen93/amp/downloads","issues_url":"https://api.github.com/repos/yasgreen93/amp/issues{/number}","pulls_url":"https://api.github.com/repos/yasgreen93/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/yasgreen93/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/yasgreen93/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yasgreen93/amp/labels{/name}","releases_url":"https://api.github.com/repos/yasgreen93/amp/releases{/id}","deployments_url":"https://api.github.com/repos/yasgreen93/amp/deployments","created_at":"2018-05-01T09:17:08Z","updated_at":"2018-06-20T10:41:47Z","pushed_at":"2018-06-20T10:43:47Z","git_url":"git://github.com/yasgreen93/amp.git","ssh_url":"git@github.com:yasgreen93/amp.git","clone_url":"https://github.com/yasgreen93/amp.git","svn_url":"https://github.com/yasgreen93/amp","homepage":null,"size":819,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"EconomistDigitalSolutions:master","ref":"master","sha":"9cb933723ce33ce3f01c1dcb52c47f1b7db762d3","user":{"login":"EconomistDigitalSolutions","id":2428011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0MjgwMTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2428011?v=4","gravatar_id":"","url":"https://api.github.com/users/EconomistDigitalSolutions","html_url":"https://github.com/EconomistDigitalSolutions","followers_url":"https://api.github.com/users/EconomistDigitalSolutions/followers","following_url":"https://api.github.com/users/EconomistDigitalSolutions/following{/other_user}","gists_url":"https://api.github.com/users/EconomistDigitalSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/EconomistDigitalSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EconomistDigitalSolutions/subscriptions","organizations_url":"https://api.github.com/users/EconomistDigitalSolutions/orgs","repos_url":"https://api.github.com/users/EconomistDigitalSolutions/repos","events_url":"https://api.github.com/users/EconomistDigitalSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/EconomistDigitalSolutions/received_events","type":"Organization","site_admin":false},"repo":{"id":131576047,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE1NzYwNDc=","name":"amp","full_name":"EconomistDigitalSolutions/amp","owner":{"login":"EconomistDigitalSolutions","id":2428011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0MjgwMTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2428011?v=4","gravatar_id":"","url":"https://api.github.com/users/EconomistDigitalSolutions","html_url":"https://github.com/EconomistDigitalSolutions","followers_url":"https://api.github.com/users/EconomistDigitalSolutions/followers","following_url":"https://api.github.com/users/EconomistDigitalSolutions/following{/other_user}","gists_url":"https://api.github.com/users/EconomistDigitalSolutions/gists{/gist_id}","starred_url":"https://api.github.com/users/EconomistDigitalSolutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EconomistDigitalSolutions/subscriptions","organizations_url":"https://api.github.com/users/EconomistDigitalSolutions/orgs","repos_url":"https://api.github.com/users/EconomistDigitalSolutions/repos","events_url":"https://api.github.com/users/EconomistDigitalSolutions/events{/privacy}","received_events_url":"https://api.github.com/users/EconomistDigitalSolutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EconomistDigitalSolutions/amp","description":null,"fork":false,"url":"https://api.github.com/repos/EconomistDigitalSolutions/amp","forks_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/forks","keys_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/teams","hooks_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/hooks","issue_events_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/events{/number}","events_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/events","assignees_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/assignees{/user}","branches_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/branches{/branch}","tags_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/tags","blobs_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/languages","stargazers_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/stargazers","contributors_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/contributors","subscribers_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/subscribers","subscription_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/subscription","commits_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/contents/{+path}","compare_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/merges","archive_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/downloads","issues_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues{/number}","pulls_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/labels{/name}","releases_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/releases{/id}","deployments_url":"https://api.github.com/repos/EconomistDigitalSolutions/amp/deployments","created_at":"2018-04-30T09:12:07Z","updated_at":"2018-06-20T11:02:41Z","pushed_at":"2018-06-20T11:02:37Z","git_url":"git://github.com/EconomistDigitalSolutions/amp.git","ssh_url":"git@github.com:EconomistDigitalSolutions/amp.git","clone_url":"https://github.com/EconomistDigitalSolutions/amp.git","svn_url":"https://github.com/EconomistDigitalSolutions/amp","homepage":null,"size":803,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":4,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67"},"html":{"href":"https://github.com/EconomistDigitalSolutions/amp/pull/67"},"issue":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/67"},"comments":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/EconomistDigitalSolutions/amp/statuses/f7327f240aa7c61ecee7bd9c0f30f5674dff8d88"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dosyara"}}