{"action":"created","comment":{"url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/comments/41430301","id":41430301,"diff_hunk":"@@ -0,0 +1,56 @@\n+import React, { PropTypes } from 'react';\n+import classnames from 'classnames';\n+\n+import List from '@economist/component-list';\n+\n+import isPropTypeComponent from './is-proptype-component';\n+\n+export default class ListOfComponent extends React.Component {\n+\n+  static get propTypes() {\n+    return {\n+      className: PropTypes.string,\n+      data: PropTypes.arrayOf(PropTypes.object),\n+      component: isPropTypeComponent,\n+      childMetadata: PropTypes.object,\n+      handleFocusChange: PropTypes.func,\n+    };\n+  }\n+\n+  static get defaultProps() {\n+    return {\n+      data: [],\n+      childMetadata: {},\n+    };\n+  }\n+\n+  constructor(props) {\n+    super(props);\n+\n+    this.renderChildComponent = this.renderChildComponent.bind(this);","path":"list-of-component.es6","position":30,"original_position":30,"commit_id":"8ed39303215d94855e4d0c363d22580271b37ef7","original_commit_id":"8ed39303215d94855e4d0c363d22580271b37ef7","user":{"login":"keithamus","id":118266,"avatar_url":"https://avatars.githubusercontent.com/u/118266?v=3","gravatar_id":"","url":"https://api.github.com/users/keithamus","html_url":"https://github.com/keithamus","followers_url":"https://api.github.com/users/keithamus/followers","following_url":"https://api.github.com/users/keithamus/following{/other_user}","gists_url":"https://api.github.com/users/keithamus/gists{/gist_id}","starred_url":"https://api.github.com/users/keithamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithamus/subscriptions","organizations_url":"https://api.github.com/users/keithamus/orgs","repos_url":"https://api.github.com/users/keithamus/repos","events_url":"https://api.github.com/users/keithamus/events{/privacy}","received_events_url":"https://api.github.com/users/keithamus/received_events","type":"User","site_admin":false},"body":"Its really about optimization and the slippery slope. Binding doubles the memory of that function (its a whole new function you're saving), while passing another argument to map is a smaller overhead. Likely to be pretty unnoticeable for this one occurrence, but hundreds of these across every component could add up fast.","created_at":"2015-10-07T18:52:29Z","updated_at":"2015-10-07T18:52:29Z","html_url":"https://github.com/economist-components/component-win-navigation/pull/9#discussion_r41430301","pull_request_url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/comments/41430301"},"html":{"href":"https://github.com/economist-components/component-win-navigation/pull/9#discussion_r41430301"},"pull_request":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9","id":46906480,"html_url":"https://github.com/economist-components/component-win-navigation/pull/9","diff_url":"https://github.com/economist-components/component-win-navigation/pull/9.diff","patch_url":"https://github.com/economist-components/component-win-navigation/pull/9.patch","issue_url":"https://api.github.com/repos/economist-components/component-win-navigation/issues/9","number":9,"state":"open","locked":false,"title":"Initial version of Navigation","user":{"login":"sebinsua","id":152098,"avatar_url":"https://avatars.githubusercontent.com/u/152098?v=3","gravatar_id":"","url":"https://api.github.com/users/sebinsua","html_url":"https://github.com/sebinsua","followers_url":"https://api.github.com/users/sebinsua/followers","following_url":"https://api.github.com/users/sebinsua/following{/other_user}","gists_url":"https://api.github.com/users/sebinsua/gists{/gist_id}","starred_url":"https://api.github.com/users/sebinsua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebinsua/subscriptions","organizations_url":"https://api.github.com/users/sebinsua/orgs","repos_url":"https://api.github.com/users/sebinsua/repos","events_url":"https://api.github.com/users/sebinsua/events{/privacy}","received_events_url":"https://api.github.com/users/sebinsua/received_events","type":"User","site_admin":false},"body":"> Multi-level navigation of articles.\r\n\r\n## Example\r\n\r\n**[You should be able to try it out here](http://sebinsua.github.io/component-win-navigation)**.\r\n\r\nHowever, please note that running `npm run pages` broke the fonts and icon `[0]`.\r\n\r\n## Description\r\n\r\nGiven [a list of articles in a category/subcategory hierarchy](https://github.com/sebinsua/component-win-navigation/blob/master/test/data/large.json), `Navigation` generates a nested list structure with focus and active states.\r\n\r\nState is held within the parent component, and clicking on a child `NavigationItem`s modifies it. The resultant nested list structure is decorated with `--focus` and `--active` classes.\r\n\r\n## What exists?\r\n\r\nIt is functional and looks like the original design we were given.\r\n\r\nI have separated everything into separate components.\r\n\r\nEvery component is unit tested. There are 51 tests in total. It is linted.\r\n\r\nIt was developed with `component-devpack` and the latest react `0.14.0-rc1`.\r\n\r\nIt should be accessible.\r\n\r\n## What hasn't been done?\r\n\r\nWe have [not yet componentized all of the CSS and fonts that it uses.](https://github.com/economist-components/component-win-navigation/issues/2)\r\n\r\nThere are [a number of features which could be added in another PR](https://github.com/economist-components/component-win-navigation/issues).\r\n\r\nI have [an idea for a refactor that will separate a generalised core from the module as `component-navigation`](https://github.com/economist-components/component-win-navigation/issues/1).\r\n\r\n**I would prefer that each of these remaining issues get handled within other PRs.**\r\n\r\n__________________________________\r\n\r\n`[0]` There are 404s in the example since your GitHub pages are accessible at a relation path `/${component-name}` while the assets of [`@economist/component-icon`](https://github.com/economist-components/component-icon/blob/614585350cb28dc62a6f924275b194a7c54091d5/index.es6#L19) and [`@economist/component-font-neutra2`](https://github.com/the-economist-editorial/component-font-neutra2/blob/master/index.css#L4) are presumed to exist at an absolute path `/assets`. I will submit bug reports or fixes for these issues.","created_at":"2015-10-06T14:02:33Z","updated_at":"2015-10-07T18:52:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63285998e99af9b3a674a4a8574a54131458063d","assignee":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9/commits","review_comments_url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9/comments","review_comment_url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/economist-components/component-win-navigation/issues/9/comments","statuses_url":"https://api.github.com/repos/economist-components/component-win-navigation/statuses/8ed39303215d94855e4d0c363d22580271b37ef7","head":{"label":"sebinsua:master","ref":"master","sha":"8ed39303215d94855e4d0c363d22580271b37ef7","user":{"login":"sebinsua","id":152098,"avatar_url":"https://avatars.githubusercontent.com/u/152098?v=3","gravatar_id":"","url":"https://api.github.com/users/sebinsua","html_url":"https://github.com/sebinsua","followers_url":"https://api.github.com/users/sebinsua/followers","following_url":"https://api.github.com/users/sebinsua/following{/other_user}","gists_url":"https://api.github.com/users/sebinsua/gists{/gist_id}","starred_url":"https://api.github.com/users/sebinsua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebinsua/subscriptions","organizations_url":"https://api.github.com/users/sebinsua/orgs","repos_url":"https://api.github.com/users/sebinsua/repos","events_url":"https://api.github.com/users/sebinsua/events{/privacy}","received_events_url":"https://api.github.com/users/sebinsua/received_events","type":"User","site_admin":false},"repo":{"id":43000903,"name":"component-win-navigation","full_name":"sebinsua/component-win-navigation","owner":{"login":"sebinsua","id":152098,"avatar_url":"https://avatars.githubusercontent.com/u/152098?v=3","gravatar_id":"","url":"https://api.github.com/users/sebinsua","html_url":"https://github.com/sebinsua","followers_url":"https://api.github.com/users/sebinsua/followers","following_url":"https://api.github.com/users/sebinsua/following{/other_user}","gists_url":"https://api.github.com/users/sebinsua/gists{/gist_id}","starred_url":"https://api.github.com/users/sebinsua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebinsua/subscriptions","organizations_url":"https://api.github.com/users/sebinsua/orgs","repos_url":"https://api.github.com/users/sebinsua/repos","events_url":"https://api.github.com/users/sebinsua/events{/privacy}","received_events_url":"https://api.github.com/users/sebinsua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebinsua/component-win-navigation","description":"Multi-level navigation of articles.","fork":true,"url":"https://api.github.com/repos/sebinsua/component-win-navigation","forks_url":"https://api.github.com/repos/sebinsua/component-win-navigation/forks","keys_url":"https://api.github.com/repos/sebinsua/component-win-navigation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebinsua/component-win-navigation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebinsua/component-win-navigation/teams","hooks_url":"https://api.github.com/repos/sebinsua/component-win-navigation/hooks","issue_events_url":"https://api.github.com/repos/sebinsua/component-win-navigation/issues/events{/number}","events_url":"https://api.github.com/repos/sebinsua/component-win-navigation/events","assignees_url":"https://api.github.com/repos/sebinsua/component-win-navigation/assignees{/user}","branches_url":"https://api.github.com/repos/sebinsua/component-win-navigation/branches{/branch}","tags_url":"https://api.github.com/repos/sebinsua/component-win-navigation/tags","blobs_url":"https://api.github.com/repos/sebinsua/component-win-navigation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebinsua/component-win-navigation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebinsua/component-win-navigation/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebinsua/component-win-navigation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebinsua/component-win-navigation/statuses/{sha}","languages_url":"https://api.github.com/repos/sebinsua/component-win-navigation/languages","stargazers_url":"https://api.github.com/repos/sebinsua/component-win-navigation/stargazers","contributors_url":"https://api.github.com/repos/sebinsua/component-win-navigation/contributors","subscribers_url":"https://api.github.com/repos/sebinsua/component-win-navigation/subscribers","subscription_url":"https://api.github.com/repos/sebinsua/component-win-navigation/subscription","commits_url":"https://api.github.com/repos/sebinsua/component-win-navigation/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebinsua/component-win-navigation/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebinsua/component-win-navigation/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebinsua/component-win-navigation/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebinsua/component-win-navigation/contents/{+path}","compare_url":"https://api.github.com/repos/sebinsua/component-win-navigation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebinsua/component-win-navigation/merges","archive_url":"https://api.github.com/repos/sebinsua/component-win-navigation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebinsua/component-win-navigation/downloads","issues_url":"https://api.github.com/repos/sebinsua/component-win-navigation/issues{/number}","pulls_url":"https://api.github.com/repos/sebinsua/component-win-navigation/pulls{/number}","milestones_url":"https://api.github.com/repos/sebinsua/component-win-navigation/milestones{/number}","notifications_url":"https://api.github.com/repos/sebinsua/component-win-navigation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebinsua/component-win-navigation/labels{/name}","releases_url":"https://api.github.com/repos/sebinsua/component-win-navigation/releases{/id}","created_at":"2015-09-23T12:57:32Z","updated_at":"2015-09-30T12:00:05Z","pushed_at":"2015-10-07T14:53:49Z","git_url":"git://github.com/sebinsua/component-win-navigation.git","ssh_url":"git@github.com:sebinsua/component-win-navigation.git","clone_url":"https://github.com/sebinsua/component-win-navigation.git","svn_url":"https://github.com/sebinsua/component-win-navigation","homepage":"","size":1740,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"economist-components:master","ref":"master","sha":"d4ca7a461504dac49a8ad9afd1cc7c935d7da2d8","user":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"repo":{"id":43000700,"name":"component-win-navigation","full_name":"economist-components/component-win-navigation","owner":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/economist-components/component-win-navigation","description":"","fork":false,"url":"https://api.github.com/repos/economist-components/component-win-navigation","forks_url":"https://api.github.com/repos/economist-components/component-win-navigation/forks","keys_url":"https://api.github.com/repos/economist-components/component-win-navigation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/economist-components/component-win-navigation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/economist-components/component-win-navigation/teams","hooks_url":"https://api.github.com/repos/economist-components/component-win-navigation/hooks","issue_events_url":"https://api.github.com/repos/economist-components/component-win-navigation/issues/events{/number}","events_url":"https://api.github.com/repos/economist-components/component-win-navigation/events","assignees_url":"https://api.github.com/repos/economist-components/component-win-navigation/assignees{/user}","branches_url":"https://api.github.com/repos/economist-components/component-win-navigation/branches{/branch}","tags_url":"https://api.github.com/repos/economist-components/component-win-navigation/tags","blobs_url":"https://api.github.com/repos/economist-components/component-win-navigation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/economist-components/component-win-navigation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/economist-components/component-win-navigation/git/refs{/sha}","trees_url":"https://api.github.com/repos/economist-components/component-win-navigation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/economist-components/component-win-navigation/statuses/{sha}","languages_url":"https://api.github.com/repos/economist-components/component-win-navigation/languages","stargazers_url":"https://api.github.com/repos/economist-components/component-win-navigation/stargazers","contributors_url":"https://api.github.com/repos/economist-components/component-win-navigation/contributors","subscribers_url":"https://api.github.com/repos/economist-components/component-win-navigation/subscribers","subscription_url":"https://api.github.com/repos/economist-components/component-win-navigation/subscription","commits_url":"https://api.github.com/repos/economist-components/component-win-navigation/commits{/sha}","git_commits_url":"https://api.github.com/repos/economist-components/component-win-navigation/git/commits{/sha}","comments_url":"https://api.github.com/repos/economist-components/component-win-navigation/comments{/number}","issue_comment_url":"https://api.github.com/repos/economist-components/component-win-navigation/issues/comments{/number}","contents_url":"https://api.github.com/repos/economist-components/component-win-navigation/contents/{+path}","compare_url":"https://api.github.com/repos/economist-components/component-win-navigation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/economist-components/component-win-navigation/merges","archive_url":"https://api.github.com/repos/economist-components/component-win-navigation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/economist-components/component-win-navigation/downloads","issues_url":"https://api.github.com/repos/economist-components/component-win-navigation/issues{/number}","pulls_url":"https://api.github.com/repos/economist-components/component-win-navigation/pulls{/number}","milestones_url":"https://api.github.com/repos/economist-components/component-win-navigation/milestones{/number}","notifications_url":"https://api.github.com/repos/economist-components/component-win-navigation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/economist-components/component-win-navigation/labels{/name}","releases_url":"https://api.github.com/repos/economist-components/component-win-navigation/releases{/id}","created_at":"2015-09-23T12:53:08Z","updated_at":"2015-09-23T12:53:08Z","pushed_at":"2015-10-07T14:52:33Z","git_url":"git://github.com/economist-components/component-win-navigation.git","ssh_url":"git@github.com:economist-components/component-win-navigation.git","clone_url":"https://github.com/economist-components/component-win-navigation.git","svn_url":"https://github.com/economist-components/component-win-navigation","homepage":null,"size":1680,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":13,"forks":1,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9"},"html":{"href":"https://github.com/economist-components/component-win-navigation/pull/9"},"issue":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/issues/9"},"comments":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/economist-components/component-win-navigation/statuses/8ed39303215d94855e4d0c363d22580271b37ef7"}}}}