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

[LiveComponent] Add debug:live-component command #1163

Closed

Conversation

smnandre
Copy link
Member

@smnandre smnandre commented Oct 4, 2023

Similar to the TwigComponent one, with additional information:

  • LiveProps
  • LiveActions
  • Pre/Post hydrate & render

@kbond
Copy link
Member

kbond commented Oct 4, 2023

A second command feels a bit confusing as debug:twig-component does show live components.

Wonder if we should combine into debug:twig-component and have a descriptor system that takes care of the extra stuff live components need to show:

  1. TwigComponentDescriptor (lives in ux-twig-component)
  2. LiveComponentDescriptor extends TwigComponentDescriptor (lives in ux-live-component)

@WebMamba
Copy link
Collaborator

WebMamba commented Oct 4, 2023

I agree with @kbond it look like we're going to have some duplication with the TwigComponent debug command see: #1088 (comment) We already looked for LiveProps and LiveAction. We don't have Pre/Post hydrate and render, and yes It can be interesting to add. But I my opinion is better to keep everything in the TrigComponent command.

@smnandre
Copy link
Member Author

smnandre commented Oct 4, 2023

I'm not a big fan to bring "LiveComponent" specific code into the TwigComponent bundle to be honest... but that'll be the perfect occasion to test something i wanted to do (multiple factory)

@smnandre
Copy link
Member Author

smnandre commented Oct 4, 2023

I'll split the PR in two then

  • one to try the system @kbond suggested
  • one to update the AsLiveComponent static methods signature that i'll need sooner

@kbond
Copy link
Member

kbond commented Oct 4, 2023

I'm not a big fan to bring "LiveComponent" specific code into the TwigComponent bundle to be honest...

I think my idea would remove this. Assuming the TwigComponentDescriptor is a service, the live bundle could swap it out for the live-specific one.

@smnandre
Copy link
Member Author

smnandre commented Oct 9, 2023

Closing this one (i'll use your ideas to improve the twig debug command in a near future @kbond )

@smnandre smnandre closed this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants