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 Me gusta

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 Me gusta

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 me gusta

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

5 Me gusta

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 me gusta

Hola

Veo que esta discusión es antigua.
Soy un usuario intensivo de Hypothesis. He creado más de 5.000 anotaciones en 2 años.

Discourse es uno de los pocos sitios que he encontrado que me han dado problemas.

Es extraño que un foro dedicado a facilitar el discurso sea el que no funcione bien con Hypothesis.

Actualmente hay diez veces más anotaciones en circulación que hace tres años.

Me gusta mucho Discourse y realmente me gustaría poder usar Hypothesis para anotar los fragmentos que encuentro interesantes o dignos de mención, y compartir enlaces a estas anotaciones.

Actualmente, recurro a una solución alternativa: abrir la página usando la opción “compartir un enlace a esta publicación” en la primera publicación en la parte superior de la página, luego anotar, y de esa manera funciona.

Las anotaciones de Hypothesis pueden aumentar significativamente la capacidad de descubrimiento viral del contenido y de las plataformas que las agrupan.

2 Me gusta

Intenté usar Hypothesis aquí.

Parece que está funcionando.
¿Podría ser solo algún ajuste? ¿Versión?

Uno de los foros donde encontré problemas es https://forum.openglobalmind.com/

Bueno, ese no es un foro público. Hypothesis solo funciona en páginas a las que puede acceder, lo que excluye los foros privados, ¿verdad?

Creo que Hypothesis puede acceder a páginas no públicas siempre que el usuario haya iniciado sesión.

Es posible añadir la anotación, pero solo obtienes la ruta correcta que apunta a la página si primero la abres usando la opción «Compartir esta página con un enlace».

Si hago eso, se crea la anotación correcta. De lo contrario, las anotaciones quedan huérfanas.

Como en este caso:

Desde el enlace, así:

Si elimino primero el parámetro de consulta

El enlace a la anotación funciona entonces

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

Sospecho, @tophee, que tú y yo pensamos de manera similar, ya que parece que he estado siguiendo tus hilos en Meta últimamente. :smiley:

Efectivamente, y creo que esta discusión podría ganar más tracción si se cambia el título o se publica de nuevo, centrándose más directamente en el concepto (o conceptos) más amplio(s) y (en mi opinión) más interesante(s).

Esto parece un posible trabajo innecesario. Seguramente existe (o podría existir) una forma más general de hacerlo.

Aquí se están discutiendo al menos tres cosas separadas, y creo que las tres merecen consideración, probablemente en hilos distintos.

En primer lugar, que Discourse pueda presentar mejor el contenido de Onebox de Hypothesis. Esto sería agradable, pero me parece de utilidad algo limitada, siempre que se considere el caso más general (esbozado en el punto 3 a continuación).

En segundo lugar, que Hypothesis pueda anotar foros de Discourse. A juzgar por algunas de las respuestas anteriores, esto podría ser un problema ya resuelto, pero si no lo es, parecería deseable que funcionara. Podría argumentarse que esto es más importante/útil que la función de Oneboxing de Hypothesis que permitía citar partes específicas de una página, a la luz de…

En tercer lugar, la idea más general de poder citar cualquier cosa en cualquier página de cualquier sitio usando Discourse, lo cual, en mi opinión, no debería estar vinculado específicamente a Hypothesis. De hecho, he encontrado que Discourse tiene una de las mejores implementaciones de citas en cualquier sistema, desde la persistencia y la facilidad para citar múltiples mensajes, hasta la expansión opcional del contexto y el salto rápido a la fuente; es una implementación elegante. Sería realmente notable, creo, si Discourse pudiera hacer esto en cualquier sitio, no solo en el propio foro de Discourse. Curiosamente, creo que se podría argumentar que esto podría ser especialmente útil en el contexto de Discourse for Teams, por ejemplo, en proyectos de investigación, análisis competitivo, etc.

Obviamente, esto requeriría o bien un complemento para el navegador, o algún tipo de navegador de páginas incrustado, o algún otro enfoque del que no tengo conocimiento, y probablemente no sea trivial. Pero creo que tiene suficiente potencial para valer la pena investigarlo. Creo que podría hacer un argumento más sólido al respecto en su propio hilo si parece justificado…

4 Me gusta