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

Provide a way for a pattern to be directly swapped for a different pattern #42771

Closed
Andrew-Starr opened this issue Jul 28, 2022 · 1 comment
Closed
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced

Comments

@Andrew-Starr
Copy link

What problem does this address?

While recently showing someone how to insert a pattern into a page, they turned to me with the question "can I change this pattern for another pattern?"

As it is now, this would require removing all of the blocks that make up the previously added pattern, and then adding the other pattern.

Once a pattern has been added, this collection of individual blocks loses its "patternness", and so directly swapping it for another is not possible.

What is your proposed solution?

Perhaps the Group block could have an additional attribute that would let us define a custom pattern area, perhaps in the Advanced section similar to how we can write HTML anchor.

Patterns with the same area attribute on the group container could then be swappable in the editor. This part I'm not sure exactly how it would work. Maybe a control in the Group block toolbar that would let us preview and select a different pattern that has the same defined area attribute.

@carolinan carolinan added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Jul 28, 2022
@mtias
Copy link
Member

mtias commented Jul 28, 2022

Thanks for the suggestion! Closing as duplicate since this is captured in these two issues:

It's an important part of the patterns roadmap — transforming patterns into other patterns, having collections / variations of patterns for an area like we do for headers, footers, queries.

@mtias mtias closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2022
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
Projects
None yet
Development

No branches or pull requests

3 participants