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

Block Patterns for page creation. #38787

Closed
Tracked by #38529
youknowriad opened this issue Feb 14, 2022 · 8 comments
Closed
Tracked by #38529

Block Patterns for page creation. #38787

youknowriad opened this issue Feb 14, 2022 · 8 comments
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Feature New feature to highlight in changelogs.

Comments

@youknowriad
Copy link
Contributor

When creating new pages, the user is faced with an empty canvas that can be very hard to work with. We should explore showing a modal as you soon as you add a new page showing the different available block patterns similar to the modal we have when you click "explore" in the block patterns inserter.

Ideally, we'd have ways to mark "patterns" as "full page patterns".

Screen Shot 2022-02-14 at 3 11 17 PM

Also, the question here is what to do with "custom page templates" provided by themes. I think it would be cool to allow the user to pick from these templates as well.

One interesting related question as well is whether these patterns should fill the "post content" of the page, or a new "template" for the current page, or potentially both somehow and how to make that distinction when registering the patterns.

@youknowriad youknowriad added [Type] Feature New feature to highlight in changelogs. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Feb 14, 2022
@youknowriad youknowriad changed the title Page Block Patterns Block Patterns for page creation. Feb 14, 2022
@mtias mtias added the Needs Design Needs design efforts. label Feb 14, 2022
@jasmussen
Copy link
Contributor

Not entirely related and needs more work, but doodled a basic filtering interface here. Here's the Figma in case it can jump start better explorations.

@jorgefilipecosta
Copy link
Member

Ideally, we'd have ways to mark "patterns" as "full-page patterns".

I think patterns make most sense as a prefill for the content of a specific page. So it seems creating a page is almost a two-step process:

  • 1 Selecting a template for the page. From the page templates the theme makes available.
  • 2 Select a pattern to pre-fill the content of the page.

Full-page patterns may make sense in certain cases, for example as a subscribe form, a specific landing page, something very different from the rest of the theme and that does not include any of the theme UI.

I think if we support full-page patterns, we should have the concept of an "empty template" a template that just includes the page content, and when the user selects a full-page pattern we assign the empty template automatically. The pattern would be store as the page content.

But to promote the reusability of templates across pages we should promote the selection of a template.

@fabiankaegy
Copy link
Member

This is a great enhancement that makes it much less daunting to start creating a new page.

Working with the current implementation from #40034 I noticed that the modal currently only appears to be available for the Page Post Type. I think this would be a great feature to also get support for custom post types.

It would also be great to have a way to determine which patterns should get shown for which Post type. If I imagine a "Product" custom post type it would be super useful to only show various product-specific patterns that already use product CPT specific blocks in it.

At the same moment, it would be really valuable to have some programmatic way to opt-in or out of the modal altogether for certain post types.

@getdave
Copy link
Contributor

getdave commented May 25, 2022

@jorgefilipecosta Is this not now complete? We could/should open a new Issue for @fabiankaegy's ideas.

@fabiankaegy
Copy link
Member

@getdave i can create a new issue for the follow up feature request 👍

@fabiankaegy
Copy link
Member

Created a new issue here: #41304

@mtias
Copy link
Member

mtias commented May 27, 2022

@youknowriad I believe the bulk of this is covered with the post-content patterns?

@youknowriad
Copy link
Contributor Author

Yes, I think @jorgefilipecosta had a PR that should have closed this issue.

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 Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Feature New feature to highlight in changelogs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants