[New Guide] Composing Components#66
Conversation
There was a problem hiding this comment.
Need to bind in some data otherwise it's unclear where those titles are coming from below...
There was a problem hiding this comment.
Keep em coming! Would love to make this a super nice guide!
|
I'll review and make suggestions. Thanks for the link to this. |
There was a problem hiding this comment.
Need to pass users in here:
{{#user-list users=model sortBy='name' as |user|}}
|
Ping @trek |
|
Seems like momentum on this PR has been lost... |
|
@bf4 I think it's due to the fact that actions have changed in 1.13, so maybe a revision is in order. |
|
I'll try to tackle the changes this weekend. Would love for some people to be ready to check it once I have those in. |
|
@knownasilya ping me if/when you do |
|
Already started, please review up until the CONTINUE HERE section. |
There was a problem hiding this comment.
I also don't know how futureproof default form of a component is, given CLI's default template for a component is {{yield}}
|
Thanks for the comments! Will sort them out. |
There was a problem hiding this comment.
Is it sending data down though, if the yielded template is in the same context as the yielding component?
There was a problem hiding this comment.
Down to the block/child components/elements.
|
Sounds like it could be done, as long as we know what the TOC is for that section. |
|
Yeah, that's a bit tough, because I imagine the Components section will have to be re-thought a bit when routable components lands. I'd lean towards just incorporating your ideas into the guides as they are now and not worry too much about the future, because the future is uncertain and your ideas are good :) But maybe I am not enough of a visionary. @trek, do you have any guidance here? |
There was a problem hiding this comment.
That this first example uses #each and yield together is a bit intense.
At the least I suggest where we output a headline and yielded body for each post.
|
@mixonic thanks for the comments. |
There was a problem hiding this comment.
subexpression, targetObject I don't think they will knoe what that means.
(action reads a property off the actions hash of the current context, then creates a closure over that function and any arguments you pass.
|
@knownasilya sorry this took me so long to look at. I am in theory 👍 on a merge if we get it polished up. @trek gets veto power if he wants to wait on an alternative TOC, but the worst that happens is that is gets refactored into that new TOC when it arrives IMO. |
|
Will have a look at the comments and make the changes as soon as I can, hopefully tonight. |
|
@mixonic @michaelrkn all set |
There was a problem hiding this comment.
as we saw in the previous section reads awkwardly.
[New Guide] Composing Components
|
👍 good improvements! Thanks for pushing on this. |
|
🍪 for you @knownasilya :) thanks |
|
Thanks all for proof reading, couldn't have done it without you! |
So one of the biggest issues with components, is that users don't know how do use them, they are new and scary. This guide helps users dive into using components as they were meant to be used (beyond the single lonesome component).
This guide takes the Data Down and Actions Up approach that is being favored and will be prevalent once all of the Ember 2.0 component features are in (
mut,attrs, etc).preview rendered