WordPress / gutenberg

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

[Block Bindings] Human readable label for Meta fields #65066

Closed dannyreaktiv closed 1 month ago

dannyreaktiv commented 2 months ago

What problem does this address?

Block bindings are a very powerful tool, and the UI is good, but the experience of assigning a meta field means the user sees the meta key.

Screenshot 2024-09-03 at 7 53 22 AM

What is your proposed solution?

I propose adding a label/title/name to the $args array in register_meta() that would then be exposed in the Block Bindings and available for use elsewhere in WordPress.

SantosGuillamot commented 2 months ago

Personally, I think that would totally make sense, not only for block bindings but potentially for other use cases as well. I'll try to get something working if I find time to see what it could look like.

SantosGuillamot commented 2 months ago

I've started exploring this in this core pull request that I hope can help with the discussion. I'll try to get the respective one in Gutenberg.

SantosGuillamot commented 2 months ago

I've started another PR in Gutenberg to see how it could look like and the necessary changes: https://github.com/WordPress/gutenberg/pull/65099

dannyreaktiv commented 2 months ago

Wow. Thank you!