Patterns from 10,000 feet #53542
matthisamoto
started this conversation in
Developer Experience
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to find a place to better understand where Patterns stand, with regard to the ecosystem at large: developers using WordPress with varying strategies across time.
My perspective: I'm writing this as a developer who creates custom themes for clients. Over the course of years, my strategy has evolved from the old Classic Editor, to using ACF-driven strict templates, to ACF-driven modular components, to the Block Editor supplementing with custom blocks, and now to Full Site Editing using Block Patterns to define the designed elements I am handed from my designer.
Generally I've tried to maintain a "starting place", or a boilerplate theme that I can begin from when I start a new project. Over the course of time I've seen WordPress change quite a bit and given its mission to never break backwards compatibility and the rate at which the block editor, etc. has changed recently, some parts of the whole can be built/managed several different ways.
Patterns in particular seem to have this characteristic. I can register a block pattern using PHP. I can create PHP files in the
/patterns
directory. I can create Patterns within the Site Editor. It feels like the methods for creating Patterns do not interact with each other.To lay out what I would call my "expectations" for how these methods would interact in a vacuum:
/patterns
would appear in the SE automatically.I realize this is not necessarily stopping me from doing what I want to do. The way I'm following it right now, I can create my patterns in the SE, copy the code for them into a PHP file in
/patterns
, and delete it from the SE (otherwise it shows up twice in the Inserter, once in My Patterns and once in Uncategorized, or wherever I chose to place it within the PHP file).Or I could create the Patterns in the SE, export them to JSON, and store that in the theme, knowing that if I ever had to install the theme in the future (or across staging/test/production environments) I would have to actively import them again into each fresh WP instance.
Neither of these are blocking me, it just seems to illustrate what I see as a disconnect between these methods as they have evolved one into the next. I haven't even mentioned connecting defined block patterns through
register_block_pattern
, as that no longer factors into my process.Where I've landed, as far as what suits my clients best, is to use the Site Editor, but I still want to maintain ultimate control via my theme's files. I am not so familiar with WordPress as any given contributor would be, so I'm very open to the fact that I have missed something, somewhere, that unlocks all of this for me. I've searched through the issues, I've looked through official WP docs and fullsiteediting.com. I've not really found anywhere that addresses this confusion, so I hope this is a good place to start.
Beta Was this translation helpful? Give feedback.
All reactions