Autosave the playground!

Another playground lost by accidentally pressing Reload. :frowning: Please make the Playground survive a reload!

6 Likes

To server or to browser?

I was thinking just in the browser. We can save if/when we’re ready, the main thing is to not lose it.

Saving last “Run” or last edit? What if multiple playground open in the same browser?

I have to admit it happens to me from time to time :face_with_hand_over_mouth:… and I can’t say I like it when it happens :grimacing:… Of course, it’s my bad. And I also took some countermeasures - by copying everything to my notepad/textedit when making long or important PGs. Still, not the best CX… and when I think of it, all OS and nearly all games I play ask me twice if ‘I’m sure…’ when attempting to quit or return to menu. To a point where it eventually becomes annoying :grin: So, I guess there are pros and cons… Can’t just take the user by the hand and disregard all orders like you would do with a 4-years old :child: … But overall, there might be some sort of compromise to be found…so let me actually upvote this :+1:… providing there would be a good solution for it :thinking:

You can toggle the safemode property in the options:

It will prompt you to confirm you want to exit on page reload:

When you exit and reopen the tab, the option is remembered.

4 Likes

LoL. Completely forgot about this. This solution’s good enough for me :smiley: Can I take back my vote? :sweat_smile: :zipper_mouth_face: :rofl:

I think safe mode should be the default, this would fix the issue and people who want to live dangerously can always revert to unsafe (but then they acknowledge that they are in unsafe mode). Not the other way around

3 Likes

I’m half/half on this (as stated in my last post). Yes, the trend today is to take the user by the hand (and more :grin:). But I don’t really like it…except when I do :crazy_face: :rofl:

I was also thinking from the perspective of a new developer. Writing stuff in the playground will probably be one of the first experience when learning BabylonJS.

You only get one shot at making a good first impression, and losing your work because the default setting is silently set to unsafe is not a good first impression.

At least, there should be some warning somewhere visible that shows “auto save on/off” instead of burrying it in a menu.

I didn’t know it was a feature and I used the PG for more than 5 years now (but then I tend to miss very obvous stuff sometimes :joy:)

1 Like

Haha :laughing: That’s conforting to hear. Where I actually knew about it and next thing that happened… I forgot :face_with_hand_over_mouth:

Yes. So much is true. And I agree that one of the unique advantages of the PG is to commit new users. With this, you’ve just added 10% to my half/half. :rofl: Now I’m 60/40 (in favor of the default set to ‘safe’) :grin:

2 Likes

How about we observe the amount of time/number of changes in the editor, then it always pops up with the confirmation if > x😁 won’t need the Safe mode button then. Or change it for “Always warn of unsaved changes”

1 Like

There is a pop up message to accept changing page with most editor on some websites.
Something similar would be appreciated.

Made me switch trying load playground on vscode.

You can turn this on:

1 Like

TYVM,
Saved me time making a bookmarklet/userscript for that :smiley:

1 Like

Problem with safe mode is you can double miss click back or forward.
If anyone know a way to disable completely back and forward buttons on the mouse when on a specified webpage, please let me know. :grimacing: