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

Can't preview video embeds in the editor #26104

Closed
draganescu opened this issue Oct 14, 2020 · 4 comments · Fixed by #26263
Closed

Can't preview video embeds in the editor #26104

draganescu opened this issue Oct 14, 2020 · 4 comments · Fixed by #26263
Assignees
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@draganescu
Copy link
Contributor

In the new widgets editor one cannot add embed blocks and then preview them.

Steps to reproduce:

1 have the Gutenberg plugin installed
2 go to the new widgets editor
3 add an YouTube block
4 paste an YouTube URL
5 preview the embed using the preview button in the block's toolbar
6 notice bug: nothings shows up except a caption placeholder
7 notice bug: the embed does not render on the front end either, for YouTube all I got was the link.

@draganescu draganescu added [Type] Bug An existing feature does not function as intended [Feature] Widgets Screen The block-based screen that replaced widgets.php. labels Oct 14, 2020
@helen
Copy link
Member

helen commented Oct 16, 2020

I tried doing this with a Twitter URL, the embed is retrieved and displays correctly in the editor (takes a moment for the JS and styling to apply to the plain blackquote), but then only displays the URL on the front-end. When I tried it with a YouTube URL the embed does get retrieved as seen in network requests, but it doesn't show anything in the editor, and on the front end it actually holds whitespace in approximately the size of a video player because of the .wp-embed-aspect-16-9 class in block styles.

@talldan
Copy link
Contributor

talldan commented Oct 19, 2020

The youtube issue seems to be a CSS one in the editor, the HTML for the embed is correct. When I hacked on a height to the iframe the player is shown:
Screenshot 2020-10-19 at 5 38 01 pm

@talldan talldan changed the title Can't preview embeds Can't preview video embeds in the editor Oct 19, 2020
@talldan talldan added the CSS Styling Related to editor and front end styles, CSS-specific issues. label Oct 19, 2020
@talldan
Copy link
Contributor

talldan commented Oct 19, 2020

I think the same thing happens with Vimeo too. I'll treat this one as an editor side CSS issue for video embeds, and #26180 can be separate as a front-end issue for all embeds.

@talldan
Copy link
Contributor

talldan commented Oct 19, 2020

Figured it out, seems like we just need the wp-embed-responsive class in the editor. Simple fix would be to add that.

Separately I wonder why embeds don't work non-responsively without that.

@talldan talldan self-assigned this Oct 19, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Widgets Screen The block-based screen that replaced widgets.php. [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.

3 participants