ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.16k stars 3.01k forks source link

Gateway: dynamic image for social sharing #8811

Open lidel opened 3 years ago

lidel commented 3 years ago

We've added a basic social sharing markup in https://github.com/ipfs/dir-index-html/pull/36#issuecomment-647819924 :

@lanzafame pointed me at this nice prior art from Github shows how UX can be improved by showing useful data via image:

In IPFS context, a cool improvement would be to provide image-per-CID with:

Hot take:

lidel commented 3 years ago

Note to self: this is blocked until we add support for ?format= in go-ipfs, but it is ok to explore the visual side of things in parallel :)

@jessicaschilling @olizilla @lanzafame it seems github ones are one of the best right now, but lmk if you have other good prior art or ideas around this. I'd like us to nail the design/ux part of this.

jessicaschilling commented 3 years ago

Going to name-check @ericronne here, since his group would be the ones to discuss visual implementation details with.

Love the idea of the QR code for 100% of users, but want to raise a small flag about how best to represent the nerdier/meatier details you list above in a way that won't alienate a super-casual user who sees the social card inline in, say, a Twitter stream. Consider the following GitHub analogy:

I believe we've got a similar issue for people sharing gateway links: sometimes the intended audience doesn't need to care at all about the fact that the content is on IPFS, they just care about the content.

lidel commented 3 years ago

Fully agree on making it approachable.

To clarify: we are only able to do this on links to directories, not individual files. This reduces the number of designs we need to make. Just one, for a directory under /ipfs/{cid} or /ipfs/{cid}/some/sub/path

Image (QR code?), content path and size should be the most prominent, other details I mentioned are nice-to-have (could be skipped, or presented as a background detail).

jessicaschilling commented 3 years ago

Understood about links being to directories only, but I think this still applies: It could be a directory of cat gifs.

lidel commented 3 years ago

Ack. Perhaps we could render names of a few items from the shared directory followed by elipsis, to indicate contents without the need for opening?

ericronne commented 3 years ago

Thanks for the ping. I fear that i require more context. Is this an og image that will be dynamically generated when a user shares the hashlink for a site hosted on ipfs (for those who haven't explicitly defined one in their site code)?

What's the use case for the qr code?

lidel commented 3 years ago
lidel commented 2 years ago

go-ipfs 0.13 shipped with ?format= support on gateways, which allows requesting alternative response types for a content path. In the context of this issue, it could be used for generating an image card similar to what github does.

Next steps here could be tackled in parallel, could be by different contributors: