-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Try partially synced patterns via a template block #51042
Conversation
I like the idea of the Do we need a |
I feel like it might be needed so that the 'placeholder' blocks that come after the content block can be managed, but maybe there will be some way around that. |
I've added some basic PHP rendering code that replaces tokens with the placeholder values. For some reason the buttons block isn't rendering though after I made this change, so I'm debugging that right now. edit: buttons is actually fine, I didn't realise that it only renders when it has text content! |
Nice work on taking this idea to a working prototype! |
7910f86
to
e277710
Compare
Size Change: +966 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
Flaky tests detected in e277710. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5196555172
|
d2b880c
to
ad92493
Compare
What?
A possible first step towards developing the templating concept described in #50456 (comment).
Introduces three new blocks:
At the moment there isn't much functionality. You can select a child block of the template content and click a 'Convert to placeholder' button, which swaps the content with a token, which represents what a user might do when designing a pattern. You can also remove a token, which puts the placeholder back in place.
The block renders dynamically via PHP and swaps the tokens for the placeholder values.
Next steps:
Testing Instructions
Screenshots or screencast