{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/564","labels_url":"https://api.github.com/repos/riot/riot/issues/564/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/564/comments","events_url":"https://api.github.com/repos/riot/riot/issues/564/events","html_url":"https://github.com/riot/riot/issues/564","id":66171348,"number":564,"title":"Looping is at the wrong level","user":{"login":"assertnotnull","id":821567,"avatar_url":"https://avatars.githubusercontent.com/u/821567?v=3","gravatar_id":"","url":"https://api.github.com/users/assertnotnull","html_url":"https://github.com/assertnotnull","followers_url":"https://api.github.com/users/assertnotnull/followers","following_url":"https://api.github.com/users/assertnotnull/following{/other_user}","gists_url":"https://api.github.com/users/assertnotnull/gists{/gist_id}","starred_url":"https://api.github.com/users/assertnotnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assertnotnull/subscriptions","organizations_url":"https://api.github.com/users/assertnotnull/orgs","repos_url":"https://api.github.com/users/assertnotnull/repos","events_url":"https://api.github.com/users/assertnotnull/events{/privacy}","received_events_url":"https://api.github.com/users/assertnotnull/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/riot/riot/labels/enhancement","name":"enhancement","color":"eb6420"},{"url":"https://api.github.com/repos/riot/riot/labels/feature%20request","name":"feature request","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-04-03T15:42:56Z","updated_at":"2015-09-08T07:33:18Z","closed_at":null,"body":"I think looping through element is at the wrong tag level. Specially when you have this case you need to write twice the each to get it work as expected.\r\n\r\n    <dl class=\"dl-horizontal\" >\r\n\t\t<dt each={name in opts.data.metrics}>{name}</dt>\r\n\t\t<dd each={name, value in opts.data.metrics}>{value}</dd>\r\n\t</dl>\r\n\r\nIt iterates the same list twice right?\r\n\r\nShouldn't that be like this? And more efficient.\r\n\r\n    <dl class=\"dl-horizontal\" each={name, value in opts.data.metrics}>\r\n\t\t<dt>{name}</dt>\r\n\t\t<dd>{value}</dd>\r\n\t</dl>\r\n\r\nIt feels more natural too. If you base on templating engines such as Jinja http://jinja.pocoo.org/docs/dev/templates/#for"},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/138461431","html_url":"https://github.com/riot/riot/issues/564#issuecomment-138461431","issue_url":"https://api.github.com/repos/riot/riot/issues/564","id":138461431,"user":{"login":"tipiirai","id":169330,"avatar_url":"https://avatars.githubusercontent.com/u/169330?v=3","gravatar_id":"","url":"https://api.github.com/users/tipiirai","html_url":"https://github.com/tipiirai","followers_url":"https://api.github.com/users/tipiirai/followers","following_url":"https://api.github.com/users/tipiirai/following{/other_user}","gists_url":"https://api.github.com/users/tipiirai/gists{/gist_id}","starred_url":"https://api.github.com/users/tipiirai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tipiirai/subscriptions","organizations_url":"https://api.github.com/users/tipiirai/orgs","repos_url":"https://api.github.com/users/tipiirai/repos","events_url":"https://api.github.com/users/tipiirai/events{/privacy}","received_events_url":"https://api.github.com/users/tipiirai/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T07:33:18Z","updated_at":"2015-09-08T07:33:18Z","body":"I think `for` is better than `repeat`. It (kind of) suggests that the parent tag is \"a wrapper for\" all the nested looped elements. \r\n\r\nThe above `tbody` trick is a nice one indeed and I guess it's valid HTML well. "}}