Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mamaduka
left a comment
There was a problem hiding this comment.
While I like the attempts, this makes labels less predictable. A user will still see the Type / ... label before selecting a block, and then it will change to something else.
I don't think this is a better behavior.
| const { getBlockRootClientId, getInserterItems } = | ||
| select( blockEditorStore ); | ||
| const rootClientId = getBlockRootClientId( clientId ); | ||
| const items = getInserterItems( rootClientId ); |
There was a problem hiding this comment.
This is an expensive selector. Blocks shouldn't call it.
The hook runs for empty blocks as well as selected ones, so this should not occur. However, on initial page render, the placeholder changes... cd6cf2165b0f1dbb7182e75837259b69.mp4 |
|
Size Change: +162 B (0%) Total Size: 7.74 MB
ℹ️ View Unchanged
|
|
Oh, sorry missed that condition. Still feels "ricky" and we're introducing a lot of complexity just to change strings. I don't have any bright ideas at the moment, but there should be a better way. |
|
Closing this in favor of #77052. |
What?
Alternatives to #76988
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools