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

Patterns with page post type do not render within the Site Editor #45859

Open
richtabor opened this issue Nov 17, 2022 · 10 comments
Open

Patterns with page post type do not render within the Site Editor #45859

richtabor opened this issue Nov 17, 2022 · 10 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Testing Needs further testing to be confirmed. [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

What problem does this address?

I'd expect that full page patterns, that are designed for pages — not necessarily posts, products, or any other custom post type (CPT), would be available within the Site Editor, to drop within templates.

Currently any pattern that declares a post type is ignored by the Site Editor, which is fine for most CPTs, but for pages - it means that full designs cannot be leveraged from the Site Editor.

What is your proposed solution?

I suggest that "page" post type patterns should always be available in the Site Editor.

Visual

Added a test page pattern to Twenty Twenty Three (page CPT):

CleanShot 2022-11-17 at 10 16 00@2x

As seen within the Site Editor; no page pattern:

CleanShot 2022-11-17 at 10 10 45@2x

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Nov 17, 2022
@bph
Copy link
Contributor

bph commented Nov 17, 2022

There is a feature that allows for the Page pattern to be loaded on Add New Page in the editor. Does that not work for you? Here is the Dev Note: Page creation patterns in WordPress 6.0

Your idea would be similar so a theme developer can offer more page layout patterns for both, page editor and site editor?

@richtabor
Copy link
Member Author

There is a feature that allows for the Page pattern to be loaded on Add New Page in the editor. Does that not work for you?

That works fine and properly, but not exactly related.

My thought is that if a pattern is set to display on a Page Post Type, then it will not show up within the Site Editor (as its not that post type). I think it should be, as page patterns are useful for building out templates as well. :)

@github-actions
Copy link

Hi,
This issue has gone 180 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the Needs Testing Needs further testing to be confirmed. label May 17, 2023
@github-actions
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jun 16, 2023
@jordesign
Copy link
Contributor

Hey @richtabor - just looping through Stale issues and wanted to check in with you as to whether this is still relevant?

@richtabor
Copy link
Member Author

Hey @richtabor - just looping through Stale issues and wanted to check in with you as to whether this is still relevant?

Yes, this is still an issue.

If I register a pattern (example gist) and assign it to only display for the page custom post type (I wouldn't want this About Page pattern to render on the "Choose a pattern" modal for any other custom post type) then it does not render within the Site Editor, where page CPT patterns are just as important.

Here's the pattern rendering on page creation, properly:

CleanShot 2023-07-11 at 14 13 11

And here it's missing from the Pattern inserter of the Site Editor (it should be under "Uncategorized"):

CleanShot 2023-07-11 at 14 17 58

@jordesign jordesign removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jul 11, 2023
@youknowriad
Copy link
Contributor

I just tested this again and the pattern does show up for me. Closing as fixed but let me know if I missed anything.

@richtabor
Copy link
Member Author

@youknowriad I'm pretty sure this is still occurring.

  1. Set WP_THEME_DEV to true

  2. Add this pattern to your theme's /patterns directory.

  3. Test WP Admin > Add new page

  4. See pattern:

CleanShot 2024-07-19 at 10 36 29

  1. Test Site Editor > Pages > Add new

  2. See no starter content modal, and no "TESTTEST" pattern in the inserter, even though the Post Type is defined as page:

CleanShot 2024-07-19 at 10 37 03

@richtabor richtabor reopened this Jul 19, 2024
@youknowriad
Copy link
Contributor

See no starter content modal, and no "TESTTEST" pattern in the inserter, even though the Post Type is defined as page:

If I'm not wrong, the "no starter pattern" there is because you're in "template visible" mode by default no?

@richtabor
Copy link
Member Author

I just selected to add a new page in the Site Editor, just as I did in the post editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Testing Needs further testing to be confirmed. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants