Skip to content

Renaming UI doesn't work for some blocks #57954

@t-hamano

Description

@t-hamano

What problem does this address?

Renaming UI is now available for almost all blocks. However, in some blocks where __experimentalLabel is opted in, I found that the label entered in this UI is not reflected in the list view.

For example, a paragraph block returns a custom label if the context is list-view.

if ( context === 'list-view' && customName ) {
return customName;
}

On the other hand, in the Image block, there is no process to return a custom label in the case of list-view context.

What is your proposed solution?

We need to resolve this issue in blocks that have opted in to __experimentalLabel and where supports.renaming is not false in block.json.

As far as I've researched, the problem needs to be resolved in the following blocks:

On the other hand, we shouldn't need to do anything with the following blocks.

  • ✅ Heading (core/heading): Works correctly
  • ✅ Paragraph (core/paragraph): Works correctly
  • ⚠️ Page List Item (core/page-list-item): This is the child block when you insert the Page List block. It will be displayed in the list view, but when you click on the block, a modal will be displayed to convert it to a link. Since the block sidebar cannot be operated, there is virtually no need to fix it.
  • ⚠️ Unsupported (core/missing): If a block is broken, nothing will be displayed in the block sidebar. Therefore, there is virtually no need to fix it.

Metadata

Metadata

Assignees

Labels

[Block] ImageAffects the Image Block[Block] MoreAffects the More Block - used for displaying the 'Read More' link[Block] SubmenuAffects the Submenu Block - for submenus in navigation[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions