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

Details View → Template Part #50392

Closed
1 of 6 tasks
Tracked by #33094 ...
mtias opened this issue May 5, 2023 · 16 comments
Closed
1 of 6 tasks
Tracked by #33094 ...

Details View → Template Part #50392

mtias opened this issue May 5, 2023 · 16 comments
Labels
[Block] Template Part Affects the Template Parts Block Needs Dev Ready for, and needs developer efforts [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented May 5, 2023

Template parts 2

Show relevant blocks if they are used on the template part.

"Added by" section to appear when the template part was added by a plugin or user.

Ellipsis menu (next to Edit button)

  • Delete
  • Rename (for custom template parts)
@mtias mtias mentioned this issue May 5, 2023
57 tasks
@gziolo gziolo added the [Block] Template Part Affects the Template Parts Block label May 6, 2023
@jasmussen jasmussen moved this to Needs design, or refresh in 6.3 Design May 8, 2023
@mtias mtias changed the title Details View: Template Part Details View → Template Part May 8, 2023
@SaxonF
Copy link
Contributor

SaxonF commented May 9, 2023

6.3-detail-templatepart.mp4

Much like other detail panels, the template part panel needs work. If we take the same philosophy as the pages panel we should take an info first approach to this. It’s also a great space to give more attention to blocks that are structurally important to your site. The most basic example is the navigation block.

  • Show created by date with author
  • If theme created, show theme name instead
  • If a template part contains any of the following blocks, they should be listed under template part details within an edit section. Site title, Site logo, Site Tagline, Navigation
  • Each of these block menu items should open the editor with the block selected and inspector open
  • In a details section we can initially show what area a template part belongs to. This ties into the broader library work so might not be ready for this particular issue.
  • Secondary actions include “Delete” and “Duplicate” which can be found in DropdownMenu triggered via ellipsis next to edit

Connections
What do people need to learn about a template part? Template parts are just another type of building block for your site, so we can probably look at other tools that have similar library concepts for inspiration. Figma for example gives you an overview of how a component is being used across the team. This is also relevant for websites, perhaps more so because they are viewable by the public. If I edit this template part, what other parts of my site will be affected? In future, we should providing connections between blocks.

@jameskoster
Copy link
Contributor

Here are some updated visuals based on Saxon's above, factoring in other designs that are coming into focus like meta actions.

First of all let's clarify the details that should appear based on the template part source.

Template parts 1
  • Theme-supplied template parts detail the assigned area
  • User-generated template parts detail the assigned area and the author
  • Plugin-supplied template parts detail the assigned area and the plugin that added it
  • All template parts include information about who last made changes, with access to revisions.
  • The area detail will be read-only to begin with.

It's common for headers and footers to contain blocks that display site data like the title, logo, and navigation menus. These can be included in the sidebar offering a quick way to edit without engaging the full screen editor:

Template parts 2
  • Site Title and Tagline can be edited via modal
  • Site logo can be edited on click. This is essentially the same pattern as the Site Logo block's Media control in the Inspector.
  • Navigation menus are listed with full edit-ability. When multiple menus are included they are stacked. This is to ensure visual context is always provided by the frame. This part is a bit intricate, so has a dedicated issue: Navigation on Browse Mode: Add navigation list view to the template part editor #50704

@jameskoster jameskoster added the Needs Design Feedback Needs general design feedback. label May 18, 2023
@jameskoster jameskoster moved this from Needs design, or refresh to Needs feedback in 6.3 Design May 18, 2023
@jasmussen
Copy link
Contributor

The spacing here seems a bit large:

Screenshot 2023-05-22 at 14 57 00

And the alignment here might benefit from columns:

Screenshot 2023-05-22 at 14 57 09

Other than that, this seems pretty solid to me.

@jameskoster
Copy link
Contributor

Couple of updates here:

Basic template parts

Template parts 1

Template parts containing navigation menus, and site settings

Template parts 2
  • Detail rows arranged over two equal columns with left-aligned values.
  • Various settings brought into the panel (e.g. Title / Tagline inputs). These can use the modals from before if current componentry cannot achieve the design above.
  • Updated colors.

There are on-going discussions in #50704 about how to handle multiple menus, so I left that out for now. When there's a single menu it seems fine to go ahead and display it.

@jasmussen
Copy link
Contributor

Nice. Color updates look good, spacing updates look good.

One last question, and it migth be useful to see the frame on the right in a mockup to be sure. One thing I like about the current setup, is that there's no separator between site hub and sidebar content:

Screenshot 2023-05-25 at 08 51 21

And the larger whitespace above the section title I quite appreciate as it gives emphasis and breathing room on the left. Has that been removed in these mockups? It may just be me, but I find that this spacing and the lack of the separator gave it a lot of character, and I'd hate to see that disappear. We can still reach the above if you need to scroll, through a sticky header, but the default state I'd keep the space.

I'd also keep the view site link hidden until hover. The current conversations around its behavior haven't been fully hashed out, and if we can't hide them, we'll need to find a different place for that link.

@jameskoster
Copy link
Contributor

View site link is being worked on in #50420 👍

The spacing is a part of the other metrics we need to figure out. Title sizes, margins, back button, etc. I'm starting to think it might be worth opening a dedicated issue about that, as we've gone back and forth a lot.

For this particular issue, how do we feel about the panel contents? Ready to update the OP and mark as ready for dev?

@annezazu
Copy link
Contributor

Where are we at with this, especially considering the work around consolidating patterns, including template parts, in the new library/pattern section? Seems like it's not clear if this is ready for dev. Doing a sweep as part of a phase 2 update and 6.3 core editor triage. cc @WordPress/gutenberg-design

@jameskoster
Copy link
Contributor

jameskoster commented Jun 29, 2023

@annezazu Navigation menus can be edited from the template part details panel now. Editing the Site title, tagline, and logo are missing, as are the revisions link. IMO these are all ready for dev.

Edit: I updated the OP to remove the Duplicate & Replace actions. They're worthy of extraction to dedicated issues.

@jameskoster jameskoster moved this from 🎨 Needs design to 💻 Needs development in Gutenberg Phase 2: Customization Jun 29, 2023
@jameskoster jameskoster moved this from Needs feedback to Needs dev in 6.3 Design Jun 29, 2023
@jameskoster jameskoster added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Jun 29, 2023
@mtias
Copy link
Member Author

mtias commented Jun 29, 2023

The other thing I wanted to include is the ability to swap / cycle patterns on a template part.

@jameskoster
Copy link
Contributor

Isn't that the "Replace" action? Or did you think it should be more prominent?

@jasmussen
Copy link
Contributor

I vaguely recall us talking about showing thumbnails for alternate header/footer patterns, even showing which one was active denoted as such.

@mtias
Copy link
Member Author

mtias commented Jun 29, 2023

Yeah, more prominent showing related patterns for specific areas. Something to explore later. Also highly related to #44582

@jameskoster
Copy link
Contributor

I'm not sure it's possible to mark an active one, as once a pattern is inserted it's disassociated with the source, unless it's synced. But yes it's an option to display patterns in the sidebar, it will make it very long accounting for all the other affordances though:

Header

I don't know if it needs to be so prominent, replacing the entire design of a header probably isn't something you do all that often? 🤔

@jasmussen
Copy link
Contributor

Can the thumbnails be in two colunns? Does that get too small?

@jameskoster
Copy link
Contributor

It will likely depend on the template part in question. Let's spin up a separate issue to explore.

@mtias
Copy link
Member Author

mtias commented Jun 24, 2024

I'm closing this as outdated with the work now of unifying details view and in-editor inspector.

@mtias mtias closed this as completed Jun 24, 2024
@github-project-automation github-project-automation bot moved this from 💻 Needs development to ✅ Done in Gutenberg Phase 2: Customization Jun 24, 2024
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 [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
Status: Needs dev
Status: Done
Development

No branches or pull requests

7 participants