Description
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
.
gutenberg/packages/block-library/src/paragraph/index.js
Lines 33 to 35 in 8b5bc0e
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:
- Image (core/image) Image Block: Make block name affect list view #57955
- More (core/more) More Block: Make block name affect list view #58160
- Submenu (core/navigation-submenu): This block displays the text entered in the label field in a list view. If any text is entered in the rename UI, like the heading block, it should overwrite the text in the list view. Navigation Submenu Block: Make block name affect list view #58296
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.
Activity