WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 4 weeks ago

Last modified 6 days ago

#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 (27)

This ticket was mentioned in PR #1796 on WordPress/wordpress-develop by ockham.


5 weeks ago

  • Keywords has-patch added

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

#2 @prbot
5 weeks ago

youknowriad commented on PR #1796:

I've merged template-part utils and template utils because the template-utils already worked for both. We just missed some functions.

#3 @prbot
4 weeks ago

youknowriad commented on PR #1796:

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?

#4 @prbot
4 weeks ago

youknowriad commented on PR #1796:

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).

#5 @prbot
4 weeks ago

noisysocks commented on PR #1796:

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.

#6 @prbot
4 weeks ago

youknowriad commented on PR #1796:

@noisysocks yeah, I'm also fine if we include this patch in the packages update one, whatever works for you.

#7 @prbot
4 weeks ago

hellofromtonya commented on PR #1796:

My comments/suggestions in the tests are not blockers as I can be update them after the merge.

#8 @prbot
4 weeks ago

hellofromtonya commented on PR #1796:

My comments/suggestions in the tests are not blockers as I can be update them after the merge.

#9 @prbot
4 weeks ago

hellofromtonya commented on PR #1796:

Whoopsie didn't mean to close this. Reopening.

#10 @prbot
4 weeks ago

hellofromtonya commented on PR #1796:

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 with assertSame.
  • 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.


4 weeks ago

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

#12 @prbot
4 weeks ago

desrosj commented on PR #1825:

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.

#13 @prbot
4 weeks ago

ockham commented on PR #1796:

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?

#14 @prbot
4 weeks ago

ockham commented on PR #1796:

FWIW, get_query_pagination_arrow was added to GB by this PR: https://github.com/WordPress/gutenberg/pull/33656

#15 @prbot
4 weeks ago

ntsekouras commented on PR #1796:

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.

#16 @prbot
4 weeks ago

ntsekouras commented on PR #1796:

Added get_query_pagination_arrow in blocks.php.

#17 @prbot
4 weeks ago

ockham commented on PR #1796:

No worries! Thanks a lot for the fix, Nik!

#18 @prbot
4 weeks ago

ockham commented on PR #1796:

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 😄

#19 @prbot
4 weeks ago

ockham commented on PR #1796:

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...

#20 @prbot
4 weeks ago

ockham commented on PR #1796:

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...

#21 @noisysocks
4 weeks ago

  • Owner set to bernhard-reiter
  • Status changed from new to assigned

#22 @prbot
4 weeks ago

noisysocks commented on PR #1796:

Thanks @bernie! I'll rebase and commit this.

#23 @prbot
4 weeks ago

noisysocks commented on PR #1796:

Going to ignore the lint failures as they are failing on trunk too.

https://wordpress.slack.com/archives/C02RQBWTW/p1636411775055600

#24 @noisysocks
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 52062:

Editor: Add block theme infrastructure

Adds the required infrastructure to render block-based themes. This is sourced
from the Gutenberg plugin.

Fixes #54335.
Props bernhard-reiter, youknowriad, ntsekouras, hellofromtonya.

This ticket was mentioned in Slack in #core-editor by noisysocks. View the logs.


4 weeks ago

#26 @desrosj
4 weeks ago

In 52110:

Docs: Avoid using “CPT” instead of “custom post type”.

Additionally, when referring to built in Core post types, “custom” is unnecessary.

This also adds a period to the end of the wp_global_styles post type description.

Follow up to [38829], [51003], [52041], [52049], [52062].

See #53399, #54335, #54336.

#27 @SergeyBiryukov
6 days ago

In 52266:

Tests: Replace assertEquals() with assertSame() in block template tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using assertSame(), assertSameSets(), or assertSameSetsWithIndex() should generally be preferred, to make the tests more reliable.

Follow-up to [51003], [51079], [52062], [52265].

See #53364, #53363, #54335.

Note: See TracTickets for help on using tickets.