-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Do not make WordPress embeds responsive #10985
Do not make WordPress embeds responsive #10985
Conversation
Great PR, I'd approve it for fixing this issue. I'm not code strong enough to suggest this is the right or wrong approach, but it seems like a blacklist — is that the right approach? I guess it would have to be right? Should we be whitelisting embeds that should be responsive instead? Thinking also in terms of #10440 |
This seems to be the only one in core that has the issue that I can find. I would say that we fix it this way for now so that the 4.2 release isn't weird for WP embeds, and look at a longer term solution in a follow up that we start as soon as we're done with this. |
Actually, let's make this opt-out. This is too WordPress specific, and we can make it opt-out pretty easily. |
Ok, this is opt-out now. The default embed block, used for embeds we don't know the details of, is not responsive, and the WordPress block is not responsive. It's a single line of code to opt a block out, should we find others with trouble, but we've done an extensive embed audit recently and WordPress was the only one I saw with this problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code/approach seems fine but won't this change a lot of user's content going forward?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense to me.
Description
WordPress embeds are delivered in a fixed aspect ratio iframe, but the scripts that run to embed posts also manage the dimensions, so applying our responsive classes make it have weird spacing in the editor.
This change stops us applying responsive classes to embeds from WordPress.
How has this been tested?
Embed https://wordpress.org/news/2018/10/the-month-in-wordpress-september-2018/
Before this patch, there's a big space at the bottom of the block. After it, the spacing is fine.
Types of changes
Bug fix