Skip to content

Conversation

@ndiego
Copy link
Member

@ndiego ndiego commented Jan 14, 2024

This PR adds a video demonstration that walks the viewer through the steps in the Quick Start Guide.

The implementation is not ideal, but it works. When docs are synced to developer.wordpress.org/block-editor, the content is wrapped in a Freeform block (Classic Editor). It's not actually converted into a block. This is something that we can explore improving in the future.

Therefore, the YouTube video (hosted as an unlisted video on the WordPress YT channel) cannot use the Embed block and needs some additional markup to maintain its aspect ratio and be responsive. The finished product will look like this:

image

You can view the video directly here: https://www.youtube.com/watch?v=nrut8SfXA44

@ndiego ndiego added the [Type] Developer Documentation Documentation for developers label Jan 14, 2024
@ndiego ndiego requested a review from justintadlock January 14, 2024 18:23
@ndiego ndiego self-assigned this Jan 14, 2024
Copy link
Contributor

@juanmaguitar juanmaguitar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

@ndiego ndiego merged commit 194d5c1 into trunk Jan 14, 2024
@ndiego ndiego deleted the docs/add-video-to-quick-start-guide branch January 14, 2024 20:17
@github-actions github-actions bot added this to the Gutenberg 17.6 milestone Jan 14, 2024
@ndiego
Copy link
Member Author

ndiego commented Jan 14, 2024

I just want to note that this approach did not work. The iframe is getting stripped from the post content when the page is updated. I have manually converted the page to blocks to get the video to display and am investigating a more permanent solution.

@adamwoodnz
Copy link

@ndiego security concerns make using iframe undesirable, could you try using the Jetpack YouTube shortcode? See WordPress/wordpress.org#188 (comment)

@dd32
Copy link
Member

dd32 commented Jan 15, 2024

We probably want to keep the iframe in these docs, and just have the blocks markdown importer on WordPress.org convert it to an embed block or shortcode.

@adamwoodnz
Copy link

adamwoodnz commented Jan 15, 2024

Yes just discovered why Jetpack isn't doing this, there's a setting which needs to be enabled:

Screenshot 2024-01-15 at 3 37 23 PM

It appears to work locally with the markup you've added @ndiego, converting the iframe embed to a shortcode, and then back to an iframe embed on the frontend.

Imported content

Screenshot 2024-01-15 at 5 32 26 PM

Frontend

Screenshot 2024-01-15 at 3 40 42 PM

The div with padding you've added to enlarge the video doesn't work due to a nested span, but we could add theme styles for this.

I propose we turn on the setting, remove the div from the embed code, and allow the cron to roll out the shortcode. Thoughts?

@ndiego
Copy link
Member Author

ndiego commented Jan 15, 2024

That sounds great @adamwoodnz. I will draft another PR with this update. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants