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

Starter Page Templates: Use template/demo endpoint for the preview #49511

Closed

Conversation

andrewserong
Copy link
Member

@andrewserong andrewserong commented Feb 1, 2021

This is an alternative to #49101 for dealing with attempting to resolve some of the preview issues with the starter page templates. It attempts to resolve it by using the template/demo endpoint for the previews, however there are some drawbacks with this approach:

  • The contact forms still aren't rendering correctly (raised in Add New Page Screen: Contact Form not rendering correctly in preview #48889)
  • The preview will render with the user's selected theme, however won't pick up any colour changes they've made
  • If the user has changed their fonts it won't pick them up either
  • Lists of blog posts will not render with the user's content (however there's an update to use better looking placeholder content in D56259-code)

Screenshot

Note in this screenshot, it doesn't address the issue in #48889, as it's instead showing a different problem with the preview:

image

Changes proposed in this Pull Request

  • Try out replacing the main preview for starter page templates with the template/demo endpoint

Testing instructions

  • Apply the diff associated with this PR and sandbox your test site
  • Go to create a new page, and preview the different page layouts
  • Change theme and continue previewing

Related to #

@matticbot
Copy link
Contributor

@andrewserong andrewserong self-assigned this Feb 1, 2021
@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.

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D56263-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2

@andrewserong
Copy link
Member Author

Closing as this approach is not viable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants