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

Site Editing: Add option to preview template #28208

Open
annezazu opened this issue Jan 14, 2021 · 12 comments
Open

Site Editing: Add option to preview template #28208

annezazu opened this issue Jan 14, 2021 · 12 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

Description

Currently, when using the template editing flow as described in this call for testing, there's not a way to preview the changes. However, if you edit the same template using the Site Editor, an option is available to preview the template on desktop/mobile/tablet.

Step-by-step reproduction instructions

Please list the steps needed to reproduce the bug. For example:

  1. Install Gutenberg 9.7+ and a FSE ready theme.
  2. Go to Pages > Add New
  3. Make some changes to the page > Save Draft or Publish.
  4. Use the option to edit the template to switch into template editing mode in the post settings section.
  5. Make some changes to the template.
  6. See that there's no option to preview the changes.

Expected behaviour

I expect there to be a way to preview the changes similar to the ability to do so when using the Site Editor experience.

Actual behaviour

There's no way to preview the changes

Screenshots or screen recording (optional)

Here's a quick recording showing the two experiences: https://cloudup.com/cPYwQ1FAA_p

Page > Template editing:
Screen Shot 2021-01-14 at 3 48 23 PM

Site Editor > Selecting a template:
Screen Shot 2021-01-14 at 3 48 05 PM

WordPress information

  • WordPress version: 5.6
  • Gutenberg version: 9.7.2
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, TT1 blocks
@annezazu annezazu added [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Feature] Full Site Editing labels Jan 14, 2021
@annezazu
Copy link
Contributor Author

Pulling in some feedback from a recent WP Tavern post that feels both relevant and reflective of wider feedback I've seen:

There were so many inconsistencies between the site editor and the front end that there is little point in listing them all. Spacing was grossly off. I generally see that as a theme issue. I spent much of my time in trial-and-error mode, making an adjustment in the editor and refreshing to see the front-end result. Rinse. Repeat.

@priethor
Copy link
Contributor

priethor commented Mar 9, 2021

Moreover, the "Preview in Desktop/Tablet/Mobile" doesn't show a real preview of the Frontend and its stored HTML but only resizes the Editor to different sizes, causing the experience commented in WP Tavern. Such experience could be improved with a "Preview Site" or "Browse Mode" as described in #29398 and #23328, respectively.

@hanneslsm
Copy link

hanneslsm commented Apr 24, 2023

Can this be prioritised again, please?
Changing something in the editor (no matter if it's the title, a text, an image, the publishing date or the template) should lead to a change in the preview.
Since this issue is from 2021 and the screen recording a bit out of date, please also see #50016

@priethor
Copy link
Contributor

priethor commented Jul 4, 2023

Now that content editing is possible in the Site Editor, the logical next step is to consolidate template editing there, which would supersede the template editing mode in general. I don't think this is actionable and we can close it, as it will be solved by such consolidation; what do you think, @annezazu?

@annezazu
Copy link
Contributor Author

annezazu commented Jul 4, 2023

I disagree. I think the ability to change templates and then preview those changes is still needed. Right now, there isn't an option to swap templates when editing pages in the Site Editor: #51477 When that's implemented, afaik, this same problem will remain. Until you save changes, you won't be able to preview. Am I missing anything?

@priethor
Copy link
Contributor

priethor commented Jul 5, 2023

I don't think you are. I think it's likely more actionable to make these improvements in the Site Editor and consolidate all template editing there (even when entering template editing mode from the post editor) than iterating the template editor itself. Let's keep it open then until we have more clarity on where template editing from the post editor is going to go :)

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@cometgrrl
Copy link

+1. I would really love to be able to preview changes before saving a template.

@annezazu
Copy link
Contributor Author

annezazu commented Sep 3, 2024

Noting that you can now preview a template when writing a post as of WP 6.6.1:

preview.template.works.mov

Here's an example where I use the template editor to change the placement of the feature image and it properly shows the changes when previewing in the editor. However, if I try to preview in a new tab, the changes aren't reflected:

preview.template.works.mov

This leaves us in a better state! I wonder what's needed for the final step of having the template changes previewable on the front end.

@richtabor
Copy link
Member

Noting that you can now preview a template when writing a post as of WP 6.6.1:

Could be interesting to potentially expose that option in the preview dropdown, rather than buried in the template setting.

@richtabor
Copy link
Member

I wonder what's needed for the final step of having the template changes previewable on the front end.

Is this technically possible? Would you just preview any relative content?

There were so many inconsistencies between the site editor and the front end that there is little point in listing them all. Spacing was grossly off. I generally see that as a theme issue. I spent much of my time in trial-and-error mode, making an adjustment in the editor and refreshing to see the front-end result. Rinse. Repeat.

This is less and less prevalent. I suspect the idea of previewing changes before their "published" itself is becoming obsolete.

@annezazu
Copy link
Contributor Author

annezazu commented Sep 3, 2024

Anecdotal but it’s most definitely not obsolete for me.

@richtabor
Copy link
Member

It's not obsolete today, but certainly on that path.

I'm curious if we should invest effort into previewing templates, which is unlikely to be a clear implementation + experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants