-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When I added the input-agent-list component after discussing the name in slack it made realize that I've named things inconsistently. It would be useful to come up with some guide lines around naming the components and have the existing components converge on their names.
For web form elements I think having the element they are extending be the first part of the name may make sense. Then the rest of the name can describe the think they working with. I'm not sure if this makes as much sense for the display only elements. Need to find some consensus in what ever approach is adopted.
If that were the case then I should name things as follows.
| original name | use element prefix in name |
|---|---|
| a-to-z-list | ul-a-to-z-list |
| input-agent-list | textarea-agent-list |
| csv-textarea | textarea-csv |
| sortable-table | table-sortable |
If on the other hand the standard element being extended was in the suffix we'd see this naming convention.
| original name | use element suffix in names |
|---|---|
| a-to-z-list | a-to-z-list-ul |
| input-agent-list | agent-list-textarea |
| csv-textarea | csv-textarea |
| sortable-table | sortable-table |
I think including the element name that is being enhanced is desirable to quickly see it's application from the HTML point of view. Either a prefix or suffix makes sense but it should be consistent in how I am naming things.