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

component naming #1

Open
raycohen opened this issue Jun 12, 2015 · 4 comments
Open

component naming #1

raycohen opened this issue Jun 12, 2015 · 4 comments

Comments

@raycohen
Copy link

-content and -for don't immediately resonate with which side of the wormhole is represented.
how about something like portal-input and portal-output ?

@raycohen
Copy link
Author

I think it's particularly confusing to me because of the similarity to rails's content_for method.

If you wanted to get fancy you might be able to use ember's new hasBlock property, such that you only expose one component, when used in block form it is treated as input, and when used without a block it is output

@rlivsey
Copy link
Member

rlivsey commented Jun 12, 2015

Definitely open for some bikeshedding on the naming, I also want to use the new positional parameters stuff in Canary soon so you don't need the name= part and could just do {{portal-for "footer"}}.

I'm 👎 on using the same component name for both the input and output because that would make the component itself pretty messy (having all code mixed up in the same component).

{{portal-outlet}} could be a better name because of the parallels with the normal {{outlet}}.

@raycohen
Copy link
Author

My imagination for how the "one-component" version would work is to delegate to two different (internal) components in the if/else with hasBlock. Not sure how implementing it would actually play out though.

@knownasilya
Copy link

I think having a block format for the portal-for would be nice for default content if the portal-content hasn't been used for that portal.

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

3 participants