WordPress / gutenberg-starter-theme

A simple theme for testing Gutenberg.
GNU General Public License v2.0
683 stars 163 forks source link

Add block based templates for FSE #104

Closed kjellr closed 4 years ago

kjellr commented 4 years ago

This PR adds some very basic block templates and template parts, along with a couple temporary styles to get them looking similar to the front end today. This lets folks start using the Full site editor with this theme today, but leaves things unchanged when the FSE experiment is turned off.

This is just a starting point. The next step would be to add an experimental-theme.json file.

Testing

  1. Activate this branch as your theme
  2. Install the latest Gutenberg Plugin
  3. Activate the Full Site Editing experiment from Gutenberg > Experiments.
  4. See that the front end of the site is close to its usual appearance, but is now editable via the beta full site editor.

Screenshots

Front end with FSE On (Before) Front end with FSE On (After)
Screen Shot 2020-07-29 at 2 35 42 PM Screen Shot 2020-07-29 at 2 22 39 PM

Full-site editor:

Screen Shot 2020-07-29 at 2 38 43 PM
mapk commented 4 years ago

I'm sure if this is a concern, but I only see "Header" under "Template parts" in the wp-admin.

Screen Shot 2020-07-29 at 1 54 02 PM

But I see a "Footer" under the "Choose existing" option for template parts in the full site editor.

Screen Shot 2020-07-29 at 1 57 02 PM

When adding the Footer, I see there's an invalid block? This "Attempt recovery" msg also was showing in the preview above.

Screen Shot 2020-07-29 at 1 58 26 PM

kjellr commented 4 years ago

I'm sure if this is a concern, but I only see "Header" under "Template parts" in the wp-admin.

For this one — no theme template files show up there. So anything you see there has been created on your local install.

When adding the Footer, I see there's an invalid block? This "Attempt recovery" msg also was showing in the preview above.

This on the other hand is likely a bug. 😄 I'll take a look.

kjellr commented 4 years ago

When adding the Footer, I see there's an invalid block? This "Attempt recovery" msg also was showing in the preview above.

On second thought, I'm not seeing this on my install. 🤔

@jffng if you have a moment, would you mind giving this a try to see if I'm missing something?

footer

jasmussen commented 4 years ago

The code change here, I don't see how it should be able to cause any issues that aren't issues in the block editor itself. That is to say if you find bugs, they are almost certainly some we need to fix in the project itself.

Also, this starter theme is so out of date, and I'm just delighted to see movement here. Ship this as fast as you can, and absolutely file tickets for anything you find.

jffng commented 4 years ago

This works in my testing (Gutenberg 8.6.1) as both a block-based and regular theme. I don't have repo permissions, but think this is worth merging. It's is a nice addition for anyone coming to this repo and hoping to get an idea for how to start adding FSE support to their theme.

kjellr commented 4 years ago

Thank you everyone!