Various improvement suggestions - invalid html - long attributes #418
Replies: 2 comments
-
Hi @Robin-Wils, You are right, the Regarding invalid HTML Regarding Compactness All in all, I don't know how I can help you at this point. If you have specific suggestions for improvement, please send me a pull request. By the way, Astro Islands are also web components. Here is the corresponding Docs page on the subject. |
Beta Was this translation helpful? Give feedback.
-
Hmm, thanks for the detailed reply. I have worked with similar web components before (I think in vue, react and angular). But it only occurred to me now that they use custom elements. Although, I now concluded for myself that I do not like the idea of web components. It seems overengineered, makes the html bigger and the names can confuse people. I likely will write my own tools. The YouTube embed I use - uses web components too. Maintaining your own tools does have big disadvantages too though, mainly maintenance. |
Beta Was this translation helpful? Give feedback.
-
I have noticed that this component generates invalid html. The tag
astro-breadcrumbs
is not valid html. Everything still worked when I moved thenav
element out of that tag. Aside from that it uses a few long attributes.Invalid HTML
Can the invalid tag
astro-breadcrumbs
be replaced or removed? Replacing it with adiv
fixes this already.Compactness
This component isn't as tiny as I would like. The
astro-breadcrumbs
tag includes many data-elements likeid
. Theid
attribute is filled even if I do not fill it in. The value that gets inserted is long. While this is a minor thing, improving this would be beneficial for users who value smaller HTML payloads and faster load times.Describe alternatives you've considered
I am considering reverting back to my own custom breadcrumbs component which I used before. While my custom implementation already supports schema.org and related features, it lacks advanced features like truncating breadcrumbs. It is mostly the invalid html that is making me consider this.
I would still prefer a package like this. If the pros outweigh the cons. It has less maintenance cost for me (the user). Thanks for creating this component.
Beta Was this translation helpful? Give feedback.
All reactions