-
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 Editing: Display contextual description, name and category switching for selected template part #27875
Comments
This makes sense to me and should be implementable after #28410 lands. Q: Should there be generic descriptions for the base categories (header, footer, sidebar)? Or maybe something like that would make sense to use in place of excerpt if excerpt happens to be blank? 🤔 |
That makes sense! Another side thought - with the prominence of the excerpt here a later follow up would probably be to allow themes to supply a default excerpt for their template parts? 🤔 |
Yes good point, I think themes should be able to supply descriptions for template parts and custom templates. |
Yeah I actually mocked that up at some point in the past 😄 Shall we address that in a separate issue? For now it is still possible to rename a template part via Appearance > Template Parts. |
Now that we also have the name in the sidebar, how should we present the panels? It seems we might not need the "category" panel and could be combined. |
Relaying from #29159 (comment) - the suggestion to put the category, tag, and renaming all under "Advanced" may make sense. 👍 It looks like that PR should resolve this issue, so adding @david-szabo97 as the assignee here. |
This has been completed in #29159. |
When I select the Header template part in the Site Editor, here's what I see in the Inspector:
Contextual names
If the selected template part has a name, we should display that and inline the "template part" label as a suffix only. So if I select the "Header" template part, I should see "Header (template part)" as the block name in the Inspector, along with the appropriate icon and colorisation.Dedicated issue for this here: #27876
Add description
I think it would be helpful to include a brief description that outlines the general template part concept.
We might consider placing this inside an informational
Notice
.If the template part has its own description (excerpt) that should appear here as well.
Template part category
Once it is possible to determine the template part category (#27337) we should display that here too, and include an option to switch the category.
Putting it all together
Circling back to the original screenshot, when I select the Header template part I should now see something like this:
I'm sure we can optimise the labels / descriptions so I would welcome any suggestions there. Otherwise I think this could serve as an adequate starting point.
The text was updated successfully, but these errors were encountered: