Gutenberg: Relocate template name setting into the main toolbar

Created on 10 Jul 2020  Â·  11Comments  Â·  Source: WordPress/gutenberg

The name for a template part should be included in the toolbar itself:

image

Needs Design Feedback [Feature] Full Site Editing

Most helpful comment

My thoughts here are twofold:

  1. Renaming a template part doesn't feel like an action that will occur with enough regularity to warrant exposure in the "top level" of the toolbar
  2. There are several actions a user can take with regards to template part attributes - of which renaming is just one. I felt that it made sense to group those actions together

The second point feels particularly important to me. That said, where this menu appears isn't clear right now. It might be accessed via the block toolbar, but if we go ahead with #25085 then it might be accessed by clicking the template part name in the top bar instead. It may even be that the sidebar is the appropriate location for these items.

There is a discussion to be had around whether these actions should appear in multiple places, and if they do, should they be presented identically?

It's hard to know what happens when you click "rename template part" without answering those questions first. Indeed the question itself might be moot – if we go the top bar route then the name input might be revealed in the menu, as suggested here.

All 11 comments

@mtias Do you mean the block toolbar like this

image

Or the top toolbar like this:

image

I have been exploring the naming integration with the block toolbar as the reusable block UI feels pretty clunky. Something like this perhaps:

2020-07-27 10 16 47

I like that, @MichaelArestad! What happens if I click to add a block without adding a name? Do I just see the "Untitled template part" in the toolbar? Or am I not allowed to add a block until I create the name?

Do I just see the "Untitled template part" in the toolbar?

@mapk Exactly. You would just see something like "Untitled template part".

How do we think this relates to #22064 and vice-versa? We have some designs with a div saying "changes apply everywhere the block is used", which seem like it could fit well with some of these looks

Screen Shot 2020-08-07 at 4 17 13 PM

super simple implementation for renaming existing template parts. (doesn't show up until the template part has been created or chosen)

@noahshrader Thanks for mocking that up. That's definitely a step in the right direction. I believe there is work being done on the link UI that uses a very similar type of form that we could perhaps use that could get us pretty close to what is in the mockup above.

As for @22064, it sounds like starting with a border and potentially snackbar will be a good starting point there which doesn't conflict with this design change.

Thanks for the feedback! Do you think we should block #24450 for that change, or can we go ahead and merge this less polished version of the title-in-toolbar as an interim step?

@noahtallen Definitely don't block it. Let's just follow up with the polished version when we can.

Looking at the designs in this comment: https://github.com/WordPress/gutenberg/pull/24990#issuecomment-685463421, is that the interaction we want with respect to renaming template parts? clicking "rename template part" in that screenshot would then do that sliding animation thing?

@noahtallen I'm not sure just yet. @jameskoster did you want to chime in here?

My thoughts here are twofold:

  1. Renaming a template part doesn't feel like an action that will occur with enough regularity to warrant exposure in the "top level" of the toolbar
  2. There are several actions a user can take with regards to template part attributes - of which renaming is just one. I felt that it made sense to group those actions together

The second point feels particularly important to me. That said, where this menu appears isn't clear right now. It might be accessed via the block toolbar, but if we go ahead with #25085 then it might be accessed by clicking the template part name in the top bar instead. It may even be that the sidebar is the appropriate location for these items.

There is a discussion to be had around whether these actions should appear in multiple places, and if they do, should they be presented identically?

It's hard to know what happens when you click "rename template part" without answering those questions first. Indeed the question itself might be moot – if we go the top bar route then the name input might be revealed in the menu, as suggested here.

Was this page helpful?
0 / 5 - 0 ratings