Onebox does not work in "Hide Details"

AI 生成的摘要

The discussion revolves around the issue of Onebox not working in “Hide Details” sections on Discourse. kiki shares an example of a Wikipedia link that only displays as a link when put in details, instead of being oneboxed. HAWK explains that this is due to the link being in a markdown tag, which triggers a mini onebox.

kiki asks if it’s possible to customize the mini onebox or disable it to use the full onebox instead, as they have a customized onebox plugin for specific URLs. codinghorror suggests putting the link on a line by itself to get a full-size onebox, but questions the need for this in “Hide Details” sections.

kiki explains that they’re using Discourse with Jupyter notebooks and need to collapse long notebooks, making the “Hide Details” feature useful. seanblue shares examples of links, images, and videos not previewing in “Hide Details” sections and suggests it would be nice to display previews there as well.

Below is a wiki page:

When i put the wiki page url in details,it just displays a link, while it is expected to be the same as above.

Summary

Apache Hadoop - Wikipedia

example
1 个赞

When you put it into the markdown tags it is mini oneboxing.

Thanks, @HAWK.

For onebox, I wrote customized onebox plugin to process some urls. Is there’s a way to customize the mini onebox? Or is it possible to disable the mini-onebox and use the onebox instead?

If you want full size onebox put the link on a line by itself, this is how it has always worked.

I don’t know that we care about this edge case with details and full size onebox, why would anyone want to do that?

We are building a service with jupyter (coding service) and discourse (community). We do write a onebox plugin to support sharing jupyter notebooks to discourse community. The notebook could be very long. For some of the cases, we want to collapse it.

1 个赞

I’m not sure if the current behavior was intended or not, but previews don’t show up in “Hide Details” sections. If possible, I think it would be nice to display previews there too.

Link

Link Doesn't Preview

The Way of Kings: Book One of the Stormlight Archive: Sanderson, Brandon: 9780765365279: Amazon.com: Books


Image

Image Doesn't Preview


Video

Video Doesn't Preview

https://www.youtube.com/watch?v=tWo9wfsnj7M

3 个赞