This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
SSR: Experiment with WP_HTML_Tag_Processor
#125
Closed
Closed
Conversation
This file contains 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
ockham
force-pushed
the
try/ssr-directives
branch
2 times, most recently
from
January 2, 2023 10:14
079799e
to
fc92ed1
Compare
2 tasks
ockham
commented
Jan 11, 2023
23 tasks
ockham
force-pushed
the
try/ssr-directives
branch
from
January 19, 2023 09:37
3c45692
to
9ac2496
Compare
I'll close this PR, since most of its code has now been merged into the I'll carry the status table from the PR description over to the tracking issue (#120), which will then serve as the only source of truth. |
2 tasks
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.
Trimmed-down version of #118, based directly on the
main-wp-directives-plugin
branch.AddsNow relies on the GB plugin to be installed and active, and uses its files directly.WP_HTML_Tag_Processor
files from Gutenbergtrunk
(i.e. everything from GB'slib/experimental/html/
is copied tosrc/html/
).We then add individual directives into
src/directives/
, and their corresponding unit tests intophpunit/directives/
.This should allow us to adopt a test-driven development approach, as we implement all missing directives, and to identify what other features we need in
WP_HTML_Tag_Processor
(also see #120).✅ - Implemented
🟡 - Waiting for an upcoming Gutenberg release to include a missing feature
❌ - Blocked by missing feature in
WP_HTML_Tag_Processor
wp-context
wp-show
get_content_inside_balanced_tags()
from WordPress/gutenberg#46345, and a matchingset_content_inside_balanced_tags()
(see WordPress/gutenberg#47036).wp-bind
get_attribute_names_with_prefix()
; landed in GB 15.0wp-class
wp-bind
.wp-style
wp-bind
. Furthermore, see WordPress/gutenberg#46887. (The latter isn't a blocker, though.)wp-text
wp-show
.wp-for
/wp-each
wp-html
wp-show
.wp-slot
&wp-fill
Testing Instructions
Note that this PR currently requires at least GB v14.9. You might have to
npm run wp-env destroy
and restart it in order to update your GB version.In addition, this PR currently uses
get_attribute_names_with_prefix
from WordPress/gutenberg#46840, which hasn't been merged into GB yet.To make it available locally, either add a
.wp-env.override.json
and point it to your local GB directory (with the required branch checked out), or apply the patch to your~/.wp-env/<yourdirectory>/gutenberg/
folder.