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

Support preview snapshots of code for Open Graph links #32

Open
hojberg opened this issue Sep 8, 2022 · 3 comments
Open

Support preview snapshots of code for Open Graph links #32

hojberg opened this issue Sep 8, 2022 · 3 comments
Labels
needs-arch-design needs-ui-design snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months

Comments

@hojberg
Copy link
Member

hojberg commented Sep 8, 2022

When linking to a definition, instead of the default Open Graph image, we should show a preview of the source. If its a project (when those exist) it should have num stars and num downloads etc.

The challenge would be to create this image serverside—currently our routes serve up the same page and no server is involved.

It's possible to generate SVGs with React (and Elm) and use a node process to convert that to a PNG.

For share, these would be done on-demand, with some aggressive caching.


We should also update the description and title fields, this is probably a lower lift effort than the image portion.

@hojberg
Copy link
Member Author

hojberg commented Sep 8, 2022

Note that in Slack, it seems that code from GitHub is previewed directly as text that can be highlighted. This seems like a Slack specific thing and not an Open Graph thing.
Possibly the GitHub slack bot does this?

@gampleman
Copy link

See https://api.slack.com/reference/messaging/link-unfurling. You can do this with a Slack App and perhaps this would be a nice thing to do once you have teams all in on using Unison, but perhaps not super high priority (as it would only work once you installed the App rather than in any Twitter/OpenGraph compatible thingy).

@hojberg
Copy link
Member Author

hojberg commented Sep 9, 2022

Nice thats a very helpful insight!

@hojberg hojberg added the snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-arch-design needs-ui-design snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months
Projects
None yet
Development

No branches or pull requests

2 participants