Skip to content

[Proposal] Re-name the nested helper (subexpression) to "html-attributes" #2

@crodriguez1a

Description

@crodriguez1a

When the concept was first proposed, @mmun suggested the following:

{{my-component (html-attributes aria-labelledby="label-name")}}

I wonder if there is consensus to circle back to that naming? It think html-attributes more clearly solidifies that the helper is intended to apply native HTML attributes to a component. Whereas, just using attributes could potentially confuse new adopters of Ember. I'm anticipating new adopters might try something like:

{{my-component (attributes aria-labelledby="label-name"  my-special-thing="my special value")}}

{{! intending to define a property, which should have been written as follows: }}

{{my-component (html-attributes aria-labelledby="label-name") mySpecialThing="my special value"}}

I know it seems odd, but I've seen other frameworks that tend to conflate properties and attributes.

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