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

[Bugfix beta] Settable layout cp #10920

Merged
merged 1 commit into from
Apr 22, 2015

Conversation

stefanpenner
Copy link
Member

depends on: #10920 will rebase, when that lands.

Also I will add a separate PR for beta branch, as the syntax is different.

@stefanpenner stefanpenner force-pushed the settable-layout-cp branch 2 times, most recently from 5b86dc0 to 69d796a Compare April 22, 2015 11:34
Previously setting `layout` would replace the underlying CP. This would prevent `layoutName` from working when a component had an existing template.
@stefanpenner stefanpenner changed the title Settable layout cp [Bugfix beta] Settable layout cp Apr 22, 2015
@stefanpenner
Copy link
Member Author

travis claims this is actually green: https://travis-ci.org/emberjs/ember.js/builds/59537515 ...

ready for review: @mmun / @krisselden / @rwjblue

var layoutName = get(this, 'layoutName');
var layout = this.templateForName(layoutName, 'layout');
*/
layout: computed('layoutName', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also add defaultLayout to the dependent keys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe so. I am not sure why defaultLayout still exists, maybe it should be on the chopping block.

Regardless I don't believe a scenario exists where one would invalidate defaultLayout instead of just setting to layout directly or changing layoutName. If some actual use-case does exist, maybe my above statement needs to be taken into re-evaluate. If not, I would prefer not fixing something that serves no purpose and should likely just be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thank you for clarifying. 😄

@stefanpenner
Copy link
Member Author

Travis appears to be green but here it is reported red. I suspect this is good to go – just pending review.

rwjblue added a commit that referenced this pull request Apr 22, 2015
@rwjblue rwjblue merged commit 8eea2e6 into emberjs:master Apr 22, 2015
@rwjblue rwjblue deleted the settable-layout-cp branch April 22, 2015 14:13
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

Successfully merging this pull request may close these issues.

2 participants