-
-
Notifications
You must be signed in to change notification settings - Fork 405
Closed
Description
A couple co-workers brought up some interesting points this morning.
Given that
...attributes can be placed anywhere in a component
You
- don't know if
...attributesis used at all (everyone should be using...attributesthough -- the calling context is in charge of layout, and you may want to pass layout classes or aria attributes to your sub-component ) - don't know what element
...attributeswill be placed on.- is it the outer-most element? (imo, it should be)
- is it some other element? (this, to me, means that the abstractions need to be re-worked so that
...attributescan be the outer-most element
- don't know that args are or aren't overwriting the attributes
- for example:
<div ...attributes aria-label={{@ariaLabel}}>
- for example:
Questions for the community:
- should we add a lint rule to suggest that
...attributesshould only be used in the top-most element? - should we have some additional tooling ((u)ELS?) to tell us if
...attributesis used, if any@argsoverwrite / merge any of the attributes.
The main thing we're after here is clarity without having to know implicit community convention -- because implicit community convention can't be programmatically enforced atm.
Related: ember-learn/guides-source#1286
(the specific component in that link, Input, isn't important to this issue, but the problem is there)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels