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

Make it possible to create a template part directly via the Inserter #31746

Open
jameskoster opened this issue May 12, 2021 · 2 comments
Open
Labels
[Block] Template Part Affects the Template Parts Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

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:

  1. Insert Template Part block
  2. Choose "New template part" in the placeholder
  3. Insert blocks
  4. Manually assign template part to the appropriate area in the "Advanced" panel of the Inspector
  5. Give the template part a name

This can be simplified down to:

  1. Insert New Header (or similarly named) block
  2. Input a name
  3. Insert blocks

In this case the area is assigned automatically upon insertion.

@jameskoster
Copy link
Contributor Author

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:

Screenshot 2021-05-18 at 11 21 38

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.

@talldan
Copy link
Contributor

talldan commented Jul 4, 2022

I'll start exploring this.

@talldan talldan removed their assignment Apr 5, 2023
@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants