reply-context: Difference between revisions

From IndieWeb
(โ†’โ€ŽIndieWeb Examples: in-stream since 2018-05-02)
Line 199: Line 199:


Possibly worth a small CASSIS function, takes in-reply-to array, returns display HTML.
Possibly worth a small CASSIS function, takes in-reply-to array, returns display HTML.
* Not sure that's the right abstraction.


Note that the above brainstormed reply contexts are actually two separate things - the "In reply to" pre-text which is specific to a reply-context (e.g. RSVPs would be different), and the synthesized summary of the url e.g. "a comment ..." or "issue n of Github project xyz".
Note that the above brainstormed reply contexts are actually two separate things - the "In reply to" pre-text which is specific to a reply-context (e.g. RSVPs would be different), and the synthesized summary of the url e.g. "a comment ..." or "issue n of Github project xyz".
Line 204: Line 205:
The latter can be used in a number of different contexts for providing a more human text-friendly synthetic summary of a URL if you have no other information (i.e. a URL-only [[h-cite]], and no retrieval of the URL itself for [[link-preview]] properties).
The latter can be used in a number of different contexts for providing a more human text-friendly synthetic summary of a URL if you have no other information (i.e. a URL-only [[h-cite]], and no retrieval of the URL itself for [[link-preview]] properties).


Thus itโ€™s probably better to make two CASSIS functions, one for the reply_to_text and one for an auto_url_summary.
Thus itโ€™s probably better to make two CASSIS functions, one for the reply_to_text and one for an auto_url_summary. More on the latter as it relates to other "automatic" text discernment/enhancement features:
* [[auto-url-summary]]


=== CRUD ===
=== CRUD ===

Revision as of 22:20, 19 June 2018

A reply context is the display of what a reply post is in reply to, including linking to that original post with in-reply-to markup, showing some amount of that original post like author name, icon, summary / ellipsed content, and datetime published.

Reply contexts became more important when replies started to have their own top level permalinks, which appears to have been popularized by Twitter treating @-replies like any other tweet. Twitter started by displaying the immediate reply-context of what an @-reply was in reply to, but eventually started recursively displaying reply-contexts on up to the tweet at the start of a thread.

Why

Why show

Why show reply contexts?

As foodie Jeremy Cherfas has said, "a reply without context is like an egg without salt." Reply contexts provide:

  • reader understanding. They provide readers the context of what's being replied. Better user experience through increased comprehension from the provided context.
  • completeness of your reply. Storing a reply context ensures that your copy of your content is always the most complete. The very nature of a reply is that it makes little sense out of context, and if you donโ€™t store and show that context then the canonical copy is less valuable than any copies syndicated out and shown by the replied-to article.
  • temporal context. Storing a reply context freezes the content youโ€™re replying to in time, meaning that if it goes away or changes, you still have a copy of the original content you replied to.
    • Take, for (contrived) example, a reply agreeing with an anti-war article. A month later the replied-to domain gets bought by a pro-war organisation and all the content on the site is changed to reflect that. By storing a reply context you protect your intent from misunderstandings.

Why in-stream

If you show replies on your homepage stream (e.g. in a composite stream), or even just as a list on their own page or in archive pages, you should show at least a minimal reply-context on your replies (e.g. at least "โ†ช" inline linked to the in-reply-to URL with u-in-reply-to) for the following reasons:

  • IndieWeb readers that consume only the h-feed of your homepage will be able to detect and optionally retrieve/show/disclose reply-contexts for your reply posts
  • A small visual cue helps more clearly indicate replies (independent of starting with @-name), in a composite stream, as distinct from notes and other types of posts

Why not more reply-context?

  • Bigger / more extensive reply-contexts inline in a stream (especially composite stream) would add too much clutter/noise vs. value.

How to

Display

How should reply contexts be displayed?

For general guidance on primarily textual reply-context presentation best practices, see

reply to a photo

How to reply to a photo, see this real world photo reply-context example:

And brainstorming:

Markup

How should reply contexts be marked up?

For consistency with comment markup, reply contexts should be marked up as an embedded h-cite in a .u-in-reply-to so that itโ€™s a nested microformat property of the parent (example). Like this:

<div class="h-entry">
 <div class="u-in-reply-to h-cite">
  <p class="p-author h-card">Emily Smith</p>
  <p class="p-content">Blah blah blah blah</p>
  <a class="u-url" href="permalink"><time class="dt-published">YYYY-MM-DD</time></a>
  <p>Accessed on: <time class="dt-accessed">YYYY-MM-DD</time></p>
 </div>
 
 <p class="p-author h-card">James Bloggs</p>
 <p class="e-content">Ha ha ha too right emily</p>
</div>


Why mark up reply contexts?

  • Allows feed readers/conversation viewers/other microformats consumers to provide a better UX. E.G. a feed reader can parse a reply with a marked-up reply-context and use that data to show what the reply is commenting on without having to make another request, or as a temporary preview whilst itโ€™s loading the original content.

Why use h-cite instead of h-entry for reply contexts?

  • Because it's more precise. Your reply-contexts are citations of someone else's work, not an attempt to propagate (syndicate) their work.

Why not use h-entry in addition?

  • Because h-entry implies syndication semantics, which are not what a reply-context is showing/conveying.

Levels

There is a broad spectrum of reply-context presentation that can be roughly ordered in terms of fidelity and difficulty, from simplest/easiest to richest (silo-parity) and most challenging.

URL

Since a reply has to be in-reply-to to something (a URL), the simplest reply context is to simply show the URL (hyperlinked of course) of the original with perhaps a text label like:

In reply to: hyperlinked-URL-of-original

IndieWeb Examples of URL-only :

icon

The next easiest thing to add is the icon (or avatar) of the author of the original post.

For example, replies to tweets can retrieve the icon purely by inspecting the URL for the first path segment for the Twitter username, and then embedding a dynamic image redirect URL, e.g. https://twitter.com/benwerd/profile_image: profile_image?x=.jpg See Twitter: Profile Image URLs for details.

Replies to indieweb posts can retrieve the icon from a nicknames-cache.

IndieWeb Examples of icon plus URL:

  • none so far

author name

Next, you can sometimes determine the author's name from a nicknames-cache.

Determining the author's name and their icon (more broadly/reliably than above), requires implementing the authorship algorithm on the original post, which requires more work than just parsing it for its h-entry as above.

IndieWeb Examples of icon URL dt-published and author name:

  • none so far

published

The original's published date is the next interesting (and slightly harder) thing to retrieve and display in a reply-context. With this step, an implementation must retrieve the original post and determine its "dt-published" (e.g. from parsing its h-entry).

The date and time of the original should be displayed and hyperlinked to the original's URL.

IndieWeb Examples of icon URL and dt-published:

  • none so far

original content

Lastly, the content of an original post is the hardest thing to display well in a singular reply-context, due to numerous additional variables. Some challenges:

  • length of original content - how do you truncate/abbreviate (if at all) original content to "fit" into a reasonably sized reply-context?
  • markup in original
    • do you allow any markup from the original content (e.g. links, images)?
    • or do do you always display only plain text from originals?
    • or use your own auto-linking on the plain text from originals?

IndieWeb Examples of icon URL dt-published author name and original content:

recursive reply-contexts

(previously called: reply thread and history thread)

Popular silos (e.g. Twitter) recursively display reply-contexts of originals/replies from the tweet that you're replying to, and if it was a reply itself, what it replies to etc. on up through the original tweet at the start of the thread.

IndieWeb Examples of icon URL dt-published author name original content for reply-contexts up through the original post that started the thread:

Notifications

Sites should send notifications using webmention for every h-cite / URL (u-url) in reply-contexts of posts.

IndieWeb Examples

In order of deployment:

  • Bret Comnes displaying minimal reply-contexts on bret.io since at least 2013-06-24
  • Julian Schweinsberg displaying full reply-contexts on jschweinsberg.de since 2013-08-21
  • Barry Frost displaying reply-contexts on barryfrost.com since 2013-09-15
  • Brennan Novak displaying h-cite reply-contexts on brennannovak.com since 2013-10-11
    • first reply-context example
    • markup issue as of 2013-10-28: reply-context marked up as h-entry instead of h-cite, parent note not actually marked up with h-entry so no way of knowing itโ€™s a reply!
  • Kartik Prabhu displaying minimal reply-contexts on kartikprabhu.com since at least 2014-03-17
  • David Shanske displaying limited reply-contexts since 2014
    • Example Pending

of silo posts

Reply contexts where the original is on a silo may sometimes need or deserve special treatment.

If you reply to a silo post where the silo does not mark up their HTML pages with h-entry, (e.g. post a comment on your own site, and the POSSE it to an Instagram post), you will need to do further processing in order to display the reply context as high fidelity as other indieweb posts.

You may find the following tools useful:

Brainstorming

Minimal text reply contexts

Tantek ร‡elik: Some ideas for improvements over: "in reply to: (URL)". (some from Falcon#improve_reply-context_support)

  • if URL is a tweet permalink of user aaronpk,

    In reply to @aaronpkโ€™s tweet

    and hyperlink it to the in-reply-to URL
  • else if URL is a Github issue comment permalink (github.com/owner/xyz/issues/n#issuecomment-m),

    In reply to a comment on issue #n of GitHub project xyz

  • else if URL is a Github issue (github.com/owner/xyz/issues/n),

    In reply to issue n of GitHub project xyz

  • else if URL is a Github repo or issues list (github.com/owner/xyz or github.com/owner/xyz/issues optional trailing /),

    New issue on GitHub project xyz

  • else if URL has some other silo domain (facebook.com instagram.com others?),

    In reply to silo-domain/path-segment

    (where path-segment is the username)
  • else

    In reply to URL

For multi-reply context, space separate the generated @/domain/URL and link 2nd and later to respective in-reply-to URLs.

Possibly worth a small CASSIS function, takes in-reply-to array, returns display HTML.

  • Not sure that's the right abstraction.

Note that the above brainstormed reply contexts are actually two separate things - the "In reply to" pre-text which is specific to a reply-context (e.g. RSVPs would be different), and the synthesized summary of the url e.g. "a comment ..." or "issue n of Github project xyz".

The latter can be used in a number of different contexts for providing a more human text-friendly synthetic summary of a URL if you have no other information (i.e. a URL-only h-cite, and no retrieval of the URL itself for link-preview properties).

Thus itโ€™s probably better to make two CASSIS functions, one for the reply_to_text and one for an auto_url_summary. More on the latter as it relates to other "automatic" text discernment/enhancement features:

CRUD

Though one advantage of storing and showing a reply-context is freezing the original context of what you're replying to, it may make sense to accept some updates.

For this to work, an original post that accepts and displays comments should send webmentions to all the comments permalinks when the original post is updated or deleted.

Update

  • If your reply post receives a webmention from the original post, re-read the reply-context from the original, and consider updating the reply-context on your reply accordingly. Possibilities to consider:
    • automatically accept minor changes to the original that may just be typos
    • store the latest reply-context update separately and optionally present a UI to accept it (and perhaps update your reply accordingly as well).
    • maybe note dt-updated as edited/updated
    • check reply-context author name/avatar for updates

Delete

  • If your reply post receives a webmention of the original post, and when attempting to re-read the reply-context your server receives a 410 from the original post, then the original post has been deleted. What should you do with your reply and reply-context?
    • Leave it alone? (Do nothing)
    • Unlink the original?
    • Note in the reply-context that the original appears to have been deleted, but keep the reply-context from before.
    • This may be something we need to do individual UI experimentation on to get a feel for what are good options to consider.

Examples:

CRUD Issues

Downstream vs Upstream
  • I think it's bad to send webmentions downstream and that it should be avoided. One should rather look into alternative mechanisms to ensure reply-contexts stay up to date and maybe look at how eg. silos like Facebook solves that. I see some reasons why it's bad to send webmentions downstream as suggested here: Pelle Wessman 05:21, 8 May 2016 (PDT)
    • It will make a webmention endpoint that doesn't expect such downstream mentions to show the upstream post as a comment due to the upstream post likely including a link to the downstream post from the original upstream mention.
      • That's a bug in the endpoint. It has no choice but to handle this since a third party C can send a webmention for any post link in A that links to B, regardless of whether that link is in a reply-context, a like-of, or a comment. Tantek
    • It adds lots of complexity for standalone webmention endpoints, like webmention.herokuapp.com, which don't really have the data of an original post readily at hand and detecting downstream webmentions, unlike Salmentions which also adds a lots of complexity, will have side-effects if ignored.
      • Complex or not an endpoint must handle any webmention for any link. It doesn't have a choice about this since anyone can send a web mention on behalf, and it is likely validation tools like webmention.rocks will start doing this automatically. Tantek 05:46, 8 May 2016 (PDT)
    • I'm also missing documentation of existing practices of for keeping reply-contexts up to date โ€“ eg. both Facebook and Twitter shows a preview of mentioned URL:s โ€“ how do they keep them up to date? Can the same practices be applied here? Downstream webmentions is no small addition and looking into alternatives would therefore be a good thing so we don't add complexity where we don't need to.
      • There is no additional complexity beyond the defensive handling. This just an optional enhancement. Tantek 05:46, 8 May 2016 (PDT)
Webmentions to responses inefficiency

Even though possible, it may be inefficient to send individual webmentsions from an original post to all the responses of that post.

With each nth response (reply, like, etc.), the source then has to send n-1 webmentions to all the previous responses.

It results in a geometrically growing responsibility of sending webmentions.

There may be other notification mechanisms that should be explored such as PuSH, e.g. if a response wants updates on that post in particular, perhaps it could do PuSH discover on the post, and then explicitly subscribe to receive PuSH updates on that post. (suggestion from Aaron Parecki)

Events RSVPs Invitations

This applies to event posts as well, and any responses to them, e.g. any changes to the event (name, , location, times, description etc.) should make the event send a webmention to any

  • RSVPs in reply to the event
  • invitations to the event
  • and comments, likes, reposts etc. as in response to other posts in general

So that they can update their respective reply-contexts accordingly.

See event: Response context CRUD for more details on how event posts should send webmentions to enable RSVP/reply-context CRUD.

Fork On Text

Fork On Text is an open source project in development to provide reply-contexts as a service, self-described as "Service to upgrade simple reply contexts with full reply contexts by fetching and storing remote content."

Client side with JavaScript

We could write a single reusable JS library that fetches, renders, and injects reply context(s) into the current page. Details: Client side reply contexts with JavaScript.

Silo Examples

Some silos display reply-contexts.

See Also