p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Feature request: auto save before run

Open 1234igor opened this issue 6 years ago • 5 comments

New feature details: Hi! One of the biggest issues I have with web editor is when I accidentally run a faulty code with for example an infinite loop and it a) freezes the whole browser tab so the only thing I could find I can do is to reopen my sketch in a new tab and b) as I didn't save my sketch before faulty code launch, I lose a lot of progress and have to rewrite my code. I think it could be better if there was an option to auto save sketch before each launch in settings.

1234igor avatar Apr 27 '20 08:04 1234igor

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

welcome[bot] avatar Apr 27 '20 08:04 welcome[bot]

Thanks for the suggestion! Some similar issues have been opened recently ( #1390, #1393 ), and I think it indicates that how/when the web editor is saving could use some rethinking.

My goals are just (1) making sure folks don't lose their work, and (2) not littering the web editor database with saved versions of the default sketch.

catarak avatar May 06 '20 17:05 catarak

@raclim One solution i think would be trivial that we can store the work in localStorage when the user runs or type anything

And later on we ca retrive that work from the localStorage

parteekcoder avatar Feb 27 '23 11:02 parteekcoder

Any progress on this? Have lost valuable work in the last few weeks multiple times :'(

ymittal avatar Jun 23 '23 01:06 ymittal

I'm sorry that that's happening, that's really frustrating 😭

As mentioned above, there's probably some further thinking that has to be done about how saving works in general. There isn't any known progress yet, but definitely open to suggestions (like the one above) on workarounds or how it could be implemented differently!

raclim avatar Jun 28 '23 15:06 raclim