-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make it possible to create a template part directly via the Inserter #31746
Comments
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.mp4Rather 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.mp4Note: 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. |
I'll start exploring this. |
For new template parts that you want to assign to the Header or Footer
area
the process is a little convoluted and can be refined.Current flow:
area
in the "Advanced" panel of the InspectorThis can be simplified down to:
In this case the area is assigned automatically upon insertion.
The text was updated successfully, but these errors were encountered: