Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo Media & Text Block to use nesting. #23356

Closed
paaljoachim opened this issue Jun 22, 2020 · 4 comments
Closed

Redo Media & Text Block to use nesting. #23356

paaljoachim opened this issue Jun 22, 2020 · 4 comments
Labels
[Block] Media & Text Affects the Media & Text Block [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Decision Needs a decision to be actionable or relevant

Comments

@paaljoachim
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We should redo the Media & Text Block so it becomes a parent Block consisting of an Image Block and a Group Block.

Consistency. Handling of images should be the same in the Image Block, Gallery and the Media & Text Block.

The Image Block

Screen Shot 2020-06-22 at 13 47 23

Can add captions.
Has Styles
Alt Text
Image Size
Image dimensions

The Media & Text Block

Screen Shot 2020-06-22 at 13 47 42

Describe the solution you'd like
I would like to see the Media & Text Block become a parent block with a nested Image Block and a Group Block. Nested/Child Blocks have their own options in the sidebar. Clicking the parent Block shows the parent Block sidebar settings.

Advantage:
Creating a more flexible user experience.
Child Block have their own sidebar options.
Parent Block has its own sidebar settings.
Consistency between various blocks that use images.

Describe alternatives you've considered
To wait for additional options to be added to the Media & Text Block.

Associated Media & Text Block issues:
"Preserve caption when converting Image Block to Media & Text Block "
#22478
"Allow image styles on the 'Media & Text' block"
#20896
"Make editing image related blocks more consistent"
#18529
"Media & Text block: media dimensions"
#16853
"Image caption in Media & Text block"
#14604
"Media & Text: Insert from URL"
#14397

@paaljoachim paaljoachim added [Block] Media & Text Affects the Media & Text Block [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Design Needs design efforts. labels Jun 22, 2020
@youknowriad
Copy link
Contributor

We can only use a single InnerBlocks inside a parent block, and the Media&Text block already uses nested blocks for the content (not the image). So in order to do this, we'd have to introduce an intermediary internal block. It means we'd have to figure out how to transform from the existing blocks to this one...

For me this is too complex and not worth the effort.

@paaljoachim
Copy link
Contributor Author

My thinking is that if we are able to break down a Block into smaller pieces it would be good to do so.
Creating a parent - child relationship which is reflected in the options the parent and child offers. These should use existing Block methods.

From how I understand this:
Media & Text Block

  • Image (does not use image block options)
  • InnerBlocks for Text.

As the Block already uses innerBlocks for Text it is at present time difficult to also add the Image as an innerBlock based on the Image Block.

It seems at present time Gutenberg is not ready to handle such a use case. Let's leave the issue open for now to gain additional feedback.

@mapk
Copy link
Contributor

mapk commented Jul 20, 2020

I'm in agreement with @youknowriad here. The great thing about the Media+Text block is that it's more of a pattern than a block and provides users with a quick layout. If I wanted to recreate it, I could with the Columns block (bottom) as shown below. So while the Media+Text block isn't using a nested block for the image, I believe it's still valuable unless we want to remove the Core block in favor of a Media+Text pattern using Columns.

Screen Shot 2020-07-20 at 12 38 58 PM

@mapk mapk added Needs Decision Needs a decision to be actionable or relevant and removed Needs Design Needs design efforts. labels Jul 20, 2020
@paaljoachim
Copy link
Contributor Author

I see the point of the Media & Text could actually just be two columns with content. Similar to a pattern.
I will go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Decision Needs a decision to be actionable or relevant
Projects
None yet
Development

No branches or pull requests

3 participants