-
-
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
moduleForHelper with metal-views #5595
Comments
I updated the jsbin and removed the call
Tests are passing but I am not sure what change caused this issue. I am also not sure why the helper is re-registered and restored during setup and teardown of moduleForHelper but assume it isn't really necessary. |
@manuelmeurer there is a ton of code in |
You meant @manuelmitasch, right? 😄 |
this seems like a ember-qunit bug not ember proper |
@manuelmeurer haha, yes :-) Sorry about that. |
@mixonic It's a quite mysterious bug and solution. I have used hours to dig into stacktraces of the involved libraries (ember, qunit, ember-qunit, handlebars). It's quite complex. I tried to narrow it down. Did not succeed. It come down to adding or removing Thanks to @matthiasleitner we are able to make the move to metal views. Yeah. |
Ember.Handlebars.helper('my-helper', function(value, options) { ... }); form creates a SimpleHandlebarsView which has some optimizations by assuming it is a leaf node because this API was intended for helpers that do formatting. You can't call into the view helper from in these functions. While this may have appeared to work in the past versions, it actually did not structure the hierarchy properly, and required recursive rendering to actually partially work. It now fails fast. |
We are testing our handlebars helpers with the moduleForHelper from this never merged ember-qunit PR. Which worked fine until 1.7. With 1.8 beta-1 (which includes the metal-view refactorings) the helper stops working.
I have created a jsbin that demonstrates the problem.
Any idea what has changed or what the solution could be?
I'm reporting this here to make sure this is not an unknown bug introduced through the metal-view refactorings.
PING @krisselden @rwjblue
The text was updated successfully, but these errors were encountered: