{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/2627","repository_url":"https://api.github.com/repos/riot/riot","labels_url":"https://api.github.com/repos/riot/riot/issues/2627/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/2627/comments","events_url":"https://api.github.com/repos/riot/riot/issues/2627/events","html_url":"https://github.com/riot/riot/issues/2627","id":369810353,"node_id":"MDU6SXNzdWUzNjk4MTAzNTM=","number":2627,"title":"Would like to extend virtual tags","user":{"login":"virtuald","id":567900,"node_id":"MDQ6VXNlcjU2NzkwMA==","avatar_url":"https://avatars3.githubusercontent.com/u/567900?v=4","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"labels":[{"id":244158245,"node_id":"MDU6TGFiZWwyNDQxNTgyNDU=","url":"https://api.github.com/repos/riot/riot/labels/answered","name":"answered","color":"000000","default":false},{"id":211217663,"node_id":"MDU6TGFiZWwyMTEyMTc2NjM=","url":"https://api.github.com/repos/riot/riot/labels/question","name":"question","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-13T15:04:03Z","updated_at":"2018-10-18T01:44:29Z","closed_at":null,"author_association":"NONE","body":"1. Describe your issue:\r\n\r\nI'm hacking away at the router/route tags in riot-route to make them better support nested operation, and one thing that I keep running into is that it would be really nice if in the child tag I could easily reference the parent containing tag.\r\n\r\n```\r\n<my-tag>\r\n  <router>\r\n    <route path=\"foo\"><child-tag></child-tag></route>\r\n  </router>\r\n</my-tag>\r\n\r\n<child-tag>\r\n  <p>{ parent.something }</p>\r\n</child-tag>\r\n```\r\n\r\nUnfortunately, in the child-tag, parent is not `my-tag`, but rather the `route` tag. Because router/route don't provide any value other than routing, I'd like to make them 'inherit' virtual so that `parent` in child-tag refers to `my-tag`.\r\n\r\nCurrently the workaround is to add something that refers to the container via `this.parent.parent.parent` ... but that's a bit awkward.\r\n\r\n4. Which version of Riot does it affect?\r\n\r\n3.x\r\n\r\n5. How would you tag this issue?\r\n\r\nQuestion/enhancement\r\n\r\nThanks for the great work on Riot!"},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/430846473","html_url":"https://github.com/riot/riot/issues/2627#issuecomment-430846473","issue_url":"https://api.github.com/repos/riot/riot/issues/2627","id":430846473,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDg0NjQ3Mw==","user":{"login":"virtuald","id":567900,"node_id":"MDQ6VXNlcjU2NzkwMA==","avatar_url":"https://avatars3.githubusercontent.com/u/567900?v=4","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T01:44:29Z","updated_at":"2018-10-18T01:44:29Z","author_association":"NONE","body":"Using globals to accomplish this isn't a good workaround in my opinion. My router/route improvements make it possible to do deeply a nested router/route setup without requiring the children to know the full path to themselves (which is a limitation of the current router/route tags as implemented). At some point I'll sit down and PR those changes... \r\n\r\nBecause of this nesting, I'd like to retain the child-parent relationship and set the data via that relationship (which is why it seems like overriding virtual is an ideal solution).\r\n\r\nI suppose if the child mixin divined the full path to itself, and retrieved the data via that relationship, it would be somewhat ok (though, would need to make an unmount callback to cleanup the global data)... but that still feels hacky? I guess it could work. It would be cleaner to override virtual I think.\r\n\r\nIf you're not interested in overriding virtual, then feel free to close this."}}
{"actor":{"display_login":"virtuald"}}