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

Fix editor and pattern preview styles, use Twenty Twenty-Three for previews #557

Merged
merged 11 commits into from
Feb 28, 2023

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Feb 24, 2023

Fixes #554 — This switches the pattern preview code to use Twenty Twenty-Three, so that all available layout and style settings are supported. This also adds the layout styles to the creator view, so that wide & full width elements work. Lastly, this changes how the preview is rendered. Instead of aborting after template_redirect, this creates a fork of the template-canvas.php and renders a fake template, allowing all relevant filters to run and inject the correct container & layout styles.

Screenshots

(trunk) Editor (trunk) Preview (pr) Editor (pr) Preview
trunk-site-logo-editor-1280 trunk-site-logo-view-1280 branch-site-logo-editor-1280 branch-site-logo-view-1280
trunk-block-gap-editor-1280 trunk-block-gap-view-1280 branch-block-gap-editor-1280 branch-block-gap-view-1280
trunk-three-widths-editor-1280 trunk-three-widths-view-1280 branch-three-widths-editor-1280 branch-three-widths-view-1280

How to test the changes in this Pull Request:

  1. Create patterns with various layout options, specifically using block gap & widths
  2. Try buttons, other design changes
  3. The creator view and the pattern preview should look the same, no drastic differences

@ryelle ryelle added [Component] Pattern Creator Anything related to the pattern front end editor or preview [Component] Theme The frontend of the pattern directory, pattern lists UI labels Feb 24, 2023
@ryelle ryelle self-assigned this Feb 24, 2023
Base automatically changed from update/packages-plugin to trunk February 28, 2023 20:27
@ryelle ryelle merged commit 52a030a into trunk Feb 28, 2023
@ryelle ryelle deleted the fix/creator-preview-styles-match branch February 28, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview [Component] Theme The frontend of the pattern directory, pattern lists UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pattern editor style issue (in comparison to pattern preview)
1 participant