Comments (9)
Woohoo just added this to master! Projects save every 30s if autosave is on.
from p5.js-web-editor.
@catarak I like this user flow very much. I think the same flow could be applied to "save as" (or "copy"?) as discussed in #98.
from p5.js-web-editor.
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.
from p5.js-web-editor.
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?
from p5.js-web-editor.
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.
from p5.js-web-editor.
I'm going to rename this thread to "autosave" since that's what we are discussing and the general saving is now working.
from p5.js-web-editor.
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?
from p5.js-web-editor.
I noticed this as well when I was teaching the p5.js class at Pioneer Works. Maybe the user flow should be something like
- A user clicks the new button
- A popup appears asking them to give the new sketch a name
- User can start editing the sketch, autosave is enabled
Another related issue is #84, which will prompt the user to save if they try to refresh/navigate away from the page.
from p5.js-web-editor.
Just noticed a bug with autosave:
If autosave is enabled, and a user logs out, the sketch will still continue to autosave.
from p5.js-web-editor.
Related Issues (20)
- Streamlining Navigation for My Sketches, Collections, and Assets. HOT 1
- Issue with negative values in SASS with `math.div` HOT 9
- Proper commenting `class selectors`
- Converting Editor/index.js into a functional component HOT 3
- Addition of Keyboard Shortcuts for Various Editor Functions. HOT 1
- Passport handles expected errors as exceptions HOT 1
- Logged out error modal pops up when downloading another user's sketch HOT 1
- Can't download the programs HOT 1
- Add cookies to allow user to stay signed in across browser sessions HOT 3
- Apply user's system color-scheme preference as the default site theme HOT 2
- Image not working HOT 5
- Linux highlight clipboards does not work HOT 1
- Hilighted brace style or cusor enhansment for improved visibility HOT 1
- Enable `.mtl` File Uploads HOT 1
- "Failed to Fetch" errors for images on web editor HOT 5
- Adding Multilingual README for the repo HOT 1
- webcam capture fails in editor on firefox android HOT 1
- kj HOT 2
- Increasing Web-Editor Keyboard Accessibility HOT 1
- Improved Autocomplete Hinter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p5.js-web-editor.