{"action":"opened","number":641,"pull_request":{"url":"https://api.github.com/repos/vuejs/vue-router/pulls/641","id":83923416,"html_url":"https://github.com/vuejs/vue-router/pull/641","diff_url":"https://github.com/vuejs/vue-router/pull/641.diff","patch_url":"https://github.com/vuejs/vue-router/pull/641.patch","issue_url":"https://api.github.com/repos/vuejs/vue-router/issues/641","number":641,"state":"open","locked":false,"title":"Fix  #629 - add warning when named route has a default child route.","user":{"login":"LinusBorg","id":1444526,"avatar_url":"https://avatars.githubusercontent.com/u/1444526?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\n\r\nThis change will log a warning to the console when the developer has defined a named route that also has a default child route.  The warning reads like this: \r\n\r\n> [vue-router] Named Route 'bar' has a default child route.\r\n>        When navigating to this named route (to=\"{name: bar}\"),\r\n>        the default child route will not be rendered.\r\n>        Instead, use name of the default child route for named links.\r\n\r\nIt will be logged to console once, during creation of the route map. I chose this to warn the user early and make him remove the name of the parent and instead only name the child.\r\n\r\nAlternatively, we could log this warning each time there's a transition to such a route, but I would prefer to trigger upfront.\r\n\r\n### Content of the Message\r\nI'm sure the warning message can be improved, just leave a suggestion here.\r\n\r\n### Tests\r\n\r\n* I tested the warning with a modified version of the \"named routes\" example. \r\n* I did not add a test case to the e2e tests, because I did not want to put a \"bad practice\" into the example, and also, to put that into the examples I would have to mix nested and names routes, which are currently not mixed in their examples.\r\n* I did not add a unit test, because `create-route-map` has no unit tests so far.","created_at":"2016-09-04T13:52:11Z","updated_at":"2016-09-04T13:52:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da165975f3aeb3b9cf07e34cae8d4790a078110f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vue-router/pulls/641/commits","review_comments_url":"https://api.github.com/repos/vuejs/vue-router/pulls/641/comments","review_comment_url":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/641/comments","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/2fe83b81cc1abb51567dcba508f0b8ebfbc8eabd","head":{"label":"LinusBorg:warn_named_w_def_child","ref":"warn_named_w_def_child","sha":"2fe83b81cc1abb51567dcba508f0b8ebfbc8eabd","user":{"login":"LinusBorg","id":1444526,"avatar_url":"https://avatars.githubusercontent.com/u/1444526?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"repo":{"id":60989276,"name":"vue-router","full_name":"LinusBorg/vue-router","owner":{"login":"LinusBorg","id":1444526,"avatar_url":"https://avatars.githubusercontent.com/u/1444526?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LinusBorg/vue-router","description":"The official router for Vue.js.","fork":true,"url":"https://api.github.com/repos/LinusBorg/vue-router","forks_url":"https://api.github.com/repos/LinusBorg/vue-router/forks","keys_url":"https://api.github.com/repos/LinusBorg/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LinusBorg/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LinusBorg/vue-router/teams","hooks_url":"https://api.github.com/repos/LinusBorg/vue-router/hooks","issue_events_url":"https://api.github.com/repos/LinusBorg/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/LinusBorg/vue-router/events","assignees_url":"https://api.github.com/repos/LinusBorg/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/LinusBorg/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/LinusBorg/vue-router/tags","blobs_url":"https://api.github.com/repos/LinusBorg/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LinusBorg/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LinusBorg/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/LinusBorg/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LinusBorg/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/LinusBorg/vue-router/languages","stargazers_url":"https://api.github.com/repos/LinusBorg/vue-router/stargazers","contributors_url":"https://api.github.com/repos/LinusBorg/vue-router/contributors","subscribers_url":"https://api.github.com/repos/LinusBorg/vue-router/subscribers","subscription_url":"https://api.github.com/repos/LinusBorg/vue-router/subscription","commits_url":"https://api.github.com/repos/LinusBorg/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/LinusBorg/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/LinusBorg/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/LinusBorg/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/LinusBorg/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/LinusBorg/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LinusBorg/vue-router/merges","archive_url":"https://api.github.com/repos/LinusBorg/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LinusBorg/vue-router/downloads","issues_url":"https://api.github.com/repos/LinusBorg/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/LinusBorg/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/LinusBorg/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/LinusBorg/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LinusBorg/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/LinusBorg/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/LinusBorg/vue-router/deployments","created_at":"2016-06-12T21:07:21Z","updated_at":"2016-06-12T21:07:22Z","pushed_at":"2016-09-04T13:42:47Z","git_url":"git://github.com/LinusBorg/vue-router.git","ssh_url":"git@github.com:LinusBorg/vue-router.git","clone_url":"https://github.com/LinusBorg/vue-router.git","svn_url":"https://github.com/LinusBorg/vue-router","homepage":"http://router.vuejs.org/","size":3828,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"vuejs:next","ref":"next","sha":"3c7f007280cdf4a1330159dc6c9c6c855d03f765","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":15116946,"name":"vue-router","full_name":"vuejs/vue-router","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vue-router","description":"The official router for Vue.js.","fork":false,"url":"https://api.github.com/repos/vuejs/vue-router","forks_url":"https://api.github.com/repos/vuejs/vue-router/forks","keys_url":"https://api.github.com/repos/vuejs/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vue-router/teams","hooks_url":"https://api.github.com/repos/vuejs/vue-router/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vue-router/events","assignees_url":"https://api.github.com/repos/vuejs/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vue-router/tags","blobs_url":"https://api.github.com/repos/vuejs/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vue-router/languages","stargazers_url":"https://api.github.com/repos/vuejs/vue-router/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vue-router/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vue-router/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vue-router/subscription","commits_url":"https://api.github.com/repos/vuejs/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vue-router/merges","archive_url":"https://api.github.com/repos/vuejs/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vue-router/downloads","issues_url":"https://api.github.com/repos/vuejs/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vue-router/deployments","created_at":"2013-12-11T19:37:46Z","updated_at":"2016-09-04T13:41:03Z","pushed_at":"2016-09-04T13:52:11Z","git_url":"git://github.com/vuejs/vue-router.git","ssh_url":"git@github.com:vuejs/vue-router.git","clone_url":"https://github.com/vuejs/vue-router.git","svn_url":"https://github.com/vuejs/vue-router","homepage":"http://router.vuejs.org/","size":5604,"stargazers_count":2071,"watchers_count":2071,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":499,"mirror_url":null,"open_issues_count":51,"forks":499,"open_issues":51,"watchers":2071,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/641"},"html":{"href":"https://github.com/vuejs/vue-router/pull/641"},"issue":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/641"},"comments":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/641/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/641/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/641/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vue-router/statuses/2fe83b81cc1abb51567dcba508f0b8ebfbc8eabd"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"LinusBorg"}}