gold-standard
gold-standard copied to clipboard
Naming & namespacing
Best practices on naming & namespacing should be addressed. Here is an example by @zenorocha http://webcomponents.org/articles/how-should-i-name-my-element/
@JanMiksovsky any objections to me updating the wiki with some of this information?
@Nevraeka Good idea. Thanks for the offer of help.
- I believe document.registerElement rejects attempts to register custom elements that don't contain a hyphen so, strictly speaking, that point doesn't really need to be covered by the checklist.
- That leaves the main point of a checklist item about naming to be: prefix your element name with the name of your org, project, element collection, etc.
- That list of reserved hyphenated names is interesting and good to know, although in practice I doubt many people would try to create elements with those names. And if they're appropriately prefixing their element name (above point), then most of these reserved names will never be encountered at all. (Only a group called "annotation" would want to create an element called "annotation-xml".)
- I think this new checklist item for naming could go in the Development section. Like the other items there, element naming is more of a style guideline issue than something that could interfere with the component's user experience.
- All the checklist items have short descriptors. If you agree that prefixing is the crux here, then the item could given a descriptor like, "Prefixed name".
- My intention is to have the top-level checklist just include a descriptor and single sentence for each item. All other details will eventually go into detail pages — one page for each checklist item. See the interim page for [[Focusable]] for an example.
Hey @JanMiksovsky any update on this? Would you prefer to add this section or do you think it would be better for someone to write up a strawman and we can review it?
@robdodson I was trying to give the go-ahead and suggestions so @Nevraeka could do this. I could certainly make the edits myself if necessary — this doesn't look like a big task — but would prefer to have additional people join in as contributors.
Thanks. I'll add it ASAP
in progress