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

[Deprecated] Add deprecation for partials #14972

Closed
wants to merge 1 commit into from

Conversation

chadhietala
Copy link
Contributor

This adds a deprecation for {{partial}}. Like {{render}} they go against the Ember's programming model.

@scalvert
Copy link
Contributor

@workmanw
Copy link

workmanw commented Feb 28, 2017

I'm 👎 on this. I've often found partials a good way to break up a large page / component into more logical sections. Sure you could do that with components too, but the difference is scoping. Using components this way requires more boilerplate (passing data in and emitting actions up).

Obviously not the end of the world, but I would definitely be sad to see partials go.

EDIT: Also there are a lot of addons using them: https://emberobserver.com/code-search?codeQuery=%7B%7Bpartial

@rwjblue
Copy link
Member

rwjblue commented Feb 28, 2017

I've often found partials a good way to break up a large page / component into more logical sections.

This is exactly why they should go 😜. Making a file smaller does not actually reduce complexity, and instead just increases the mental overhead when you have to parse both the calling location (where you invoke {{partial) and the actual partial being invoked for access to all surrounding scope. There is absolutely no API, no way to refactor the partial away from assuming "eval" style access to the calling scope, and no real benefit to splitting files this way.

Using components this way requires more boilerplate (passing data in and emitting actions up).

Perhaps, but when you add an actual API to the thing you have many benefits. Including things like the ability to refactor, ability to test independently, etc.


Regardless of our disagreements here, this will need to end up becoming a deprecation RFC. Lets hash out the pros/cons over there....

@mixonic
Copy link
Member

mixonic commented Feb 28, 2017

This will absolutely go through an RFC process. 👍

@homu
Copy link
Contributor

homu commented Mar 14, 2017

☔ The latest upstream changes (presumably #15014) made this pull request unmergeable. Please resolve the merge conflicts.

@locks
Copy link
Contributor

locks commented Jul 12, 2017

Closing for now, until RFC is go.

@locks locks closed this Jul 12, 2017
@GavinJoyce GavinJoyce mentioned this pull request Oct 14, 2019
4 tasks
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.

7 participants