Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Naming & namespacing #4

Open
Nevraeka opened this issue May 2, 2015 · 6 comments
Open

Naming & namespacing #4

Nevraeka opened this issue May 2, 2015 · 6 comments

Comments

@Nevraeka
Copy link

Nevraeka commented May 2, 2015

Best practices on naming & namespacing should be addressed. Here is an example by @zenorocha http://webcomponents.org/articles/how-should-i-name-my-element/

@Nevraeka
Copy link
Author

Nevraeka commented May 3, 2015

@JanMiksovsky any objections to me updating the wiki with some of this information?

@JanMiksovsky
Copy link
Contributor

@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.

@robdodson
Copy link

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?

@JanMiksovsky
Copy link
Contributor

@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.

@Nevraeka
Copy link
Author

Thanks. I'll add it ASAP

@Nevraeka
Copy link
Author

in progress

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants