Special onebox for hypothes.is

Discourse supports hypothes.is oneboxing out of the box, but it is the default onebox:

It puts the annotated text as the title and the annotation as the content. It’s an ok solution but it’s not intuitive. Someone who sees that onebox has no clue that what it’s referring to is actually a web annotation, i.e. a piece of text on the net plus a comment on that piece of text.

It would be great to have a special onebox for this. Perhaps something that looks more like how the annotation is displayed by hypothes.is itself:

image

3 个赞

I don’t think Discourse Core is going to want to add this, but maybe this could go into Marketplace and make a plugin for it? Is it possible to make a plugin that provides a overridden custom onebox?

2 个赞

I suppose this can be done in a plugin, but let me explain a bit more. I suppose I misframed this topic by describing it as a onebox question. Yes, a better onebox for hypothes.is would be nice. But I think there is much, much more to be gained for discourse from a closer integration of hypothesis (or supporting Open Annotation more generally). Honestly, I think this is huge:

But let’s stay focused and figure out how discourse might use hypothesis. The most obvious use seems to be that it allows for a much smoother quoting of external webpages. Not the url but any specific piece of text on that page.

Concretely: I navigate to some website that I want to refer to in my discourse post, I highlight the snippet I want to quote and save it. Hypothesis gives me a link to that specific annotation and I simply paste it into my post. Currently, it is rendered like this:

(Note the misleading url and image)

But it should be very easy to make it render like this:

From: The Day The Trackbacks Died at https://blog.codinghorror.com:
I want to read your response to my posts, whether it’s on your site, or mine as a comment. So rather than relying on direct peer-to-peer links, I’m exploring the use of external indexing services.

By default, hypothesis only provides public links for annotations, not for highlights, which means you have to write a comment into hypothesis even if you just want to share the text snippet you are commenting on, but nobody forces discourse to display that comment. (The UX problem remains, though, that it doesn’t make sense to type the same comment both into hypothesis and into discourse, but I think a solution could be found here.) So I in my mockup, I have stripped the annotation that is shown in the onebox.

So that would be discourse referring to the world. The other way around would, of course, also be nice. In principle this already works: a discourse post can be annotated just like any other website (or pdf, BTW). The problem is, it only works if you have the Hypothesis Extension for Chrome installed because Discourse doesn’t like being shown in an iframe which means the hypothesis’ proxy solution (called “via”) doesn’t work with discourse forums. Which is a pity.

This can be solved in at least two ways:

  1. Let discourse be iframed by via.hypothes.is
  2. Customize discourse to include this JS snippet: <script src="https://hypothes.is/embed.js" async></script>

The problem with the embedded JS is that you will have the hypothesis sidebar displayed on the right edge of your screen (though perhaps it can be configured so that it is only displayed when some explicitly requests to see a specific annotation, i.e. people following an annotation link.)

So there is some food for thought…

PS: Not only does discourse need hypothesis, hypothesis obviously needs a discourse forum :wink:

1 个赞

You can have someone submit a PR to add an engine: onebox/lib/onebox/engine at main · discourse/onebox · GitHub

5 个赞

Do you have some rough indication of how much work/money this would require?

Certainly less than a plugin. I remember when writing a onebox engine that it was fairly straightforward, with only a few confusing parts.

1 个赞

你好

我看到这个讨论已经有些年头了。
我是 Hypothesis 的重度用户,在两年内创建了超过 5000 条标注。

Discourse 是我遇到的少数几个与 Hypothesis 不兼容的网站之一。

奇怪的是,一个旨在促进讨论的论坛,却与 Hypothesis 无法良好协作。

如今,外部的标注数量是三年前的十倍。

我非常喜欢 Discourse,真的希望能使用 Hypothesis 来标注我认为有趣或值得注意的内容,并分享这些标注的链接。

目前我依靠一个变通方法:使用页面顶部第一条帖子的“分享此帖链接”功能打开页面,然后进行标注,这样就能正常工作了。

Hypothesis 标注可以大幅提升内容的病毒式可发现性,以及聚合这些内容的平台的影响力。

2 个赞

尝试在这里使用 Hypothesis。

看起来它正在运行。
所以可能只是某些设置或版本的问题?

我之前遇到问题的其中一个论坛是 https://forum.openglobalmind.com/

嗯,那不是一个公开论坛。Hypothesis 只能在其可访问的页面上工作,这排除了私人论坛,对吧?

我认为 Hypothesis 可以在用户登录的情况下访问非公开页面。

虽然可以添加注释,但只有先使用“通过链接分享此页面”功能打开页面,才能获得指向该页面的正确路径。

如果我这样做,就能创建正确的注释。否则,注释会变成孤儿。

就像这样:

通过链接访问时也是如此:

如果我先删除查询参数

注释的链接就可以正常工作了

https://hyp.is/oGzhgi2SEeu6ypOSaqf4kQ/meta.discourse.org/t/special-onebox-for-hypothes-is/70946

我怀疑 @tophee 你我和想法相近,因为我最近似乎在 Meta 上一直在关注你的讨论线程。:smiley:

确实如此。我认为如果重新命名或重新发布,将重点更直接地放在更广泛且(在我看来)更有趣的概念上,这场讨论可能会获得更多关注。

这似乎是一种可能不必要的变通方法。肯定存在(或可以存在)一种更通用的方法来实现这一点。

这里至少讨论了三个独立的问题,我认为这三个问题都值得考虑,或许应该分别在单独的线程中讨论。

首先,Discourse 能够更好地展示来自 Hypothesis 的 Onebox 内容。这固然不错,但在我看来,其用途 somewhat 有限,前提是你考虑的是更一般的情况(见下文第 3 点)。

其次,Hypothesis 能够标注 Discourse 论坛。根据上面的一些回复,这也许已经是一个被解决的问题,但如果尚未解决,它确实看起来如果能实现会很好。考虑到……,这 arguably 比允许引用页面特定部分的 Hypothesis Oneboxing 更重要/更有用。

第三,更通用的想法,即能够使用 Discourse 引用任何网站任何页面上的任何内容,这在我不看来不应与 Hypothesis 具体绑定。实际上,我发现 Discourse 拥有任何系统中最好的引用实现之一:从跨多条消息引用的持久性和便捷性,到可选的上下文展开,再到快速跳转到源,其实现非常优雅。如果 Discourse 能够在任何网站(而不仅仅是 Discourse 论坛本身)上实现这一点,我认为这将非常引人注目。有趣的是,我认为可以论证这在 Discourse for Teams 的背景下可能特别有用,例如在研究项目、竞争分析等场景中。

显然,这需要浏览器插件、某种嵌入式页面浏览器,或者我尚未了解的其他方法,而且很可能并非易事。但我认为它有足够的潜力值得研究。如果看起来合理,我可以在单独的线程中提出更有力的论据……

4 个赞