WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 29 hours ago

Last modified 29 hours ago

#53326 closed enhancement (fixed)

Add Wolfram Notebook as a whitelisted oEmbed provider

Reported by: pento Owned by: pento
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Embeds Keywords:
Focuses: Cc:

Description (last modified by pento)

I'd like to propose that we add Wolfram Notebook as a trusted oEmbed provider.

Wolfram Research has been around for a long time. I remember using Mathematica in university, and that was longer ago than I care to remember. 😉 WolphramAlpha has been a mainstay on the internet for answering any question you can think of.

All of the Wolfram services are tied together by the Wolfram Language: Notebooks are their hosted version of Wolfram Language based documents.

They provide two oEmbed endpoints, the default endpoint available through auto-discovery (https://www.wolframcloud.com/oembed), and a secondary endpoint that returns the embed wrapped in an iframe (https://www.wolframcloud.com/oembed/iframe/).

To answer questions listed in the trusted oEmbed provider handbook page:

Is the service popular enough for core developers to have heard of it before? Is it “mainstream?”

Well, I've heard of it. 🙂 Mainstream is probably the wrong word for it, though: dominant within its niche would be more accurate.

If similar services are already supported, how does this service compare in terms of size, features, and backing?

TBH, I don't know of any service quite like Wolfram Notebook.

Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?

Yep.

Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)

I'm not aware of a specific documentation page, it was covered in their changelog when it was added.

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 whitelisted?

The auto-discovery endpoint returns a giant blob of HTML, there's no practical way for it to work as an untrusted oEmbed provider. Alternatively, they do provide an endpoint that returns an iframed version of the embed, which would pass the untrusted filter, but doesn't work with auto-discovery.

Does the service make an effort to build relationships with developers, such as through robust APIs?

The entire Wolfram company is developer focussed, APIs are what they build.

How old is the service?

Wolfram Research is 34 years old, their hosted service was launched in 2019, and the oEmbed option was added in 2020.

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

Yes.

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?

There are a handful of relevant plugins with only a few installs. It's certainly a niche provider, but I think that's offset by it serving a niche for which there is no real alternative.

Is the provider frequently proposed?

This is the first proposal that I'm aware of.

Change History (5)

#1 @pento
5 months ago

  • Description modified (diff)

#2 @jorbin
4 months ago

  • Keywords needs-patch added

Is the service popular enough for core developers to have heard of it before

I also can have heard of it. I think this would be a great addition.

#3 @pento
4 months ago

There's one point that could do with additional discussion: whether we would want to use the default endpoint, or the iframe endpoint.

There are two primary differences in behaviour that I've noticed whilst testing:

  • The default endpoint outputs everything as a HTML blob, including JS and CSS. I've occasionally seen the CSS interfere with the page styling (though it's worth noting that the Wolfram team were quite responsive when I reported that bug, and fixed it up promptly).
  • The iframe seems to have a maximum height, which can be useful to prevent the parent page from scrolling forever (I've seen some very long Notebook pages), but can also be unwanted (I can certainly see folks wanting the Notebook page to be the only real content, so scrolling in an iframe ends up being a bad UX).

There are pros and cons to both, I'd appreciate thoughts on them.

#4 @pento
29 hours ago

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

In 51909:

Embeds: Add Wolfram Notebook as a trusted oEmbed provider.

Fixes #53326.

#5 @pento
29 hours ago

  • Keywords needs-patch removed
Note: See TracTickets for help on using tickets.