Block Themes: Add Infrastructure#1796
Block Themes: Add Infrastructure#1796ockham wants to merge 43 commits intoWordPress:trunkfrom ockham:add/block-template-theme-infrastructure
Conversation
|
I've merged template-part utils and template utils because the template-utils already worked for both. We just missed some functions. |
What is this item about @ockham I think there's no stylesheet for this block if I'm not wrong? |
|
Ok, I think this one is actually ready, the only issue is the manual modifications to the template part blocks which is breaking some tests (unit, e2e tests, npm). |
| * | ||
| * @return array Template. | ||
| */ | ||
| function _get_block_templates_files( $template_type ) { |
There was a problem hiding this comment.
Should this be _get_block_template_files? (no plural in templates)
There was a problem hiding this comment.
I hesitated but I choice "templates" because it's multiple templates while template-files could mean mutiple files for a single template. Not entirely confident with my choice, that said, it's not very important because it's a private function.
src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
Outdated
Show resolved
Hide resolved
| * Should retrieve the template from the theme files. | ||
| */ | ||
| function test_get_block_template_from_file() { | ||
| $this->markTestIncomplete(); |
There was a problem hiding this comment.
Why skipped this? I'm having the same issue in the GB PR.
There was a problem hiding this comment.
Here It's skipped because there's no FSE theme we can active on Core yet.
There was a problem hiding this comment.
WP 5.9 will include Twenty Twenty Two though 🤔 I guess we should file an issue or ticket somewhere to re-enable these tests once we have that theme available in Core.
It's a bit of a chicken and egg problem because #1804 which updates the blocks properly depends on this PR 🙂 I guess we will need to just skip the tests or commit this with failing tests and then immediately follow up with commits for https://core.trac.wordpress.org/ticket/54336 and https://core.trac.wordpress.org/ticket/54337. |
|
@noisysocks yeah, I'm also fine if we include this patch in the packages update one, whatever works for you. |
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
|
Thanks @Bernie! I'll rebase and commit this. |
|
Going to ignore the lint failures as they are failing on https://wordpress.slack.com/archives/C02RQBWTW/p1636411775055600 |
Work in progress. Attempts to add the required infrastructure to render block-based themes to Core.
Trac ticket: https://core.trac.wordpress.org/ticket/54335
TODO
gutenberg_prefixes and_gutenberg_infixes.@sinceitems where needed.This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.