-
Notifications
You must be signed in to change notification settings - Fork 41
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
Sharing snippets #2
Comments
My impression is that this tool is mostly useful for:
In both cases, I'd say that the input will be very short. So, I think query string would probably be fine. Perhaps a "tinyUrl" integrated button for url-shortening? (so you can share the link without spamming!) |
Update: So, I think it would be wonderful to see:
If the page is still hosted via GitHub, there would probably be an A-name record for the server side component, server.less2css.org ? The unique id could be added as a hash or query string, but not a path. |
Yeah, I'm not sure what I ultimately want this to be. I think first it makes sense to implement the easy stuff that doesn't require server side. If I get a hankering for more, I can host it on my VPS. My dilemma then would be: Rails or Node.js. If you're going to contribute then, Node probably makes sense since there won't be much learning curve. Otherwise, I'll likely use Rails, since there is less headache. Let me know |
Agreed, a simple solution would be best to do first, and the query string would be easiest. But here's another thing, I've been in touch with the Less developers, and they recommended to add "try it now" links to lesscss.org (on Github) that link to this live editor! brian-frichette [email protected] wrote:
|
the url string could get pretty big.. and isn't there a 2048 limit? in the same way as https://lea.verou.me/2011/12/introducing-dabblet-an-interactive-css-playground/ couldn't it save to github gists ? then it wouldn't need anything serverside? |
The 2048 limit, the far I know, is for ooold browsers & servers, @agatronic ;D
|
I think involving a server-side component is a good idea, because it alleviates any size limits (I know for sure that IE has lower limits than others), and allows easier link sharing. However, supporting a querystring is still a solid idea, because for short snippets, you could update the link without having to make a new version. Use-case? On
|
@gustavohenke The server-side component obviously requires a lot more than a ... which leads me to @agatronic's statement ... are you suggesting that GitHub has an API that could accommodate this server-side component, by allowing snippets to be loaded & saved using Gists? That would be a perfect solution, because you could share the Gist, report issues against a specific Gist, etc. Sounds pretty cool, if I interpreted your comment correctly! |
@scottrippey sorry I wasn't clear.. yes, gists can be created from an api on the client (e.g. in the browser). Dabblet does this. Here is what a quick search led me too, to find it https://github.com/LeaVerou/dabblet/blob/master/code/global.js If it could support gists and URL's, that would be the ultimate - As a user I'd rather use gists, and in the lesscss site It would be cool to generate them as URL's. |
I have no problem creating a "Create Gist" button for the current chunk of code. However, I have moved this to Express, as I want the power and flexibility that server-side has to offer, and it's really the best way to do short URLs. I think it makes more sense for the sharing component to link to this site with the correct code saved, rather than to reference a gist. This was one of the main things we originally wanted to do: Be able to share something like CodePen / jsbin, but with much better support for LESS. Basically, I don't want to tangle gists and code-sharing. Most people use gists for what I use them for: storing snippets of re-usable code. I realize they can be used for more, but they aren't the ideal solution in this case. It's a cool idea though, and I appreciate the feedback. |
@brian-frichette Thanks - any sharing will be good, mainly thought gists were a good idea to save you work/need for a serverside component.. Think your solution will be good. |
Discuss either serializing to query string or simple backend system.
The text was updated successfully, but these errors were encountered: