This repository was archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
🎨 Server-side rendering of wp-show in PHP #100
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s' into wpmoviesdemo
Co-authored-by: Mario Santos <[email protected]>
Co-authored-by: Mario Santos <[email protected]>
23 tasks
Member
Author
|
Closing this PR in favor of a possible run-time implementation based on the WP_HTML_Tag_Processor that @ockham and @dmsnell have started investigating. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Co-authored with @SantosGuillamot.
Mario and I have created a simple proof of concept of how server-side rendering of a
wp-showclient component could look like.It uses a manual node script to parse the
render.phpfile using ultrahtml (a simple HTML parser) and inject PHP functions. Then, we use those functions to evaluate the state and modify the markup accordingly.We did this work on top of the
wpmoviesdemobranch because we are using a block to test this out, and thewpmoviesdemobranch already had some blocks working fine. I didn't remove thewpmoviesdemoblocks, but I removed the Shared Elements transitions. We haven't decided whether the WP Directives plugin should contain block examples or not.This is very basic yet, and everything is hardcoded, but it demonstrates one possible approach. If we go ahead with this technique, we'd need to figure out good APIs to make this extensible.
https://www.loom.com/share/ce216cb0286e4b6ea421129814418c3e