-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle subscriptions at the template level for components like comment replies #6
Comments
erasaur
added a commit
that referenced
this issue
Apr 28, 2015
…oxes). This can probably be fixed if we don't have the Session holding the shown replies as a dependency in the route subscriptions, since that is triggering a re-run of the commentReplies subscription. One way to do it is to handle the comment replies subs per comment reply box (see #6)
erasaur
added a commit
that referenced
this issue
Apr 28, 2015
erasaur
added a commit
that referenced
this issue
May 2, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #2
Edit: This is an untested pattern but it seems like it might work.
Even for things like showing the list of comments in a topic, subscribing at the route-level is problematic. When infinite scrolling causes
Session.get('itemsLimit')
to change, the layout-related calls (e.gthis.render('nav', { to: 'nav' })
) are re-run so the entire page 'flashes' and shoots back up to the top. Handling the topic comments as a component is a convenient way to fix this.Alternatively, for things like topic lists that don't seem to fit well within template subs (or that we want to handle with subs-manager or fast-render), we could store the limit on the controller and handle subscriptions as usual. The drawback is that rendering any templates outside of
this.ready()
block in the action hook will cause the page 'flash' issue so there is less flexibility with the loading template.Maybe use nested layouts, where the wrapping layout won't rerun? (e.g things like the container and the nav shouldn't have to be rerendered)
The text was updated successfully, but these errors were encountered: