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

Simplification via {{render-portal}} helper #1

Open
shaunc opened this issue Sep 8, 2015 · 0 comments
Open

Simplification via {{render-portal}} helper #1

shaunc opened this issue Sep 8, 2015 · 0 comments

Comments

@shaunc
Copy link
Owner

shaunc commented Sep 8, 2015

I think there is an way to simplify "pulling" declarative content into implementation.

It should be able to change the RenderPortal component mixin into a helper:

{{render-portal declarations className itemIndex itemSubindex}}

Here declarations are the list of PortalDeclaration collected. className is name of subclass of PortalDeclaration to filter by, itemIndex the # of the delcaration, and itemSubindex the index of the subclass of this.element presented by the PortalDeclaration instance.

For nested declarations, this could be used as:

{{render-portal declarations class1 item1 sub1 class2 item2 sub2 [etc as necessary] }}

In many situations, I'm hoping that this would eliminate the need for any render/... components. Of course, sometimes you might want them anyway (dynamic styling can't be guessed in declaration context perhaps?), but I think often they are just boiler plate.

I plan to try this out on a branch and use in ember-smenu ... if it looks good there we can try to re-base ember-grid on ember-declarative.

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

1 participant