-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Template Parts: Update replace flow to separate template parts from patterns #60203
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -80 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
Nice, this makes sense to me 👍 I still have a question about whether global entities should be directly editable this way. For instance I think there's a chance that in this flow a user could be misled into believing their changes would only affect the document they're editing. As a follow-up it might be nice to try the recently-merged edit flow for template parts while editing pages (#59970), in the edit template context. This one: tp.mp4Note how you can only select a pattern after clicking 'Edit'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM code wise. I also agree with the change, while not perfect it's a move in the right direction. Maybe. Although ... using the inspector feels way more local than clicking on replace and then picking from a modal.
Can we show the inspector replace options from patterns only in focus mode?
PS that's what Jay asks for above actually.
My concern is that people will miss them |
If we copy the template part editing flow from pages (now partially implemented via #60010), then the Inspector would only show the replace options when you're editing the template part source. IE after you clicked "Edit" in the toolbar (see the video above). I think it would be neat to try that next as it would improve the replace experience and bring consistency. |
This seems like a solid step forward. Very nice. I agree with @jameskoster about trying the "Edit" treatment on template parts next on templates, as it is on pages. Worth a try. cc @noisysocks. |
Can we please link to the Issues that we're trying to address? One Pull Request was opened, explored, then closed, and did not reference an Issue. Then, this Pull Request was opened instead and does not reference an Issue, and it is already hard enough to trace all these changes. 😢 Were we trying to address parts of this perhaps? #59970 |
What?
In #59883 I explored an update to the replacement flow for template parts. This is a different proposal which separates template part replacement from a pattern update.
Why?
Since template part replacement and selecting a new pattern are different actions and should work differently, I think we should separate the actions to make it clear that they are different things.
How?
Testing Instructions
Screenshots or screencast
pattern.mov