-
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: Template Part organisation in the sidebar menu #29150
Comments
Here's my attempt to improve the organization of the sidebar menu. Following @jameskoster's suggestion, I decided to avoid using the term "template parts" (recently renamed to "areas"). I think that this is more of an internal concept that general users won't really need to know. That decision comes with a side effect: if everything is a template, and since the current hierarchy of templates is pretty flat (at least in my current understanding derived from reading the WordPress template hierarchy), we'll end up showing a long list of items. That said, here's a first idea for the template navigation: Since areas are organized by category and are also smaller template units, I decided to place them on top of the list. I used icons to highlight that they are somehow different from the other type of templates. This also creates a clear distinction that could be useful when scanning the list. My only concern with this solution is the extra click that users will need to do every time they want to modify a template. I also explored an alternative version that places the areas and main templates on the top-level… but this idea could be potentially confusing because it implies that "Headers" and "Footers" are not templates. Shortening the descriptionsWhile I was working on this ticket, I attempted to make the list of templates more compact by reducing the amount of text that is presented. First, I started by shortening the descriptions by removing the redundant text (eg: instead of saying "Post. Template used to display a single post type" we could just say "Post. Displays a single post type"). A couple of iterations on this could be:
Here's a short video of how this could play out: Template.part.navigation.movAnd here's a Figma file with some of my explorations and the prototype. |
I think the first idea works quite well. I like the icons :) Something about the "Other" label feels at-odds hierarchically with the rest of the templates though. It suggests to me that if the template is not a header, footer, or sidebar, it will be grouped there. While that is true for template parts, it's not true for the top level templates. Perhaps the top level templates being visible immediately below negates that issue though. What do you think? It may be too radical, but the following just popped in to my head:
The "Layouts" panel would contain the post, page, index, 404, archive, etc templates. Perhaps this is too radical :)
That won't be the case once we merge #26964 so that the nav opens to the contextually relevant panel. I appreciate the effort to reduce the footprint of the descriptions, and agree we need to do something there. But since improving the general organisation might take a few iterations I would suggest that we consider unpacking that in a separate issue. What do you think? |
Yes, having the "Other" option before the list of templates feels a bit odd. I think it could work in practice because of the use of the icons and the separation from the list of top-level templates… but it's not very elegant.
Is it too radical though? I like it, it's consistent for example with the language used to explain Gutenberg:
Also, if we rename the "General templates" and "Unused templates" labels to "General layouts" and "Unused layouts", it will probably remove possible confusions with the "Other" label on the main list (which is still a bit too generic for my taste). I think this solution is more simple, easier to implement, and could work better than the one I proposed. Here's how it would look:
True! I should have mentioned that in my comment.
Absolutely, I'll create a new issue for that. |
Yeah I think this works quite well. It creates a more intuitive distinction between the template types without having to rely on the confusing template/template part naming convention. We could potentially bring the icons back for the top level as well. I wonder how that would look? I'd be interested to hear @kjellr's thoughts on this from the theme perspective. |
Closing for now. |
Template parts are currently organised like so in the sidebar menu:
I think it is worth considering whether we need the (potentially confusing) "template part" section. Once the
area
taxonomy lands for template parts (#28410), we could potentially organise this menu like so:Or even include Headers, Footers, and other template parts alongside existing top-level templates:
Templates
The text was updated successfully, but these errors were encountered: