-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
[Live] override data collector & debug command #1722
Conversation
e22474e
to
14f1ea0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kbond I really like the idea!
I’ll look at this sunday, but dont wait for me if you need before :) |
Upon reflection, I'm thinking this PR isn't the correct direction. When adding more live component information to the debug command and profiler panel, refactoring the parent twig component classes will almost always be required. This sort of defeats the purpose of this change... What about:
There will likely be some duplication but perhaps we can mitigate with helper classes or, in the case of the console, maybe the descriptor system (I've never used this so not sure this is viable). I'm curious for thoughts from others. |
In general, concerning Twig & Live Component, i'm 100% for duplication over this "extend" thing we have today. Let met give my reasons before you bite me :)
So i'm all for your points. We just need to think about the "how" :) |
Your points all make sense to me and solidify my idea to split the commands/panels. @WebMamba, wdyt? |
Do you have examples in mind? I am not sure about that since LiveComponent is TwigComponent, I don't see why we should expose different information. More information but not different. |
#1720 is the example that prompted this PR. I can imagine having details on actions and query parameters in the future. Admittedly, I'm on the fence on what to do here. Today, I feel more inclined to proceed with this PR as is 😆 |
There is nothing preventing us to change later i guess, so i'll support any choice you guys make :) |
As long as we don't have a good reason, let's leave it as it is 😁 |
Ok, I'll finalize and merge this PR this week so we can unblock #1720. |
124df11
to
2884d50
Compare
I think this is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently if you run bin/console debug:live-component you also got simple TwigComponent and anonymous component. Should we filter the list to only display Live component ? If we do that should add filters to the debug:twig-component command (bin/console debug:twig-componet --anonymous, bin/console debug:twig-componet --twig-component, bin/console debug:twig-componet --live)?
Hah, now I'm back on the fence on what to do here. As I mentioned in #1720, it's going to be pretty cumbersome to add live-specific features to the command/profiler panel. I'm back wondering if there should be two completely separate commands and profiler panels... |
Still my opinion there |
I'm now persuaded having distinct commands is the better solution. LiveComponent does not deal with anonymous templates, TwigComponent do not deal with queryurl, events, etc... How can i help you on this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait few things before merging
- the debug:live-component does not appear on the command list when you do a bin/console since debug:live-component is just an alias
- the debug:live-component should filter and should show only live component
- the panel live component is name twig component and have the same icon
- the panel live component should only display live component
WDYT?
2884d50
to
e4a1b1f
Compare
Closing in favour of #1812 |
When live component is installed, swap the debug command and data collector to a live component version.
This refactor enables us to add additional live-component specific details to both the debug command and the profiler.
Helps with #1720.