Skip to content

Heavy petting for the contextual component RFC - #85

Merged
mmun merged 1 commit into
emberjs:contextual-component-lookupfrom
mixonic:cc-lookup-rewrite
Aug 15, 2015
Merged

Heavy petting for the contextual component RFC#85
mmun merged 1 commit into
emberjs:contextual-component-lookupfrom
mixonic:cc-lookup-rewrite

Conversation

@mixonic

Copy link
Copy Markdown
Member

@mmun for you to consider.

@mixonic
mixonicforce-pushed the cc-lookup-rewrite branch 5 times, most recently from f240b64 to 5674aaeCompareAugust 15, 2015 17:18
@workmanw

Copy link
Copy Markdown

👍 I could definitely see several places in our we could use this.


One question, what about proving class references, rather than strings, to the component helpers. For private component classes? For example:

// app/components/special-button.jsvarMyPrivate=Ember.Component.extend({/* ... */});exportdefaultEmber.Component.extend({myPrivateComponent: MyPrivate/* ... */});
{{!-- app/templates/components/special-button.hbs --}}{{!-- passed by class, not string --}}{{componentmyPrivateComponent}}

We've got a lot of components in our app that aren't used in block form and have "private" sub-components. It gets kind of messy to have every component in it's own .js file sometimes.


I was secretly hoping to see some mention of a splat-like-operator, but I realize it's probably outside the scope of this RFC.

@mixonic

Copy link
Copy Markdown
MemberAuthor

@workmanw splat is being discussed at handlebars-lang/handlebars.js#1050 We're waiting for wycats to clear his stack. Hopefully we green light soon :-)

@mmun has concerns about how we handle the container (and therefor injections etc) on bare classes. I think it may be surmountable. If he is hesitant I would at least like to get the un-controversial version of this rolling so we can land it soon, maybe 2.2 if core approves on Friday.

mmun added a commit that referenced this pull request Aug 15, 2015
Heavy petting for the contextual component RFC
@mmun
mmun merged commit 3896108 into emberjs:contextual-component-lookupAug 15, 2015
@mixonicmixonic mentioned this pull request Aug 15, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mixonic@workmanw@mmun