Skip to content
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

Full Site Editing: Replace temporary template block injection from core/template to core/group #36228

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

Copons
Copy link
Contributor

@Copons Copons commented Sep 23, 2019

Changes proposed in this Pull Request

The core/template block will be removed in Gutenberg 6.5. (Props to @glendaviesnz for finding out about this!)
Full Site Editing uses it to group the content (blocks) of FSE templates before feeding them to their BlockEdit components inside the page editor.

This PR simply uses core/group as grouping block instead of core/template.

After some tests, it doesn't seem to me there are any differences with the previous approach, but I wasn't around when we decided to use core/template, and there might be edge cases (e.g. with the template locking, which is not clear to me how it works) that I haven't considered.

Testing instructions

  • On an FSE test site, update Gutenberg to 6.5 (or build from master).
  • Try opening an FSE page, and observe that the template blocks are broken because the core/template block doesn't exist anymore.
  • Apply this PR.
  • Reload the FSE page (make sure it didn't autosave without the template blocks, in which case restore a previous revision).
  • Make sure the template blocks look as expected.
  • Save and view the page in the front end.
  • Make sure the page looks as expected.

Fixes #36217

@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@Copons Copons requested review from a team September 23, 2019 16:29
@Copons Copons self-assigned this Sep 23, 2019
@Copons Copons added [Goal] Full Site Editing [Pri] BLOCKER Requires immediate attention. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 23, 2019
@Copons Copons marked this pull request as ready for review September 23, 2019 16:30
@Copons Copons requested a review from a team as a code owner September 23, 2019 16:30
Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well for me @Copons, sandboxed and testing on horizon!

Before:
Screen Shot 2019-09-23 at 11 53 59 AM

After:
Screen Shot 2019-09-23 at 11 36 52 AM

Copy link
Contributor

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me! I tested on a wpcom simple site. Editor and front end all work as expected.

@noahtallen
Copy link
Contributor

noahtallen commented Sep 24, 2019

I just noticed this when I was testing a sandboxed site on Horizon (i.e. has the new Gutenberg version, and I'm syncing this branch):

Screen Shot 2019-09-23 at 6 21 35 PM

Unsure if related. Investigating. 👀

Edit: nevermind. This was an issue with my sync. Everything looking good :)

@Copons Copons merged commit 3605c24 into master Sep 24, 2019
@Copons Copons deleted the fix/fse-core-template-block branch September 24, 2019 09:00
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Full Site Editing [Pri] BLOCKER Requires immediate attention.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FSE: Templates don't display in editor with Gutenberg 6.5
4 participants