Skip to content
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

Update to work with new outlets API #173

Closed
salzhrani opened this issue Feb 12, 2015 · 16 comments
Closed

Update to work with new outlets API #173

salzhrani opened this issue Feb 12, 2015 · 16 comments

Comments

@salzhrani
Copy link
Contributor

anyone having trouble with the library and the latest ember beta, I get a a blank page when using liquid outlet. not sure how to debug

@salzhrani
Copy link
Contributor Author

With some debugging I found that execution get here with !oldView && !newView evaluates to true and the view bails.

@ef4
Copy link
Collaborator

ef4 commented Feb 12, 2015

Thanks for reporting this and tracking it down.

I will take a look too as soon as I can, unless you get it figured out first.

@salzhrani
Copy link
Contributor Author

I could try, any pointers?

@ef4
Copy link
Collaborator

ef4 commented Feb 12, 2015

Your question made me sit and ponder for a minute, and then I realized that this probably broke due to my own change upstream in Ember (emberjs/ember.js#10372). Outlets don't use currentView anymore.

I actually made that change because it's going to simplify liquid-fire and fix a bunch of our corner cases that used to be broken. But it does mean we need to update right away to take advantage of the new outlet implementation.

The TLDR is that outlets now get told what to render when their setOutletState function is called. That should replace our current observation of currentView. And liquid-outlet probably needs to extend OutletView (or CoreOutletView, although that may not be exposed to us at present) instead of just ContainerView.

It's a pretty significant change, and ideally we want to keep supporting both the old and new versions of Ember. If you want to go for it I'm happy to advise, otherwise hang in there and I will try to get to it soon.

@salzhrani
Copy link
Contributor Author

I think it is better if you handled it since you are way more familiar with changes in both sides.

@ef4 ef4 changed the title 1.11 beta Update to work with new outlets API Feb 12, 2015
@brendanoh
Copy link

Is there a workaround for this?

@brendanoh
Copy link

I assume I am experiencing the same thing with the following output:

<div id="ember440" class="ember-view liquid-container">
    <!---->
</div>

@ef4
Copy link
Collaborator

ef4 commented Feb 15, 2015

I just pushed a branch named beta-compat that works with beta and canary (but nothing older). Please give a whirl.

I may end up doing separate releases for Ember >= 1.11 and Ember < 1.11.

@brendanoh
Copy link

@ef4 works perfectly as usual. At least for all the transitions in my App.

Thanks again. Fantastic library.

@jgwhite
Copy link

jgwhite commented Feb 19, 2015

@ef4 beta-compat appears to work perfectly on our app too. Thanks!

@miguelmota
Copy link

I spent hours trying to figure this out. beta-compat branch worked out!

@chrism
Copy link
Contributor

chrism commented Feb 20, 2015

@ef4 - works for me too, thanks for all your work 👍

@miguelmota
Copy link

Should probably put this somewhere in the README.

@ef4
Copy link
Collaborator

ef4 commented Feb 21, 2015

Released 0.18.0 which is compatible with Ember beta and canary.

@ef4 ef4 closed this as completed Feb 21, 2015
@zjrosen1
Copy link

zjrosen1 commented Apr 5, 2015

@ef4 is this resolved in 0.19

I'm getting the following error

Uncaught TypeError: Cannot read property 'render' of undefined

Which is coming from line 94 of ember-internals where the param state is undefined after a link transition

setOutletState: function(state) {
    if (state.render && state.render.controller && !state._lf_model) {
      // This is a hack to compensate for Ember 1.0's remaining use of
      // mutability within the route state -- the controller is a
      // singleton whose model will keep changing on us. By locking it
      // down the first time we see the state, we can more closely
      // emulate ember 2.0 semantics.
      //
      // The Ember 2.0 component attributes shouldn't suffer this
      // problem and we can eventually drop the hack.
      state = Ember.copy(state);
      state._lf_model = get(state.render.controller, 'model');
    }

https://github.com/ef4/liquid-fire/blob/master/addon/ember-internals.js

@zjrosen1
Copy link

#239 Fixed above for me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants