-
Notifications
You must be signed in to change notification settings - Fork 81
Add possibility to add locally stored templates #155
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
A preview is available here. |
I like the rawgit trick, should try it on my (old stale) PR - thanks. Tried your link, I see the new Templates button (after a false start with it pointing to some other commit(?)), but Firefox console says "SecurityError: The operation is insecure." at |
@mcast It works fine her using NoScript. What kind of RequestPolicy plugin do you use? Edit: Edit 2: |
RequestPolicy is https://www.requestpolicy.com/ and I see no mention of or settings for localStorage in its preferences, nor NoScript's. |
From the js console, I see that |
@mcast Hm, there's a way to avoid using edit: |
Iterating through localStorage may be blocked by certain security policies. See rust-lang#155 (comment)
Updated demo. |
I was only using
On 1e47d93 I get the "Templates // Here you can create a library of templates that is stored locally on your computer." widgets, but nothing happens (not even an error) when I give a name and click Create. |
The templates button won't show now if localStorage isn't available. |
I found it - sorry it's a bit late. Have to enable cookies. Unfortunately, attempting to access localStorage doesn't pop up the "should I accept the cookie" dialog the way HTTP cookies do. Now I manually enabled them for rawgit.com, the feature works. |
Thanks for the PR @panicbit! Could you elaborate a bit more on the use case for this? I'm a little wary to add lots of bells and whistles to play.rust-lang.org as it unfortunately doesn't have a consistent maintainer and has very few tests, so it's likely for features like this to break over time if they're not heavily used :( |
|
Hm ok, I feel like that may be a bit at odds with the design of the playpen, however. We're not necessarily trying to be a full-on IDE or anything like that, but rather a quick-to-use tool that's not necessarily persistent everywhere. With that model templates seem to me like they don't quite fit into the model unless we have something like user accounts which we're very unlikely to do just yet. |
Feel free to close this then. If people really want to use this feature Alex Crichton notifications@github.com schrieb am Mo., 14. Dez. 2015
|
Ok, in that case I'll close this for now, but thanks regardless @panicbit! |
No description provided.