-
Notifications
You must be signed in to change notification settings - Fork 378
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
appreciate your feedback for custom element diagram #784
Comments
@dglazkov |
Rest seems good to me although I'm not sure what the for |
@daKmoR
Indeed that's true, unfortunately Safari refuses to implement it. Though extended built-in elements are living standard and the majority supports it. Hence this diagram should reflect the standard, though an
So the spec has still glitches, the behavior of these callbacks are not 100% deterministic. Also the spec itself notes about
Okay, so every custom observed HTML attribute should have a corresponding DOM property. |
@daKmoR Feedback very welcome |
Consider removing some of the locales as they still mention React (at least, Russian and Ukrainian). Also, the "version toggle" does not make much sense to me. Custom Elements "v1" are the only stable version at the moment, what was previously called "v0" is about to be removed from Chrome. |
@web-padawan |
hey really cool update :) I think it has all the core information now :) small nitpick can we change
to something like this
(We should make it really apparent what that means to the end user) |
@daKmoR Thanks, is updated:) |
can we add a "legend" or so for this... I already forgot it and was again a little confused about its meaning 🙈 |
@daKmoR here you go, thanks for your feedback. |
@AndyOGo I just took a look, and it seems like you're trying to fit custom elements into a well-known React lifecycle diagram style, yes? I'm not sure the axes on this make sense though. The phases doesn't actually apply to all of connecting, updating and disconnecting. It seems like both axes are related to time, and so they overlap in meaning. |
@justinfagnani That's correct, most stuff happens only within the upgrade or live phases. |
The problem with both axes relating to time is that I think it makes the whole chart not make a lot of sense. Take a single column/callback, like "Disconnecting". It does not go through "Unknown", "Upgrade" and Live" phases, so what information is conveyed by having the vertical axis at all? |
Well it means that The other important fact, is the browser's parsing phase building a DOM tree eventually with yet unknown/undefined custom elements |
If you want to have proof why it's important to differentiate between these timing factors, have a look at this test page: |
can you maybe explain this a little more... e.g. what is happening and what real-life impact that has? I looked at the code and I think it explains the timing issues you can have with your children but just by looking at the result it's not clear at all 🙈 so maybe add some explainers and consequences and definitely add a link to the source file so you can see in code what is happening... https://glitch.com/edit/#!/wc-connected-test?path=server.js:31:43 but I really like it :) |
So in short you can never be sure that your dom child nodes are then when you are in your connectedCallback... also, the description alone was not understandable to me... don't get me wrong... I really like it and it shows what things you need to be careful about - however if someone has a problem like "I can't access my lightdom childen in my connectedCallback" => I would like to just send them the link and say "jup, for reasons see here: " but right now that won't work as the link itself is really hard to follow... |
@daKmoR Exactly, you can't predict that all custom elements The glitch was created by Jake Archibald, you would need to get in touch with him. I hope it helps you. |
Hy,
I just released an adapted version of the interactive react lifecycle methods diagram for custom elements:
https://andyogo.github.io/custom-element-reactions-diagram/
If you have time, I would appreciate your feedback very much.
Personally I'm still concerned of how to express details of custom element reactions, like it's
connectedCallback
queue glitch documented in the spec itself in the example below:The text was updated successfully, but these errors were encountered: