You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it possible to create a template part directly via the Inserter #31746
I've been thinking that it might be interesting to repurpose our semantic template part variations in order to serve as 'starter' blocks. IE:
"Header" block becomes "New Header"
"Footer" block becomes "New Footer"
"Template Part" becomes "New Template Part"
The addition of the "New" prefix clearly defines the purpose of the block, and releases "Header" and "Footer" as names that folks (end users and theme developers) can safely use for the actual site header/footer template parts. This will be important when we expose existing template parts in the inserter (#31748).
We can utilise the designs in #31033 to present users with contextually relevant patterns upon insertion. Here's a diagram outlining the flow:
And here's a video demonstrating the flow for adding a new header:
new.header.mp4
Rather than asking the user for a name up-front, it might be simpler to assign a name automatically, but provide an affordance to immediately rename it via the Snackbar confirmation notice.
If no suitable patterns exist then the template part would be inserted in an empty state and exhibit the same characteristics as other empty containers.
Once the new template part is published, it will appear in the Inserter as outlined in #31748.
My main area of concern with this concept is the totally new interaction of seeing a modal when clicking a block in the inserter. Some finely tuned animation might help better illustrate the relationship here. A rough mockup:
block-to-modal.mp4
Note: The icons are essentially placeholders for now, we should probably discuss those in more detail in a dedicated issue if we go ahead with this approach.
changed the title [-]Creating a from scratch template part via the Inserter[/-][+]Make it possible to create a template part directly via the Inserter[/+]on May 23, 2022
I am going to be cautious and say this has been iterated on now considering that there are PRs linking out and the interface has changed since this work. We can always reopen it but closing feels like the next step for this.
Activity
jameskoster commentedon May 18, 2021
I've been thinking that it might be interesting to repurpose our semantic template part variations in order to serve as 'starter' blocks. IE:
The addition of the "New" prefix clearly defines the purpose of the block, and releases "Header" and "Footer" as names that folks (end users and theme developers) can safely use for the actual site header/footer template parts. This will be important when we expose existing template parts in the inserter (#31748).
We can utilise the designs in #31033 to present users with contextually relevant patterns upon insertion. Here's a diagram outlining the flow:
And here's a video demonstrating the flow for adding a new header:
new.header.mp4
Rather than asking the user for a name up-front, it might be simpler to assign a name automatically, but provide an affordance to immediately rename it via the Snackbar confirmation notice.
If no suitable patterns exist then the template part would be inserted in an empty state and exhibit the same characteristics as other empty containers.
Once the new template part is published, it will appear in the Inserter as outlined in #31748.
My main area of concern with this concept is the totally new interaction of seeing a modal when clicking a block in the inserter. Some finely tuned animation might help better illustrate the relationship here. A rough mockup:
block-to-modal.mp4
Note: The icons are essentially placeholders for now, we should probably discuss those in more detail in a dedicated issue if we go ahead with this approach.
[-]Creating a from scratch template part via the Inserter[/-][+]Make it possible to create a template part directly via the Inserter[/+]talldan commentedon Jul 4, 2022
I'll start exploring this.
karmatosed commentedon May 31, 2025
I am going to be cautious and say this has been iterated on now considering that there are PRs linking out and the interface has changed since this work. We can always reopen it but closing feels like the next step for this.