{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/1942","labels_url":"https://api.github.com/repos/hypothesis/h/issues/1942/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/1942/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/1942/events","html_url":"https://github.com/hypothesis/h/pull/1942","id":57471829,"number":1942,"title":"Thread list","user":{"login":"nickstenning","id":3602,"avatar_url":"https://avatars.githubusercontent.com/u/3602?v=3","gravatar_id":"","url":"https://api.github.com/users/nickstenning","html_url":"https://github.com/nickstenning","followers_url":"https://api.github.com/users/nickstenning/followers","following_url":"https://api.github.com/users/nickstenning/following{/other_user}","gists_url":"https://api.github.com/users/nickstenning/gists{/gist_id}","starred_url":"https://api.github.com/users/nickstenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickstenning/subscriptions","organizations_url":"https://api.github.com/users/nickstenning/orgs","repos_url":"https://api.github.com/users/nickstenning/repos","events_url":"https://api.github.com/users/nickstenning/events{/privacy}","received_events_url":"https://api.github.com/users/nickstenning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-12T15:07:59Z","updated_at":"2015-02-17T05:00:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/1942","html_url":"https://github.com/hypothesis/h/pull/1942","diff_url":"https://github.com/hypothesis/h/pull/1942.diff","patch_url":"https://github.com/hypothesis/h/pull/1942.patch"},"body":"This set of changes attempts to make the thread directive easier to understand by turning it into a more normal angular directive that has a consistent template.\r\n\r\nIn order to do this, a new directive, `threadList`, is introduced, which is responsible for rendering the top-level list of cards, leaving the `thread` directive responsible solely for a single annotation and its replies."},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/74617382","html_url":"https://github.com/hypothesis/h/pull/1942#issuecomment-74617382","issue_url":"https://api.github.com/repos/hypothesis/h/issues/1942","id":74617382,"user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T05:00:40Z","updated_at":"2015-02-17T05:00:40Z","body":"@nickstenning after talking with you about this today, what do you think if I simply replace the recursive part with my recursive directive from my plunk?\r\n\r\nI know you said you think it may be too clever and you don't know if you could predict how it affects scope, but it's actually really easy. It doesn't create a new scope, isolated or otherwise. The entire recursion happens irrespective of scope. The children only have a new scope if the template uses other directives that cause a new scope to be created before or at the point of recursion.\r\n\r\nI think my directive is also superior because it does less compilation. Both depend upon deferring some work until linking so that the base case has a chance to cull the recursive elements (such as an empty repeat). However, the helper service breaks the compilation and defers it until link time, causing causing compilation at every recursive call. My directive lets angular do the compilation once using the transclude attribute and makes the transclude linking function available to the recursion via controller inheritance.\r\n\r\nThey differ in that the helper service lets you make a directive recursive while mine only makes a template recursive and cannot be used at the same point as another directive that has a template. However, that also means that mine is more isolated in some sense."}}