Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 15 months ago

#57543 closed enhancement (fixed)

Add oembed support for crowdsignal.net surveys

Reported by: donncha's profile donncha Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch has-screenshots commit needs-dev-note
Focuses: Cc:

Description

Crowdsignal has a block-editor powered survey/project editor. Surveys created using this editor appear on *.crowdsignal.net when published.

This patch adds the oembed code necessary so a URL such as https://donncha.crowdsignal.net/yet-another-test can be pasted into the post editor and a survey will appear.

Testing:
Apply the patch and paste this link into a post.
https://donncha.crowdsignal.net/yet-another-test

Attachments (4)

crowdsignalnet.diff (951 bytes) - added by donncha 16 months ago.
Patch to add oembed code that loads crowdsignal.net URLs
0aa02175928011af86d281b46b0f5147.gif (566.2 KB) - added by audrasjb 16 months ago.
After patch: testing on back-end (Classic Editor)
Capture d’écran 2023-01-24 à 14.07.38.png (160.8 KB) - added by audrasjb 16 months ago.
After patch: testing on back-end (Block editor) - embed block is blank.
screencapture-localhost-8888-552-wordpress-18-crowdsignal-2023-01-24-14_05_51.png (578.6 KB) - added by audrasjb 16 months ago.
After patch: testing on front-end (for both Classic and Block Editors)

Download all attachments as: .zip

Change History (18)

@donncha
16 months ago

Patch to add oembed code that loads crowdsignal.net URLs

#1 @audrasjb
16 months ago

  • Keywords reporter-feedback added

Hello @donncha, thanks for proposing Crowdsignal as a new oEmbed provider.

But first, we have a set of questions to answer to make sure this addition is relevant :)
you'll find them here: https://make.wordpress.org/core/handbook/contribute/design-decisions/#adding-new-oembed-providers.

oEMbed providers must:

  • be well-established, popular, and mainstream services,
  • properly and fully implement the oEmbed specification,
  • clearly be a trusted provider.

Questions:

  • Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”
  • If similar services are already supported, how does this service compare in terms of size, features, and backing?
  • Does this service have a large following on Twitter, Facebook, or other social media?
  • Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)
  • Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being added to the allow-list?
  • Does the service make an effort to build relationships with developers, such as through robust APIs?
  • How old is the service?

Does it have a well-established Wikipedia article? (Seriously.)

  • Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?
  • Is the provider frequently proposed?

Thanks!

#2 @audrasjb
16 months ago

  • Keywords reporter-feedback removed

Oh. Sorry. Crowdsignal is already a trusted embed provider 🙈

This ticket was mentioned in Slack in #meta-wordcamp by donncha. View the logs.


16 months ago

@audrasjb
16 months ago

After patch: testing on back-end (Classic Editor)

@audrasjb
16 months ago

After patch: testing on back-end (Block editor) - embed block is blank.

@audrasjb
16 months ago

After patch: testing on front-end (for both Classic and Block Editors)

#4 follow-up: @audrasjb
16 months ago

  • Keywords has-screenshots added
  • Owner set to audrasjb
  • Status changed from new to reviewing

@mamaduka @ntsekouras pinging you both as Core Editor Leads for WP 6.2.
Would it be reasonable to add support for this oEmbed endpoint in a pre 6.2 beta 1 Gutenberg release?

Asking just to know whether this ticket can be milestoned for 6.2 or not.
Thanks!

#5 @Mamaduka
16 months ago

@audrasjb, I think it is doable.

Adding embed variation to the Block Editor shouldn't be a problem. Here's an example PR for Pinterest - https://github.com/WordPress/gutenberg/pull/34895.

P.S. We might want to deprecate/remove Screencast from supported providers. See https://github.com/WordPress/gutenberg/issues/46717.

#6 in reply to: ↑ 4 @ntsekouras
16 months ago

Agree with @Mamaduka. crowdsignal already is in GB, so it should be an easy update in GB(regex here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/embed/variations.js#L170).

#7 @audrasjb
16 months ago

Cool, thanks both, I'll open a PR later today!

#8 @audrasjb
16 months ago

  • Milestone changed from Awaiting Review to 6.2

PR opened upstream: https://github.com/WordPress/gutenberg/pull/47382

Moving for 6.2 consideration.

#9 @audrasjb
16 months ago

  • Keywords commit added

The upstream PR has been merged on Gutenberg side. Adding commit keyword for Core.

#10 @audrasjb
16 months ago

  • Keywords needs-dev-note added

This can be mentioned in an Embed related dev note, or otherwise in the "Misc changes" dev note.

#11 @audrasjb
16 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55182:

Embeds: Add oEmbed support for crowdsignal.net surveys.

Crowdsignal has a block-editor powered survey/project editor. Surveys created using this editor appear on *.crowdsignal.net when published. This changeset adds oEmbed support for these URLs to embed Crowdsignal surveys.

Props donncha, audrasjb, Mamaduka, ntsekouras.
Fixes #57543.

#12 @milana_cap
15 months ago

@donncha @audrasjb Do we have a volunteer to write the Dev note?

#13 @audrasjb
15 months ago

@milana_cap I can write the Embed dev note :)

Do we have any tool to propose to work on dev notes and track the 6.2 devnotes?

#14 @milana_cap
15 months ago

The tracking tool is GitHub project. You can do it with whichever tool you feel comfortable with. I'd suggest GitHub comment as it treats code nicely and is very well copy/pasted into the block editor.

Whichever you choose, would be great to post it in a comment on this issue (either the link or the content itself). Thank you so much.

Note: See TracTickets for help on using tickets.