Gutenberg: Embed blocks have all the same description text

Created on 10 Apr 2018  路  7Comments  路  Source: WordPress/gutenberg

Every embed has the following text:

embedsneeddescriptions

Ideally it should say what the block is.

Good First Issue [Feature] Blocks [Type] Copy [Type] Enhancement

Most helpful comment

By the way. Do we really need to maintain all those embed blocks? 馃槂

Well, we already do, and this is part of the point of having these embed aliases blocks in the first place. To recap:

  • there is a single embed block that takes all the embeds
  • there are multiple aliases, one alias for each WordPress upstream registered oembed handler

The 2nd part is key, because WordPress already maintains a whitelist of oembed handlers in the code. These are "paste and hope" in the current editor, in that you can't know which embeds are oembed supported until you try. By making explicit aliases for each already registered oembed, we surface them as officially WordPress supported embeds, that show up in search results in the inserter, and even visually if you're just exploring.

So yes, we do support them, and since we do, I can understand why it would make sense to have better descriptions for each. Though in order to not have to write oceans of prose that might have to change at the whim of the the embed service in question (like when Instagram changes their logo), perhaps we can look at some more computational descriptions. such as "This embed block embeds content from [embed block alias name]". I would hate to have to get creative with a description for the "funny or die" block.

Whether or not WordPress should officially support these blocks is a different matter. I wasn't personally part of the conversation when Oembed was implemented. But I do strongly feel that so long as a oembed whitelist handle exists, a block should exist for it. In other words, if we wanted to remove embed aliases in favor of just the generic one, I feel it would only be fair if that discussion included removing the entry from the oembed whitelist, so we no longer officially support that embed.

All 7 comments

By the way. Do we really need to maintain all those embed blocks? 馃槂
Can you link me to the issue where it was discussed to have its own block per service? Speaking myself, it seems similar to having its own version of Code block per language (PHP, CSS, HTML, etc.). It could also work as a single block which has combo box to select this type or even better with having this type autodetected based on url patterns.

@gziolo I'm not sure about that issue and I am totally not against having less embed blocks. I think though whatever ones we have we need to have better descriptions.

Including @mtias @jasmussen in the discussion. Have we considered having only one Embed block which can be discovered in the inserter using all keywords we use at the moment and add a UI element which reflects embed鈥檚 type instead? To give an example, when I search for Twitter I find Embed block, we pass this keyword back to the block and it can use it to preselect Twitter as the type of embed. It would work in a similar way. We would have only one block in the inserter, we could reuse embeds tab to show the featured category (there are some requests to do it anyway), everything else should work basically the same.

I think we have this limitation to have 3 keywords per block type, but we can always relax it for core blocks 馃槑

By the way. Do we really need to maintain all those embed blocks? 馃槂

Well, we already do, and this is part of the point of having these embed aliases blocks in the first place. To recap:

  • there is a single embed block that takes all the embeds
  • there are multiple aliases, one alias for each WordPress upstream registered oembed handler

The 2nd part is key, because WordPress already maintains a whitelist of oembed handlers in the code. These are "paste and hope" in the current editor, in that you can't know which embeds are oembed supported until you try. By making explicit aliases for each already registered oembed, we surface them as officially WordPress supported embeds, that show up in search results in the inserter, and even visually if you're just exploring.

So yes, we do support them, and since we do, I can understand why it would make sense to have better descriptions for each. Though in order to not have to write oceans of prose that might have to change at the whim of the the embed service in question (like when Instagram changes their logo), perhaps we can look at some more computational descriptions. such as "This embed block embeds content from [embed block alias name]". I would hate to have to get creative with a description for the "funny or die" block.

Whether or not WordPress should officially support these blocks is a different matter. I wasn't personally part of the conversation when Oembed was implemented. But I do strongly feel that so long as a oembed whitelist handle exists, a block should exist for it. In other words, if we wanted to remove embed aliases in favor of just the generic one, I feel it would only be fair if that discussion included removing the entry from the oembed whitelist, so we no longer officially support that embed.

Though in order to not have to write oceans of prose that might have to change at the whim of the the embed service in question (like when Instagram changes their logo), perhaps we can look at some more computational descriptions. such as "This embed block embeds content from [embed block alias name]". I would hate to have to get creative with a description for the "funny or die" block.

I like that as a way forward.

The 2nd part is key, because WordPress already maintains a whitelist of oembed handlers in the code. These are "paste and hope" in the current editor, in that you can't know which embeds are oembed supported until you try. By making explicit aliases for each already registered oembed, we surface them as officially WordPress supported embeds, that show up in search results in the inserter, and even visually if you're just exploring.

@jasmussen, it makes a lot of sense when you put it this way. Thanks for a very detailed answer. I like your proposal, it should be Good First Issue 馃憤

@jasmussen
"This embed block embeds content from [embed block alias name]"
This looks perfect :100:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

afercia picture afercia  路  73Comments

maddisondesigns picture maddisondesigns  路  79Comments

jasmussen picture jasmussen  路  74Comments

tofumatt picture tofumatt  路  86Comments

ahmadawais picture ahmadawais  路  271Comments