Skip to content

[WIP] Added initial support for processing custom components in templates #30

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

Closed
wants to merge 1 commit into from

Conversation

codders
Copy link
Contributor

@codders codders commented Jun 6, 2025

We will very probably need support for rendering our own custom Vue components in our server-side rendering. Add an initial sketch of what that might look like.

Bug: T395802

@codders codders requested a review from lucaswerkmeister June 6, 2025 09:42
We will very probably need support for rendering our own custom Vue
components in our server-side rendering. Add an initial sketch of
what that might look like.

Bug: T395802
@codders codders force-pushed the feat/component-support-20250606 branch from ca7c9ae to 5a29835 Compare June 6, 2025 09:43
@@ -46,9 +53,24 @@ public function parseHtml( string $html ): DOMDocument {
//TODO Throw an exception
}

$this->substituteComponents( $document );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think doing component substitution in HtmlParser will run into issues once we want to pass props into them… I was imagining it would take place in Component::handleNode(), probably just before the iteration over the child nodes. (And it should probably throw an “unsupported” exception if there are child nodes, at least until we get around to supporting slots…)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - that makes sense. I'm not attached to this approach - this was just a sketch to see what would be possible / how complicated support might turn out to be.

@lucaswerkmeister
Copy link
Member

Gonna close this as superseded by #35 :)

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

Successfully merging this pull request may close these issues.

2 participants