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

Overwrite infinity-loader template no longer works #51

Closed
himynameisjonas opened this issue Jul 1, 2015 · 10 comments
Closed

Overwrite infinity-loader template no longer works #51

himynameisjonas opened this issue Jul 1, 2015 · 10 comments

Comments

@himynameisjonas
Copy link

Hi. I just updated my ember app (ember from 1.12.2 to 1.13.2 and ember.infinity from 0.0.4 to 0.0.10) and since then my app/templates/components/infinity-loader is no longer used, instead I'm seeing the default template. Don't know where to start looking into this.

@hhff
Copy link
Collaborator

hhff commented Jul 1, 2015

Jah, this is a change in ember itself. It confused me for a while with a different project I just upgraded to 1.13.2 - not sure if this is a regression or a fix.

The work around for now is to copy the component file to your host application, and import the layout from its location in your host app, then pass that as to the layout attribute on your local component file.

@aaronrenner
Copy link

@hhff. Could you provide more detailed instructions for this workaround? I'm not quite sure what you mean.

@hhff
Copy link
Collaborator

hhff commented Aug 4, 2015

Run ember g infinity-template, then create a new file in your host application at app/components/infinity-loader.js like so:

import layout from '../templates/components/infinity-loader';
import infinityLoader from 'ember-infinity/components/infinity-loader';

export default infinityLoader.extend({
  layout: layout
});

Gonna investigate this now!

@aaronrenner
Copy link

Thanks, @hhff.

@hhff
Copy link
Collaborator

hhff commented Aug 6, 2015

Lets keep this open until I fix this without the above workaround

@trabus
Copy link

trabus commented Aug 6, 2015

The basic problem is that when the layout is defined, you have to specifically override the layout. Once the layout definition is gone from the addon template, it will lookup the template in the app, and when the user has a template in their app with the same name, that template will win over the addon's template in the app folder.

@hhff
Copy link
Collaborator

hhff commented Aug 6, 2015

so ur saying I have to delete 2 lines of code @trabus

i think i can handle that

@hhff
Copy link
Collaborator

hhff commented Aug 6, 2015

oh and move 1 file

still, i can handle it

@trabus
Copy link

trabus commented Aug 6, 2015

Or add one file to your blueprint. ;)

@hhff
Copy link
Collaborator

hhff commented Aug 6, 2015

thanks @trabus ! just want to maintain the old override process for people updating to new versions. I've also stacked the component with so much good stuff like class name binding that I only want super users to have the component file in their host app.

@hhff hhff closed this as completed in 3aa3a4d Aug 7, 2015
hhff added a commit that referenced this issue Aug 7, 2015
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

4 participants