gigafied / ember-animate

Animations for Ember.js
Other
204 stars 28 forks source link

reopening every view may not be a good idea #38

Open stefanpenner opened 9 years ago

stefanpenner commented 9 years ago

consider a subclass, or flag. We likely shouldn't subject every view to this extra functionality and weight.

gigafied commented 9 years ago

See https://github.com/gigafied/ember-animate/issues/17

I could probably refactor it some, maybe even having checks for the view type in ContainerView so that normal views work too. I just don't have time at the moment. I'll leave this issue open.

Probably the best way to do this would be to use some sort of flag on EmberENV.

EmberENV.EMBER_ANIMATE_EXTEND_VIEWS = true;

That way I can expose Ember.AnimatedView, Ember.AnimatedContainerView and {{animated-outlet}} if that flag is set to false.

gigafied commented 9 years ago

Is there a particular issue you ran into because of this, or that it just doesn't seem right?

I agree it's not really right, could probably be implemented better, but I have yet to run into issues because I'm extending every View, and have not seen a noticeable performance hit.

stefanpenner commented 9 years ago
  1. tagless components no longer support $() (as it doesn't work/make sense) and this add-on now explodes.
  2. then just other times i have seen this sort of pattern. It often results in perf issues / hard to debug issues.
hhff commented 9 years ago

39 will close this :)