#54335 closed task (blessed) (fixed)
Add FSE infrastructure from Gutenberg plugin into Core
Reported by: | noisysocks | Owned by: | bernhard-reiter |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
- Make it so that a block theme can be activated and render correctly on the frontend.
- Add site editing REST API endpoints.
- Add necessary PHP helpers (
WP_Block_Template
, etc.)
https://github.com/WordPress/gutenberg/tree/trunk/lib/full-site-editing
Change History (43)
This ticket was mentioned in PR #1796 on WordPress/wordpress-develop by ockham.
3 years ago
#1
- Keywords has-patch added
youknowriad commented on PR #1796:
3 years ago
#2
I've merged template-part utils and template utils because the template-utils already worked for both. We just missed some functions.
youknowriad commented on PR #1796:
3 years ago
#3
Add minified CSS to Template Part block.
What is this item about @ockham I think there's no stylesheet for this block if I'm not wrong?
youknowriad commented on PR #1796:
3 years ago
#4
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).
noisysocks commented on PR #1796:
3 years ago
#5
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).
It's a bit of a chicken and egg problem because https://github.com/WordPress/wordpress-develop/pull/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.
youknowriad commented on PR #1796:
3 years ago
#6
@noisysocks yeah, I'm also fine if we include this patch in the packages update one, whatever works for you.
hellofromtonya commented on PR #1796:
3 years ago
#7
My comments/suggestions in the tests are not blockers as I can be update them after the merge.
hellofromtonya commented on PR #1796:
3 years ago
#8
My comments/suggestions in the tests are not blockers as I can be update them after the merge.
hellofromtonya commented on PR #1796:
3 years ago
#9
Whoopsie didn't mean to close this. Reopening.
hellofromtonya commented on PR #1796:
3 years ago
#10
In the tests, there are improvements that can be made which are not blockers to merge this PR:
- With PHP getting more and more strict, an effort is ongoing to replace all
assertEquals
withassertSame
. - With multiple assertions in a single test, if one fails, the other assertions do not run and it can be difficult to know which assertion failed. An effort is ongoing to add custom messages to each of these assertions to help with debugging.
I deleted all of the code suggestions for the tests (too much noise). I'll check after merge for any improvements, which BTW can happen after feature freeze.
This ticket was mentioned in PR #1825 on WordPress/wordpress-develop by noisysocks.
3 years ago
#11
https://github.com/WordPress/wordpress-develop/pull/1796 and https://github.com/WordPress/wordpress-develop/pull/1804 depend on each other for tests to pass, so this PR merges both of those PRs into a single big branch. Hopefully that means we can fix tests and commit.
Trac ticket:
https://core.trac.wordpress.org/ticket/54335
https://core.trac.wordpress.org/ticket/54337
3 years ago
#12
I've changed the base of this PR to trunk
. This is now the default branch going forward. See the original proposal that is finally being put in place.
3 years ago
#13
After rebasing, TT1 Blocks fatals on the frontend since get_query_pagination_arrow
is missing. That function is indeed absent from Core; whereas in GB, it’s defined in the WP 5.8 compat layer. I’m a bit confused; I thought that means that it’s been present in Core since 5.8?
3 years ago
#14
FWIW, get_query_pagination_arrow
was added to GB by this PR: https://github.com/WordPress/gutenberg/pull/33656
ntsekouras commented on PR #1796:
3 years ago
#15
After rebasing, TT1 Blocks fatals on the frontend since get_query_pagination_arrow is missing. That function is indeed absent from Core; whereas in GB, it’s defined in the WP 5.8 compat layer. I’m a bit confused; I thought that means that it’s been present in Core since 5.8?
That's my bad, sorry 😞 . I will have a PR for adding this in 5.9
for GB. It needs to be added in core as well.
ntsekouras commented on PR #1796:
3 years ago
#16
Added get_query_pagination_arrow
in blocks.php
.
3 years ago
#18
Thanks to everyone who has worked on this, by adding and improving code, or reviewing!
I think we've addressed all feedback, so I'm setting this PR to ready for review. All that's left is some final approval now 😄
3 years ago
#19
Ah, rebasing on trunk
(which now includes https://github.com/WordPress/wordpress-develop/pull/1808) introduced a conflict (duplicated get_custom_templates()
). I'll fix...
3 years ago
#20
Ah, rebasing on trunk
(which now includes https://github.com/WordPress/wordpress-develop/pull/1808) introduced a conflict (duplicated get_custom_templates()
). I'll fix...
noisysocks commented on PR #1796:
3 years ago
#22
Thanks @bernie! I'll rebase and commit this.
noisysocks commented on PR #1796:
3 years ago
#23
Going to ignore the lint failures as they are failing on trunk
too.
https://wordpress.slack.com/archives/C02RQBWTW/p1636411775055600
This ticket was mentioned in Slack in #core-editor by noisysocks. View the logs.
3 years ago
This ticket was mentioned in PR #2020 on WordPress/wordpress-develop by youknowriad.
3 years ago
#28
This backports a change that was missed during the initial backports related to the templates list shown in the post editor.
It's a change from the following Gutenberg PR https://github.com/WordPress/gutenberg/pull/35802
Trac ticket: https://core.trac.wordpress.org/ticket/54335
Testing instructions
Make sure the post editor only shows custom page templates in the template list and not hierarchy templates (index, single...)
cc @Mamaduka
This ticket was mentioned in PR #2020 on WordPress/wordpress-develop by youknowriad.
3 years ago
#29
This backports a change that was missed during the initial backports related to the templates list shown in the post editor.
It's a change from the following Gutenberg PR https://github.com/WordPress/gutenberg/pull/35802
Trac ticket: https://core.trac.wordpress.org/ticket/54335
Testing instructions
Make sure the post editor only shows custom page templates in the template list and not hierarchy templates (index, single...)
cc @Mamaduka
This ticket was mentioned in PR #2021 on WordPress/wordpress-develop by youknowriad.
3 years ago
#30
This backports a Gutenberg change that was missed during the last backport session.
It's a change from the following Gutenberg PR https://github.com/WordPress/gutenberg/pull/36000
Trac ticket: https://core.trac.wordpress.org/ticket/54335
cc @jameskoster
youknowriad commented on PR #2021:
3 years ago
#32
committed in https://core.trac.wordpress.org/changeset/52331
youknowriad commented on PR #2020:
3 years ago
#34
Committed in https://core.trac.wordpress.org/changeset/52334
youknowriad commented on PR #2020:
3 years ago
#35
Committed in https://core.trac.wordpress.org/changeset/52334
noisysocks commented on PR #2021:
3 years ago
#36
Thank you!
This ticket was mentioned in PR #2031 on WordPress/wordpress-develop by Mamaduka.
3 years ago
#37
Follow-up for #2020.
This method calls get_block_templates
once and uses block template properties directly for filtering. This way, we can avoid hitting the database for each public post type.
The previous method is useful when we already know the current post type we request templates for, like when using REST API.
Trac ticket: https://core.trac.wordpress.org/ticket/54335
---
Cc @youknowriad @noisysocks @hellofromtonya
This ticket was mentioned in PR #2035 on WordPress/wordpress-develop by youknowriad.
3 years ago
#38
Block themes without theme.json file didn't have block templates support enabled in Core by default while they did with the Gutenberg plugin, this fixes that.
Trac ticket: https://core.trac.wordpress.org/ticket/54335
youknowriad commented on PR #2035:
3 years ago
#40
Committed in https://core.trac.wordpress.org/changeset/52347
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