{"action":"opened","number":65,"pull_request":{"url":"https://api.github.com/repos/cleandart/react-dart/pulls/65","id":42352550,"html_url":"https://github.com/cleandart/react-dart/pull/65","diff_url":"https://github.com/cleandart/react-dart/pull/65.diff","patch_url":"https://github.com/cleandart/react-dart/pull/65.patch","issue_url":"https://api.github.com/repos/cleandart/react-dart/issues/65","number":65,"state":"open","locked":false,"title":"Permit variadic children (no array necessary) - refactor","user":{"login":"greglittlefield-wf","id":1713967,"avatar_url":"https://avatars.githubusercontent.com/u/1713967?v=3","gravatar_id":"","url":"https://api.github.com/users/greglittlefield-wf","html_url":"https://github.com/greglittlefield-wf","followers_url":"https://api.github.com/users/greglittlefield-wf/followers","following_url":"https://api.github.com/users/greglittlefield-wf/following{/other_user}","gists_url":"https://api.github.com/users/greglittlefield-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/greglittlefield-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglittlefield-wf/subscriptions","organizations_url":"https://api.github.com/users/greglittlefield-wf/orgs","repos_url":"https://api.github.com/users/greglittlefield-wf/repos","events_url":"https://api.github.com/users/greglittlefield-wf/events{/privacy}","received_events_url":"https://api.github.com/users/greglittlefield-wf/received_events","type":"User","site_admin":false},"body":"__This PR is a refactor of changes in https://github.com/cleandart/react-dart/pull/58__\r\n\r\n## Issue\r\nreact-dart erroneously displays the following console warning at all times because it forces all children to be specified in a Dart list / JS array:\r\n```\r\nWarning: Each child in an array or iterator should have a unique \"key\" prop. See https://fb.me/react-warning-keys for more information.\r\n```\r\n\r\n## Changes\r\n\r\n* Make ReactComponentFactoryProxy an abstract superclass, with implementations ReactDomComponentFactoryProxy and ReactDartComponentFactoryProxy. (This API consistency is useful in react_test_util and external react-dart-related tools.)\r\n  * Remove unnecessary `new JsArray.from(` conversion for DOM components.\r\n\r\n* Implement variadic support for the DOM/Dart component factories via noSuchMethod, in which children may be specified as additional arguments. These call into a React JS in a similar fashion, allowing consumers to avoid key/children warnings.\r\n  * For example:\r\n\r\n    ```dart\r\n    // Old usage that required List; logs warnings\r\n    react.div({}, [\r\n      react.span({}, 'a'),\r\n      react.span({}, 'b'),\r\n      react.span({}, 'c')\r\n    ])\r\n\r\n    // Variadic usage; no warnings\r\n    react.div({},\r\n      react.span({}, 'a'),\r\n      react.span({}, 'b'),\r\n      react.span({}, 'c')\r\n    )\r\n  ```\r\n\r\n\r\n* Add tests that verify that key/children warnings are logged only when expected, and not when using the new variadic calling method.\r\n\r\n* Pin `unittest` Pub dependency to the version required by all tests currently in the repo.\r\n\r\n## Testing\r\n* Verify that existing implementations of components with null children, a single child, or a single array of children, all work as expected (no functional change)\r\n* Verify that unit tests regarding child/key warnings in `child_key_warning_test.html` all pass.\r\n* Verify that components with multiple children (not specified as an array) render correctly, without the above warning\r\n\r\n---\r\n\r\n@trentgrover-wf \r\n@maxwellpeterson-wf\r\n@evanweible-wf\r\n@lancefisher-wf","created_at":"2015-08-13T13:52:23Z","updated_at":"2015-08-13T13:52:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cleandart/react-dart/pulls/65/commits","review_comments_url":"https://api.github.com/repos/cleandart/react-dart/pulls/65/comments","review_comment_url":"https://api.github.com/repos/cleandart/react-dart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cleandart/react-dart/issues/65/comments","statuses_url":"https://api.github.com/repos/cleandart/react-dart/statuses/5ec68b09c77a789357af7ae4fa838bd7969e2090","head":{"label":"greglittlefield-wf:killChildWarning_refactor","ref":"killChildWarning_refactor","sha":"5ec68b09c77a789357af7ae4fa838bd7969e2090","user":{"login":"greglittlefield-wf","id":1713967,"avatar_url":"https://avatars.githubusercontent.com/u/1713967?v=3","gravatar_id":"","url":"https://api.github.com/users/greglittlefield-wf","html_url":"https://github.com/greglittlefield-wf","followers_url":"https://api.github.com/users/greglittlefield-wf/followers","following_url":"https://api.github.com/users/greglittlefield-wf/following{/other_user}","gists_url":"https://api.github.com/users/greglittlefield-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/greglittlefield-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglittlefield-wf/subscriptions","organizations_url":"https://api.github.com/users/greglittlefield-wf/orgs","repos_url":"https://api.github.com/users/greglittlefield-wf/repos","events_url":"https://api.github.com/users/greglittlefield-wf/events{/privacy}","received_events_url":"https://api.github.com/users/greglittlefield-wf/received_events","type":"User","site_admin":false},"repo":{"id":32838055,"name":"react-dart","full_name":"greglittlefield-wf/react-dart","owner":{"login":"greglittlefield-wf","id":1713967,"avatar_url":"https://avatars.githubusercontent.com/u/1713967?v=3","gravatar_id":"","url":"https://api.github.com/users/greglittlefield-wf","html_url":"https://github.com/greglittlefield-wf","followers_url":"https://api.github.com/users/greglittlefield-wf/followers","following_url":"https://api.github.com/users/greglittlefield-wf/following{/other_user}","gists_url":"https://api.github.com/users/greglittlefield-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/greglittlefield-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglittlefield-wf/subscriptions","organizations_url":"https://api.github.com/users/greglittlefield-wf/orgs","repos_url":"https://api.github.com/users/greglittlefield-wf/repos","events_url":"https://api.github.com/users/greglittlefield-wf/events{/privacy}","received_events_url":"https://api.github.com/users/greglittlefield-wf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/greglittlefield-wf/react-dart","description":"Bindings for React to Dart","fork":true,"url":"https://api.github.com/repos/greglittlefield-wf/react-dart","forks_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/forks","keys_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/teams","hooks_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/hooks","issue_events_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/issues/events{/number}","events_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/events","assignees_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/assignees{/user}","branches_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/branches{/branch}","tags_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/tags","blobs_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/git/refs{/sha}","trees_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/statuses/{sha}","languages_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/languages","stargazers_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/stargazers","contributors_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/contributors","subscribers_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/subscribers","subscription_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/subscription","commits_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/commits{/sha}","git_commits_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/git/commits{/sha}","comments_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/comments{/number}","issue_comment_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/issues/comments{/number}","contents_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/contents/{+path}","compare_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/merges","archive_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/downloads","issues_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/issues{/number}","pulls_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/pulls{/number}","milestones_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/milestones{/number}","notifications_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/labels{/name}","releases_url":"https://api.github.com/repos/greglittlefield-wf/react-dart/releases{/id}","created_at":"2015-03-25T02:34:54Z","updated_at":"2015-03-25T02:34:54Z","pushed_at":"2015-08-13T13:22:50Z","git_url":"git://github.com/greglittlefield-wf/react-dart.git","ssh_url":"git@github.com:greglittlefield-wf/react-dart.git","clone_url":"https://github.com/greglittlefield-wf/react-dart.git","svn_url":"https://github.com/greglittlefield-wf/react-dart","homepage":null,"size":1124,"stargazers_count":0,"watchers_count":0,"language":"Dart","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":"cleandart:master","ref":"master","sha":"50275a2a84ebaf8d47dd63e2af6f4a8afec8e6d4","user":{"login":"cleandart","id":5911236,"avatar_url":"https://avatars.githubusercontent.com/u/5911236?v=3","gravatar_id":"","url":"https://api.github.com/users/cleandart","html_url":"https://github.com/cleandart","followers_url":"https://api.github.com/users/cleandart/followers","following_url":"https://api.github.com/users/cleandart/following{/other_user}","gists_url":"https://api.github.com/users/cleandart/gists{/gist_id}","starred_url":"https://api.github.com/users/cleandart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleandart/subscriptions","organizations_url":"https://api.github.com/users/cleandart/orgs","repos_url":"https://api.github.com/users/cleandart/repos","events_url":"https://api.github.com/users/cleandart/events{/privacy}","received_events_url":"https://api.github.com/users/cleandart/received_events","type":"Organization","site_admin":false},"repo":{"id":13674420,"name":"react-dart","full_name":"cleandart/react-dart","owner":{"login":"cleandart","id":5911236,"avatar_url":"https://avatars.githubusercontent.com/u/5911236?v=3","gravatar_id":"","url":"https://api.github.com/users/cleandart","html_url":"https://github.com/cleandart","followers_url":"https://api.github.com/users/cleandart/followers","following_url":"https://api.github.com/users/cleandart/following{/other_user}","gists_url":"https://api.github.com/users/cleandart/gists{/gist_id}","starred_url":"https://api.github.com/users/cleandart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleandart/subscriptions","organizations_url":"https://api.github.com/users/cleandart/orgs","repos_url":"https://api.github.com/users/cleandart/repos","events_url":"https://api.github.com/users/cleandart/events{/privacy}","received_events_url":"https://api.github.com/users/cleandart/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cleandart/react-dart","description":"Bindings for React to Dart","fork":false,"url":"https://api.github.com/repos/cleandart/react-dart","forks_url":"https://api.github.com/repos/cleandart/react-dart/forks","keys_url":"https://api.github.com/repos/cleandart/react-dart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cleandart/react-dart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cleandart/react-dart/teams","hooks_url":"https://api.github.com/repos/cleandart/react-dart/hooks","issue_events_url":"https://api.github.com/repos/cleandart/react-dart/issues/events{/number}","events_url":"https://api.github.com/repos/cleandart/react-dart/events","assignees_url":"https://api.github.com/repos/cleandart/react-dart/assignees{/user}","branches_url":"https://api.github.com/repos/cleandart/react-dart/branches{/branch}","tags_url":"https://api.github.com/repos/cleandart/react-dart/tags","blobs_url":"https://api.github.com/repos/cleandart/react-dart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cleandart/react-dart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cleandart/react-dart/git/refs{/sha}","trees_url":"https://api.github.com/repos/cleandart/react-dart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cleandart/react-dart/statuses/{sha}","languages_url":"https://api.github.com/repos/cleandart/react-dart/languages","stargazers_url":"https://api.github.com/repos/cleandart/react-dart/stargazers","contributors_url":"https://api.github.com/repos/cleandart/react-dart/contributors","subscribers_url":"https://api.github.com/repos/cleandart/react-dart/subscribers","subscription_url":"https://api.github.com/repos/cleandart/react-dart/subscription","commits_url":"https://api.github.com/repos/cleandart/react-dart/commits{/sha}","git_commits_url":"https://api.github.com/repos/cleandart/react-dart/git/commits{/sha}","comments_url":"https://api.github.com/repos/cleandart/react-dart/comments{/number}","issue_comment_url":"https://api.github.com/repos/cleandart/react-dart/issues/comments{/number}","contents_url":"https://api.github.com/repos/cleandart/react-dart/contents/{+path}","compare_url":"https://api.github.com/repos/cleandart/react-dart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cleandart/react-dart/merges","archive_url":"https://api.github.com/repos/cleandart/react-dart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cleandart/react-dart/downloads","issues_url":"https://api.github.com/repos/cleandart/react-dart/issues{/number}","pulls_url":"https://api.github.com/repos/cleandart/react-dart/pulls{/number}","milestones_url":"https://api.github.com/repos/cleandart/react-dart/milestones{/number}","notifications_url":"https://api.github.com/repos/cleandart/react-dart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cleandart/react-dart/labels{/name}","releases_url":"https://api.github.com/repos/cleandart/react-dart/releases{/id}","created_at":"2013-10-18T09:40:45Z","updated_at":"2015-08-12T20:32:53Z","pushed_at":"2015-08-06T06:56:16Z","git_url":"git://github.com/cleandart/react-dart.git","ssh_url":"git@github.com:cleandart/react-dart.git","clone_url":"https://github.com/cleandart/react-dart.git","svn_url":"https://github.com/cleandart/react-dart","homepage":null,"size":1382,"stargazers_count":96,"watchers_count":96,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":24,"mirror_url":null,"open_issues_count":8,"forks":24,"open_issues":8,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cleandart/react-dart/pulls/65"},"html":{"href":"https://github.com/cleandart/react-dart/pull/65"},"issue":{"href":"https://api.github.com/repos/cleandart/react-dart/issues/65"},"comments":{"href":"https://api.github.com/repos/cleandart/react-dart/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/cleandart/react-dart/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/cleandart/react-dart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cleandart/react-dart/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/cleandart/react-dart/statuses/5ec68b09c77a789357af7ae4fa838bd7969e2090"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":285,"deletions":63,"changed_files":5}}