ef4 / ember-elsewhere

Render elsewhere in the DOM, with nice composition, animation, etc. Based on 100% public API.
MIT License
184 stars 25 forks source link

Breaks with Ember 3.3 #24

Closed ghost closed 5 years ago

ghost commented 5 years ago

Haven't yet figured out why and how, but after upgrading Ember(-JS|-Data|-CLI) to 3.3 all the tests involving Ember Elsewhere started to fail. If I figure out why, I'll leave another comment.

cibernox commented 5 years ago

Just clarify that ember-source is the only responsable here, this ember-cli 3.3 works if ember-source is downgraded to 3.2

bobisjan commented 5 years ago

I can tell that (get (get service.actives name) 'lastObject.component') returns undefined. It seems that actives array is not an array like before, because it does not have computed property lastObject.

It happens here https://github.com/ef4/ember-elsewhere/blob/master/addon/services/ember-elsewhere.js#L46, where sortBy() returns native array.

Possible fix would be to wrap sorted array with Ember.A() like this

newActives[target] = emArray(newActives[target].sortBy('order'));

I'm happy to send PR if this fix makes sense for you, or should it be tracked in Ember itself?

ef4 commented 5 years ago

Nice work @bobisjan. That PR would be appreciated. I will also file an issue on Ember, I'm not sure if this was already a known issue.

ef4 commented 5 years ago

Thanks, @bobisjan's PR is released in 1.0.5, and I updated our test setup so we now have proper coverage for current Ember release channels (before it was using the old bower setup, so it wasn't updating past ember 2.18).

There is still arguably a breaking change in Ember 3.3 that we worked around.