A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Sharing

From WHATWG Wiki
Revision as of 20:56, 11 August 2014 by Ehsan (talk | contribs) (→‎TODO)
Jump to navigation Jump to search

Figuring out sharing for the web.

Actors

  • End user
  • User agent
  • Items that can be shared (share item)
  • Place that has items to share (share source)
  • Place items can be shared with (share destination)

(Could potentially merge share source and share item.)

Use cases

Brief: E wants to share I (image, URL, ...) from S (The New Yorker, xkcd, ...) on D (Twitter, Facebook, Pocket ...)

Longer: End users want to share http://www.boston.com/bigpicture/2014/07/conflict_continues_in_gaza.html from The Big Picture with their preferred social network or private database.

UI speculation

There's a couple of parts that might require interaction with the user:

  • Adding share destinations
  • Initiating sharing: this could be either through an API or as on iOS through dedicated chrome UI
  • Displaying share destination after sharing is initiated: e.g. through a special overlay browsing context. In case of Twitter this might require almost the entire screen (on mobile). In case of Pocket this would not require much UI at all in the simple case.

UI idea

Revamp user agent bookmarks. Bookmarks are about sharing the current URL with yourself. We could generalize that concept to share that URL with Twitter, Pocket, or any other service that gets itself added as share destination.

Constraints

  • A secure origin (TLS) is required to be a share destination. Requiring a secure origin for a share source seems like too much of a burden.
  • Share nothing other than the share item and the origin of the share source with the share destination (e.g. no DOM access).

registerProtocolHandler()

  • Open-ended scheme names does not work when UI requires knowledge about its scheme name. ("Can Gmail handle 'mailto'?" vs "Can Gmail handle email links?")
  • Replaces the current browsing contexts or spawns a new one. No overlay
  • Limited to sharing things that can be expressed through a URL

TODO

  • Scope of share items: restrict to URL of the share origin for now?
    • (ehsan) I think we may need to handle more than just the URL, for example if the user wants to share an embedded image/video on a site.
  • Share destination registration UI
  • Share UI: user-agent-initiated or share-source-initiated?
    • (ehsan) the web has pretty much settled on the latter at this point.
    • (ehsan) are we talking about telling the share source about the user's preferred search service or get them to call an API which does this opaquely?
  • (ehsan) Should we integrate OGP annotations?
  • (ehsan) Sharing providers typically want to be able to show their UI *before* the sharing happens too.

Resources