Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway: dynamic image for social sharing #8811

Open
lidel opened this issue Jun 23, 2021 · 8 comments
Open

Gateway: dynamic image for social sharing #8811

lidel opened this issue Jun 23, 2021 · 8 comments
Labels
dif/medium good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature need/community-input Needs input from the wider community P2 Medium: Good to have, but can wait until someone steps up topic/design-visual Visual design ONLY, not part of a larger UX effort topic/gateway Topic gateway

Comments

@lidel
Copy link
Member

lidel commented Jun 23, 2021

We've added a basic social sharing markup in ipfs/dir-index-html#36 (comment) :

@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:

  • If we implement image generation as an alternative response format named share-img (as in, gateway response changing based on parameter ?format=json|cbor|car|block|share-img) then we don't need to inline the data and don't need to deal with relative vs absolute vs cross-origin links (making this work on all gateway types without any additional configuration).
@lidel lidel added need/triage Needs initial labeling and prioritization dif/medium kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up status/blocked Unable to be worked further until needs are met and removed need/triage Needs initial labeling and prioritization labels Jun 23, 2021
@lidel
Copy link
Member Author

lidel commented Jun 23, 2021

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
Copy link
Contributor

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:

  • Someone wants to link to a repo, an issue, etc, where that additional data is likely to be welcome since the audience will know what it means
  • Someone else wants to just link to a .md document in a particular repo because they want to share the content and GH just happens to be where the content is located; the readers care about the content, not about the data, and might actually be turned off by the data depending on the nature of the content ("this link isn't for me")

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
Copy link
Member Author

lidel commented Jun 23, 2021

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
Copy link
Contributor

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

@lidel
Copy link
Member Author

lidel commented Jun 23, 2021

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
Copy link

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
Copy link
Member Author

lidel commented Jun 30, 2021

@lidel lidel changed the title Dynamic image for social sharing dir-index-html: dynamic image for social sharing Mar 21, 2022
@lidel lidel transferred this issue from ipfs/dir-index-html Mar 21, 2022
@lidel lidel added the topic/gateway Topic gateway label Mar 21, 2022
@lidel
Copy link
Member Author

lidel commented Jun 23, 2022

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:

@lidel lidel added help wanted Seeking public contribution on this issue need/community-input Needs input from the wider community good first issue Good issue for new contributors topic/design-visual Visual design ONLY, not part of a larger UX effort and removed status/blocked Unable to be worked further until needs are met labels Jun 23, 2022
@lidel lidel changed the title dir-index-html: dynamic image for social sharing Gateway: dynamic image for social sharing Jun 23, 2022
@lidel lidel added this to the Best Effort Track milestone Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/medium good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature need/community-input Needs input from the wider community P2 Medium: Good to have, but can wait until someone steps up topic/design-visual Visual design ONLY, not part of a larger UX effort topic/gateway Topic gateway
Projects
None yet
Development

No branches or pull requests

3 participants