-
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
Site Editor: Overwrite and Revert Templates #25872
Comments
I'd love to hear more thoughts on this, but my opinion is that neither of these actions should live in the sidebar, as they are not navigational in nature. I see four common/related use cases around these behaviours that we need to design for:
There are probably others that I'm missing :) Due to the overlap in these actions they should probably appear in close proximity in the UI. A simple popover menu feels like a good candidate as we may need to display these actions (and others in the future) in multiple locations – potentially outside of the Editor even. Two quick examples of that:
Circling back to the use cases above, here are some design options of how we might present these actions in the Editor: I'm editing content and want to create a new template for this piece of contentI want to create a new template based on an existing templateI want to revert a template back to the theme defaultI want to delete one of my custom templatesHopefully these design concepts illustrate their portability to other areas of site management, such as the template mosaic view, or category management screens that I alluded to above. |
I agree with this. 💯
I really like how template selection and creation is exposed through the content here. As a side note, given that only entities that can be navigated to via sidebar appear in the top title (templates, template parts), this could be viewed as one point in favor of also exposing content selection through the sidebar too. |
Yes, I meant the nav sidebar. 😄 |
Related: #26284 |
Closing this as there are more info in these two other issues: |
In #25739 we temporarily removed the "overwrite/revert" functionality from the new template navigation sidebar.
We want to put it back ASAP, but we need to figure out a clearer way to handle it.
cc @epiqueras @shaunandrews @jameskoster
Original Behavior
See:
The original
TemplateSwitcher
worked roughly like this:index
template with the "all posts" content.E.g.
index
, but it can be overwritten into a newcategory-foo
template.Once overwritten, it can be reverted to the default
index
template.singular
, but it can be overwritten into a newpage-bar
template.Once overwritten, it can be reverted to the default
singular
template.I've personally always found this behaviour hard to understand, but in the interest of retaining the same behavior in the new template sidebar, we should figure out where to put the "Overwrite Template" and "Revert to Parent" button.
For context, this is how the sidebar looks like right now:
Possible Options
Add the Overwrite button under the default template, and the Revert button under the specific template.
The Revert button might appear in a nested submenu.
Add both button under the default template, indicating that that template is the target of both actions.
Add both buttons in the "root" Templates menu, in a location unrelated to their target.
Add both buttons outside of the menu (still in the sidebar), and differentiate them from the menu (e.g. buttons with a different color). Maybe we could add context in the button label itself. E.g.
The text was updated successfully, but these errors were encountered: