WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.47k stars 4.18k forks source link

Rename blocks: surface new name in more places in the UI #56523

Open annezazu opened 11 months ago

annezazu commented 11 months ago

Right now, when you rename a block, the rename is only visible in List View and under advanced in the block settings. Since renaming is such an intentional action for better organization and clarity, the question remains of whether to show the name in more places in the UI. For now, these two places come to mind:

@WordPress/gutenberg-design curious to hear what you think and the best way to strike the proper balance.

jasmussen commented 11 months ago

Feels entirely valid. I think the only question is whether the block description will feel disconnected if renamed. Shown here the inspector says "Group", and then a description, "Gather blocks in a container".

screenshot showing the site editor with list view and inspector open, and a group selected

If renamed to "Content", like it is in the list view, it would say "Content", followed by "Gather blocks in a container".

I don't think this is an issue, and we should try the change as-is. If we do find this to be problematic, the description could be augmented when a block is renamed.

carolinan commented 11 months ago

Can the description be updated to include the original name? Because if the name is replaced everywhere I am still concerned that it might me difficult for some users, for example to know what block type they have selected.

Remember that not only users, but themes and plugins can rename blocks in the markup of patterns and templates.

richtabor commented 10 months ago

Breadcrumbs sure, but not the block card/inspector.

Renaming blocks is particularly useful for finding and navigating among many blocks, as seen in list view and the breadcrumbs. The block card/inspector is not where you're finding one block among others—you've already selected the block.

annezazu commented 10 months ago

Sounds like an initial first step is to just update the breadcrumbs based on this discussion!

jameskoster commented 10 months ago

Down the road it might be interesting to surface both the custom and the technical name in the Inspector.

landwire commented 5 months ago

Would be great to still see the block type after renaming somewhere. This could be a little label on the top right above the name of the block in the list view or something along those lines. It just gives a little more info for the user.

Examples: Latest News - core/query Join our club now - core/cover

richtabor commented 5 months ago

I'm not sure. Maybe, but for many cases it may be too much information. Like for paragraphs or headings, or for synced patterns with overrides.

In the meantime, you can name it with the block name manually.