-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[FEATURE ember-htmlbars-dashless-helpers] RFC#58. #11393
Conversation
81f8ce4
to
daf4d97
Compare
daf4d97
to
8d3620f
Compare
That's great! Does this also imply that helpers can have access to other services and components (in the general, not as in Ember components sense) of the application? |
Another consideration (I think) is that short helper names are still discouraged since it can cause conflict with bound values in templates. If I have a |
That is possible via #11278 (discussed in emberjs/rfcs#53).
Agreed, a few points though:
Yes, a helper will "win" and override a local property. This is not a new change. |
True, thank you for your answers. |
} | ||
|
||
if (this.resolver.eachForType) { | ||
this.resolver.eachForType(type, callback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you walk both the container and the resolver (or container and fallback), will you sometimes get duplicates? Things already loaded will show up twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is theoretically possible for things to show up twice, but unlikely.
- We only walk manually registered items in the registry (why manually register if it will auto-resolve?).
- Book keeping to prevent double entry seems unneeded as we are keeping it in a small dictionary which will dedupe for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahha, I see. I did not realize it was only registered factories. Excellent.
8d3620f
to
7f3c408
Compare
Submitted ember-cli/ember-resolver#95 to implement |
7f3c408
to
4b0cdfc
Compare
Update to match API with ember-cli/ember-resolver#95:
|
4306884
to
7313fd3
Compare
7313fd3
to
d8e2fe0
Compare
👏 Plz merge once the Travis gods have been sated. /cc @jamesarosen and others we know it is dreadfully short timing, but if you give us any feedback before too late in the afternoon eastern time that would be incredibly helpful. |
[FEATURE ember-htmlbars-dashless-helpers] RFC#58.
I'm at UX Burlington today, but I'll definitely try it out when I have a spare moment. Thanks so much for your work! |
Any idea when https://github.com/components/ember/tree/beta will get rebuilt? |
I just tried this out on the canary build. The helper registration works great for ember-i18n's |
I'm sort of frustrated at my inability to figure out how to implement a helper called |
Seems to be working here: http://ember-twiddle.com/53b8f0755d3feb4cf3ae |
Many thanks, got it working. Now the issue is that in my unit tests for components, when (By the way; this is a translation helper in the vein of |
This implements the majority of emberjs/rfcs#58.
With this change, all helpers that are known to the registry or resolver are whitelisted automatically and are not subject to the former dash requirement.
Silly Demo: http://emberjs.jsbin.com/rwjblue/590/edit
eachForType
in the modules resolver. ImplementknownForType
for RFC#58. ember-cli/ember-resolver#95