Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

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

@shaunc

Description

@shaunc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions