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 のヘビーユーザーで、2 年間で 5,000 件以上の注釈を作成しました。

Discourse は、私が利用してトラブルに直面した数少ないサイトのひとつです。

議論を促進することを目的としたフォーラムが、Hypothesis とうまく連携しないというのは奇妙なことですね。

現在、野外にある注釈の数は、3 年前の 10 倍になっています。

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:

その通りです。この議論は、トピック名を変更するか、より広範で(私見では)より興味深い概念に焦点を当てて新たに投稿した方が、より多くの注目を集めるかもしれません。

これは、おそらく不要な回り道のように思えます。もっと一般的な方法がある(あるいは存在しうる)はずです。

ここでは少なくとも 3 つの別々のことが議論されていますが、これら 3 つすべてが検討に値し、それぞれ別々のスレッドで議論されるべきだと考えます。

第一に、Discourse が Hypothesis からの Onebox コンテンツをより適切に表示できるようにすることです。これは望ましいことですが、より一般的なケース(後述の 3 点)を考慮すれば、私の考えでは有用性は限定的に思えます。

第二に、Hypothesis が Discourse フォーラムにアノテーションを付けられるようにすることです。上記の反応から、これはすでに解決済みの問題なのかもしれませんが、そうでない場合、それが機能するのは望ましいでしょう。後述の点も考慮すると、これは特定のページの一部を引用可能にする Hypothesis の Onebox 機能よりも、より重要で有用であると言えます。

第三に、Discourse を使って任意のサイトの任意のページから何でも引用できるという、より一般的なアイデアです。これは私見では、Hypothesis に特化して結びつけるべきではありません。実際、Discourse はあらゆるシステムの中で最も優れた引用の実装の一つを持っていると感じています。複数のメッセージからの引用の永続性と容易さ、コンテキストのオプションによる展開、ソースへの素早い移動など、その実装は優雅です。Discourse が Discourse フォーラム自体だけでなく、あらゆるサイト上でこれを可能にできれば、それは本当に注目に値するでしょう。興味深いことに、これは特に Discourse for Teams の文脈(研究プロジェクト、競合分析など)で特に有用であるという主張が成り立つかもしれません。

もちろん、これにはブラウザプラグイン、何らかの埋め込みページブラウザ、あるいは私が知らない他のアプローチのいずれかが必要となり、簡単ではないでしょう。しかし、私はそれが検討する価値のある十分な可能性を秘めていると考えています。もし正当化されるようであれば、私はこれを別スレッドでより強力に主張できるかもしれません。

「いいね!」 4