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: Contextual template part icon and name #27876

Closed
jameskoster opened this issue Dec 23, 2020 · 4 comments
Closed

Site Editing: Contextual template part icon and name #27876

jameskoster opened this issue Dec 23, 2020 · 4 comments
Assignees
Labels
[Block] Template Part Affects the Template Parts Block Needs Dev Ready for, and needs developer efforts

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Dec 23, 2020

With #27378 merged, we should update any component that displays the template part name + icon.

Icons

  • For genetic template parts use the layout icon.
  • For Header template parts, use the templatePartHeader icon
  • For Footer template parts, use the templatePartFooter icon
  • For Sidebar template parts, use the templatePartSidebar icon

Name

If the selected template part has a name, we should display that instead of the generic "Template Part" label. So if I select the "Header" template part, I should see "Header" as the block name in the Inspector, along with the appropriate icon and colorisation.

Off the top of my head, the only other location we'll need to update this is the block navigator. If the inserter / quick inserter exposes specific template parts we'll need to update that as well.

Examples:

Screenshot 2020-12-23 at 13 56 17

@david-szabo97
Copy link
Member

How are we distinguishing between generic template parts and header/footer/sidebar? Should we just check for template part name? Something like "if template part name contains 'header" then use "template part header" icon.

@jameskoster
Copy link
Contributor Author

Good question, I suppose #27337 is a blocker to this being fully implemented.

@vindl
Copy link
Member

vindl commented Jan 16, 2021

Should we just check for template part name? Something like "if template part name contains 'header" then use "template part header" icon.

We should define canonical template parts types that core supports. It will then be possible to assign these types to template parts and customize some parts of the experience accordingly (e.g. filtering patterns, showing contextual icons etc.).

I suppose #27337 is a blocker to this being fully implemented.

Yes.

@mtias
Copy link
Member

mtias commented Mar 2, 2021

It seems this is wrapped now. We'll have a separate issue to explore the colors.

@mtias mtias 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 Needs Dev Ready for, and needs developer efforts
Projects
None yet
Development

No branches or pull requests

4 participants