-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autosave bugs #5
Comments
This is mostly working on the development branch, but I've been doing some future thinking... Do we want to eventually add autosave? I like the way CodePen has it set up. What should happen when a user first opens the editor, starts writing some code, and hasn't saved yet? What should happen if the user closes the window? From that CodePen blog post, it seems like storing the project in localStorage can lead to some strange behavior. A user can save projects without logging in right now. Not sure if we want to keep this or not. |
I agree that some sort of autosave feature is important. The main thing we want to avoid is users losing their code as that can be a major source of frustration. I read through the codepen page you linked to and seems like they have a smart, thoughtful way of doing this. I'm not sure about the ability to save without logging in, there's probably a convenience to allowing this and quick and dirty testing out ideas, but there may be some issues that arise that we can't think of at the moment. Maybe we should say yes to that for now, but no uploading of media / files unless logged in? |
I like the codepen setup. I'd be fine matching this model exactly. I don't know if we really need a toggle off autosave at this point though. Another reference point is gist.github.com. I love that you can quickly save a snippet even if you're not logged in. They have something like one "anonymous" username that it is stored under: https://gist.github.com/anonymous/199be9f7ac2e94d9e7af896bc91d0e22. You can't click the anonymous username and see any other ones though, so they're still hidden. One idea is to (differing from codepen a bit here), autosave from the start but don't have it actually show up in any account. The only purpose of the save is to restore if you close the window. We could use cookies to keep track of the most recent sketch open and automatically pull that up, in the way that osx windows restore files after reboot. I also think this could be overkill and it's enough just to pop up an alert if the user tries to close the window without saving. |
I'm going to rename this thread to "autosave" since that's what we are discussing and the general saving is now working. |
Woohoo just added this to master! Projects save every 30s if autosave is on. |
I'm not sure how to best resolve this but several students lost their work when they coded for a while, but never clicked save for the first time (and then their internet cut out or they navigated away by accident, etc.) I wonder if when a new project is created it should be "saved" immediately and then auto-save starts? But you can't press "new" again if you haven't actually edited any code? |
I noticed this as well when I was teaching the p5.js class at Pioneer Works. Maybe the user flow should be something like
Another related issue is #84, which will prompt the user to save if they try to refresh/navigate away from the page. |
Just noticed a bug with autosave: If autosave is enabled, and a user logs out, the sketch will still continue to autosave. |
I am opening some issues to track high priority "next step" features @catarak and I discussed today.
A key feature is for users to be able to "save" projects and have a file management system that allows them to open past projects.
The text was updated successfully, but these errors were encountered: