bobbingwide / thisis

ThisIs ... experimental Full Site Editing theme
GNU General Public License v3.0
1 stars 0 forks source link

Write something about Preview in the Site Editor vs content / template editor #22

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

From Carolina's comment https://github.com/WordPress/gutenberg/issues/29398#issuecomment-817695028

It’s confusing that the Preview option is still not a real preview...

I was just creating a custom template for a page. After saving the page I viewed the site and realised that what I was looking at was nothing like what I saw in the the Preview.

Note: This was the Preview in the normal block editor.

image

Viewing the page in the front end the custom template is used. Here I've used the inspector to preview display on an iPad.

image image

In order to see the Preview using the correct template for the page I needed to:

  1. Open Site Editor
  2. Choose Toggle Navigation
  3. Choose Page Templates
  4. Choose Page Template hierarchy
  5. Choose Navigation again
  6. Choose Templates
  7. Choose Theme
  8. Choose Pages
  9. Search for the page
  10. Choose Template Hierarchy
  11. Toggle settings off
  12. Then choose Preview

And the results are subtly different from the actual front end.

image image

bobbingwide commented 3 years ago

I also noted that my custom HTML block looked a bit better if it was also switched into Preview mode. I found this had already been suggested. See https://github.com/WordPress/gutenberg/issues/23328

The subtle differences were:

Part of the difference between the Preview and View is that the site's style.css is not loaded in Preview. Perhaps this can be improved by using editor styles.

The 12 step process was quite a faff. It's much easier to save and view.