gillchristian / tsplay.dev

TypeScript Playground Shortener
https://tsplay.dev
MIT License
67 stars 9 forks source link

Support updating the link of a short link #27

Open gillchristian opened 4 years ago

gillchristian commented 4 years ago

When creating playground examples it is easy to forget something and then needing to change the code, which produces a new "hash" and thus a new URL.

This is a pain point when sharing playground links, as any changes made to the code require sharing a new link.

tsplay.dev is all about making sharing playground links easier.

Supporting the update of the link a short link points to would make this experience much better.

There are security concerns tho, as anybody could change the link for somebody else.

This should only by supported when GitHub login is there or by providing some sort of token (on link creation) that would need to be sent back to allow for updating.

jonidelv commented 4 years ago

@gillchristian Are you thinking on this as the front-page description, alongside the TS playground image?

gillchristian commented 4 years ago

Not really, what I meant is. That once you create a short link, if you change a bit the playground code (which now has a new hash, thus is a new url) you need to create a new short link again. Which is a pain because you are going to keep sharing links.

Another use case is, let's say you create the short link to share in some conference presentation, a blog post or a tweet. If you then find a typo in the playground code, and decide to update the code, you need to create a new short link for that updated version of the playground and share the link again.

It would be cool to be able to update the playground link that the short link points to.

Are you thinking on this as the front-page description, alongside the TS playground image?

So, no I wasn't. But actually it could be used. With some tweaks 😏