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

Site Editing: Display contextual description, name and category switching for selected template part #27875

Closed
jameskoster opened this issue Dec 23, 2020 · 9 comments
Assignees
Labels
[Block] Template Part Affects the Template Parts Block

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Dec 23, 2020

When I select the Header template part in the Site Editor, here's what I see in the Inspector:

Screenshot 2020-12-23 at 11 37 03

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.

Template parts can be inserted in to multiple documents and will always display the same configuration of blocks.

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:

Screenshot 2020-12-23 at 13 49 47

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.

@jameskoster jameskoster changed the title Site Editing: Update template part card in the Inspector, and add category selector Site Editing: Display contextual description, name and category switching for selected template part Dec 23, 2020
@Addison-Stavlo
Copy link
Contributor

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? 🤔

@jameskoster
Copy link
Contributor Author

I suppose that would be most useful when you're actually selecting a category? Maybe something like...

Screenshot 2021-02-03 at 10 51 47

(But with actual descriptions, obviously :D)

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Feb 3, 2021

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? 🤔

@jameskoster
Copy link
Contributor Author

Yes good point, I think themes should be able to supply descriptions for template parts and custom templates.

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Feb 5, 2021

With the upcoming removal of the renaming input from the toolbar and the suggestion to have it in the block inspector, I am wondering what that might look like here. Do you have any thoughts on that?

Perhaps the title we have in the block inspector (where you have "Header Inline" in your designs), it could be a renaming input similar to the search input in the nav panel:
renaming toolbar
(but with an edit icon instead of a search icon).

Otherwise we could put it further down in the block navigator, but I think incorporating it with that top title in the inspector might be a good place.

@jameskoster
Copy link
Contributor Author

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.

@mtias
Copy link
Member

mtias commented Feb 22, 2021

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.

@Addison-Stavlo
Copy link
Contributor

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.

@vindl
Copy link
Member

vindl commented Mar 2, 2021

This has been completed in #29159.

@vindl vindl closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block
Projects
None yet
Development

No branches or pull requests

5 participants