playroom
playroom copied to clipboard
URL Shortening
Putting this here as i'll probably implement this, but, It would be nice to have an ability to copy a shortURL (instead of base64 links) for pasting in Slack/etc.
I was pairing with another dev the other day and we passed 4-5 links back and forth taking over our slack convo with huge link blocks. (I ended up just using bit.ly, but it would be nice if I could copy a short-link right from the playroom)
We have the same experience. This would need to be configurable in a way, for private installs of playroom that can't rely on external third party services for the short urls. Probably "just" a button that can post to an API and get the short url back, copy it to clipboard :woman_shrugging: ?
It may be possible to do some compression clientside using a fancy algorithm. The one I've linked is used by itty.bitty
@tom-sherman We already do client side compression using lz-string.
I added a new config option and modified Playroom.js:
{
shortlinkComponent: './ShortlinkComponent.js'
...
}
onClick in the ShortlinkComponent I fetch bit.ly
, passing the base64 url using their api and then copy-to-clipboard the result. You could of course use any service you'd like.
seems good, i'll fix up a PR