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:

1 Like

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