Repository navigation
Comments: Let a host sign in embed previews, and find Embed by provider name - #54664
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
Proposed changes
Embeds don't work in the Reader's comment editor, and the Embed block is hard to find. Two changes:
labels.embedUrlwithout credentials, and turns any 4xx into a link. That suits a site's own public preview route, but the Reader's route answers signed-in readers only, so every lookup got a 401.mountEditornow takes an optionalfetchEmbed( url )returning aResponse, and the embed block uses it in place of its own request. Left out, nothing changes. The Reader passes one that goes through its signed-in API client (Comments: Sign in the comment editor's embed previews so embeds work in the Reader wp-calypso#116348)./youtubefinds the Embed block. Core's embed block shows up for provider searches through its variations, but this editor registers its owncore/embedwith no variations or keywords, so only/embedmatched. It now has keywords for common providers in core's oEmbed list, plus "video" and "audio".Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
/youtube. The Embed block is offered./video,/vimeoand/spotifyoffer it too.Created with Claude Opus 5.5 in Claude Code.