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

Embed video into column - text overlap #12283

Closed
paaljoachim opened this issue Nov 25, 2018 · 15 comments · Fixed by #21570
Closed

Embed video into column - text overlap #12283

paaljoachim opened this issue Nov 25, 2018 · 15 comments · Fixed by #21570
Assignees
Labels
[Block] Columns Affects the Columns Block [Block] Video Affects the Video Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@paaljoachim
Copy link
Contributor

Describe the bug
Adding video into column. Text for the 2nd area of the column overlaps the video.

screen shot 2018-11-25 at 10 16 55

To Reproduce
Steps to reproduce the behavior:

  1. Add a column block. Select 2 cells/areas.
  2. Add a video into the left cell.
  3. Notice the text overlap.

Expected behavior
That the text would not overlap.

Desktop (please complete the following information):

  • OS: Mac OSX 10.13.6
  • Browser Chrome and Desktop Server
  • Gutenberg Version 4.5.1
@designsimply designsimply added Needs Testing Needs further testing to be confirmed. [Block] Columns Affects the Columns Block labels Nov 26, 2018
@designsimply
Copy link
Member

designsimply commented Nov 27, 2018

Tested and confirmed that adding a video embed such as YouTube doesn't fit into a 2 column block and explodes outside of the block container area. Tested with WordPress 4.9.8 and Gutenberg 4.5.1 using Firefox 63.0.3 on macOS 10.13.6. (screenshot)

Note: I also tested with WordPress 4.9.8 and Gutenberg c33e91785 (>4.5.1) and found the same result. (screenshot)

Aside: I noticed that the video does get constrained to the space but shows up with quite a lot of letterboxing.

screen shot 2018-11-26 at 7 37 08 pm 1

Tested with WordPress 4.9.8 and Gutenberg `c33e91785` (>4.5.1) and the Twenty Seventeen theme using Firefox 63.0.3 on macOS 10.13.6.

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Block] Video Affects the Video Block and removed Needs Testing Needs further testing to be confirmed. labels Nov 27, 2018
@iandunn
Copy link
Member

iandunn commented Jun 3, 2019

This also happens with Image & Gallery blocks:

Screen Shot 2019-06-03 at 4 08 57 PM

That's a 3-column block; the first two columns have Images and the 3rd has a Gallery.

Mentioned previously in #11159

@stmarytx
Copy link

I'm having the same problem. Seems like some CSS limiting the width of images and videos inside columns in the editor would go a long way toward improving the editing experience for the column block. On the front end they look fine.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Aug 19, 2019

I was about to create a new issue for this when I discovered that I had already earlier created one...
Some additional screenshots.

Screen Shot 2019-08-19 at 19 28 59

Frontend:
Screen Shot 2019-08-19 at 19 29 40


I need to correct the above. As the above is a theme I am using that will need to improve the CSS.

Additional screenshots from Twenty Nineteen using three columns.
Video embed in second column. Some words below.
Third column more words here.

Screen Shot 2019-08-23 at 23 24 19

Frontend looks good.
Screen Shot 2019-08-23 at 23 26 20

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Aug 19, 2019

Here is a suggestion on how to fix this.
In the right sidebar have a drop down that selects the size of the embed.

https://support.google.com/youtube/answer/6375112?co=GENIE.Platform%3DDesktop&hl=en
For the default 16:9 aspect ratio, encode at these resolutions:

2160p: 3840x2160.
1440p: 2560x1440.
1080p: 1920x1080.
720p: 1280x720.
480p: 854x480.
360p: 640x360.
240p: 426x240.

@draganescu @jorgefilipecosta @mapk @


Btw I added this code to the child theme functions file.
(This will though set the video embed to one size even though different alignments might be used.)

`
/* Bigger embed size https://cantonbecker.com/work/musings/2011/how-to-change-automatic-wordpress-youtube-embed-size-width/ */

add_filter( 'embed_defaults', 'bigger_embed_size' );
function bigger_embed_size()
{
return array( 'width' => 640, 'height' => 360 );
}
`

@mapk
Copy link
Contributor

mapk commented Aug 23, 2019

@draganescu let me know if this is a bug that can be resolved without design, or if you need some design help.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Mar 18, 2020

This is still a problem in Gutenberg 7.7.1.

Screen Shot 2020-03-18 at 11 28 43

Selecting column 2 where the video is located:
Screen Shot 2020-03-18 at 11 32 40

Video embed overlaps column boundaries on the backend.

@paaljoachim
Copy link
Contributor Author

Is this something that Andrei @draganescu and/or Andrew @aduth could take a closer look at?
Is there a way to block content from bleeding out of the column they are placed into?

@draganescu
Copy link
Contributor

@mapk what is a good default here? clip the content in a column or attempt to resize the width?

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Mar 20, 2020

Hey Andrei.

Here is an example of hiding the left and right sidebars. I am resizing the window. It would be natural to resize the video/image/etc in relation to the space of the column it is placed into.

Resize-columns-containing-video

@jasmussen
Copy link
Contributor

The problem is the following CSS:

.wp-block-embed {
    min-width: 360px;
}

That needs a lower min-width, and it should fix this issue. CC: @draganescu

@draganescu draganescu self-assigned this Mar 30, 2020
@mapk
Copy link
Contributor

mapk commented Apr 14, 2020

Thanks for pinpointing the problem, @jasmussen!

@jasmussen
Copy link
Contributor

By the way, I'm almost completely certain that we added this min-width CSS to embed blocks because a number of them aren't responsive. For example, embed an Amazon book and it won't work below something around that number.

However, such min-widths should arguably be applied on a per-embed basis, rather than in a blanket way like this, so this is something we should let individual tickets be created for, and proceed with removing that min-width as noted!

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 14, 2020
@draganescu
Copy link
Contributor

I added a small PR that appear to fix this but not sure if something else breaks instead. @jasmussen

@paaljoachim
Copy link
Contributor Author

We will find out Andrei! Thanks for fixing it..:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Block] Video Affects the Video Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants