Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readability for 'simple-template' example #74

Open
ngdangtu-vn opened this issue Dec 27, 2023 · 4 comments · May be fixed by #77 or mdn/content#33666
Open

Improve readability for 'simple-template' example #74

ngdangtu-vn opened this issue Dec 27, 2023 · 4 comments · May be fixed by #77 or mdn/content#33666

Comments

@ngdangtu-vn
Copy link

My issue relate to: https://github.com/mdn/web-components-examples/tree/712ce27cd5b3c894ebc9b9958ec0973e3e86157b/simple-template

My point is the custom-element name and the template id name is the same that confused for anyone start to read from main.js file. I would like to replace <template id="my-paragraph"> to <template id="template-for-my-paragraph">.

If you guy think it is a right way, I would like to make my PR to this repo.

@bsmth
Copy link
Member

bsmth commented Mar 18, 2024

Hi @ngdangtu-vn - thanks for reporting this. I agree it would be nice to disambiguate them. Alternatively, a different custom name, like:

customElements.define('custom-p-element',
...
// or 
customElements.define('styled-para',
...

Bear in mind if we change this here, we'll have to rename it in the docs that reference the example:

@ngdangtu-vn
Copy link
Author

How should I update those MDN articles? Should I update the doc (https://github.com/mdn/content/tree/main/files/en-us/web/api) first or example (this) first?

@bsmth
Copy link
Member

bsmth commented Mar 19, 2024

Lets update the examples here first and we can look at the MDN pages when we're ready. So this might be the best way:

  1. open a pull request here with the changes, when that looks good (not necessarily merged):
  2. open a pull request in mdn/content to update the pages listed above.

I can help with the reviews for these. Does that sound good? :)

@ngdangtu-vn
Copy link
Author

Sound good, give me one or two days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants