Use localStorage on playground

Hello :),

I always make sure that any significant data entered by a user can be reinstated if possible after browser crash, or w/e.

It seems that the URL could just add #number#fileChanged on the end when there are unsaved changes for that URL, and then just load them from the localStorage on page reload. Or provide an option just saying “you have changes in localStorage on this machine”.

Is there any reason that the playground doesnt do this?

If its open source I would happily do that myself.

Thank you for the wonderful tool

I guess it’s something related to the Monaco editor used in the Playground.

Maybe @RaananW can provide more info on this one.

Yes there is :blush:

It’s a great idea, and it shouldn’t be a major problem implementing it. the main issue here is certain regulations regarding local storage and user’s consent. Same goes to cookies. There are many other features that are on-ice for the same reason.

dear Crew,

nice to meet you :slight_smile:

so, aye. is there any reason not to ask the user for their consent?



It is a bit more than that. I’ll talk to the team about it internally and see if we want to go in this direction

fair enough. I mean I built that functionality before.

I suppose there are issues I cannot see.

and leaving the data on the machine is an issue.

log ins and keys.

I suppose the simpler solution would be to autosave to the server, and you could inform the user of that if they reconnect to the page. simple effective.

As a Blender user, having a temp save of whatever the last run was would be of use.

See, Blender is using left mouse for selecting. To change camera, it uses middle button, the scroll wheel. Out of habit, I use this in the browser as well.

Problem is sometimes using the scroll wheel causes a change to a blank page. All the piece of shit browsers do this sometimes. I’ve just lost my work.

specifically if I touchpad scroll to my Linux vm with two fingers because my third finger is a fraction of a second late (about one in 50 times), then in Windows this is browser back. which occasionally destroys some of my work

There is (or at least should be) a dialog that stops you from closing the tab if your work was changed. Do you not see this dialog? if you don’t we will need to check what happened there.

I have never seen such a thing

@Deltakosh - was that removed in the new version?

This is only active if you tick “safe mode” in options

1 Like

FYI, I have always gotten this for as long as I remember, never a request to abort. I also get it on my own scenes, which really pisses me off. I have many tool scenes, where I save data.

I just spent 5 minutes trying to get it do it, and failed, then I remembered you get a certain kind of crunch when it happens. If I have my hand slightly forward so my 2nd index finger bone is over the wheel when I start my middle mouse drag, I can almost do it on command. Can anyone else do this?

The other thing I observe, is there a little flash of text in the bottom left corner, like it is showing a url it is retrieving.

Nope it is there but you need to enable it :slight_smile:

1 Like

safe mode, thanks

in order to fit with the paradigm of “the playground is also for examples”, might make sense to ask people if they want to enable safe mode for this when they make some changes, or, when then make some changes and then run the thing