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

Duplicating templates and patterns in the site editor #52107

Open
1 of 3 tasks
jameskoster opened this issue Jun 29, 2023 · 5 comments
Open
1 of 3 tasks

Duplicating templates and patterns in the site editor #52107

jameskoster opened this issue Jun 29, 2023 · 5 comments
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jun 29, 2023

Screenshot 2023-06-29 at 10 33 22

Extracted from #50392.

Sometimes the quickest way to get started with a new template or pattern design is to duplicate an existing one, and customise from there. Currently this is a manual process that involves opening the target entry, copying all blocks, then pasting them into the new one. This flow can be streamlined.

Patterns and $custom templates are relatively simple to envision, but other templates will need some design exploration to get right as the template hierarchy will need be considered and communicated during the flow.

Phase 1

Phase 2

  • Duplicate all templates
@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jun 29, 2023
@jameskoster
Copy link
Contributor Author

For patterns and $custom templates, I think the main question in terms of design is whether the user is asked to name the template on duplication, or whether the system handles that for them, IE creates something like "Template with sidebar (copy)", which can be renamed later.

@aaronrobertshaw
Copy link
Contributor

@jameskoster I have a proof of concept up in #52270

I was working through a separate issue before connecting the dots here. The PR for the moment works via prompting the user to supply a name etc when duplicating a pattern or template part. It reuses the create pattern and create template part modals.

That PR also supports the following:

  • renaming and deleting any custom patterns or custom template parts
  • duplicating all patterns and template parts (custom or otherwise)

@jameskoster
Copy link
Contributor Author

@aaronrobertshaw Nice, I'll check it out.

I don't think that will fully close this issue though, as we'll still need to handle templates. Obviously it's fine to do that separately, I'm just noting incase you wanted to remove the fixes keyword in the pr.

@aaronrobertshaw
Copy link
Contributor

I'm just noting incase you wanted to remove the fixes keyword in the pr.

Good catch, thank you, I'll remove the fixes keyword.

@annezazu
Copy link
Contributor

As it relates to duplicating, I wanted to note this issue for consideration as improving the duplication flow might resolve some current user pain points: #53320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Todo
Development

No branches or pull requests

3 participants