thoughtis / cata-blocks

Block Editor components for use with the Cata theme.
GNU General Public License v3.0
1 stars 0 forks source link

Add "Reel" block from Thought Catalog #146

Closed jessica-townsend closed 4 months ago

jessica-townsend commented 4 months ago

Background

Thought Catalog has a Reel block that's part of the Ought Blocks plugin. That plugin is only used on Thought Catalog. Now, we'd like to use the Reel block on other sites. We should copy it and any related styles to the Cata Blocks plugin.

Resources

jessica-townsend commented 4 months ago

I was thinking it would be great if the reel block could have a flex layout in block.json. This would eliminate the inner container element on the block, and then we could use the default alignment and width properties to size inner blocks to eliminate the need for a second Reel Clip block.

One issue I've run into is the "allowJustification" support setting. It seems like setting this to false should hide the "Justification" options in the editor, but I haven't been able to get it to work: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowjustification

We can disable all settings with "allowEditing", but it would be nice to still have the vertical alignment settings.