Skip to content
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

Incremental auto-save? #558

Open
2 tasks done
cshirky opened this issue Feb 21, 2018 · 1 comment
Open
2 tasks done

Incremental auto-save? #558

cshirky opened this issue Feb 21, 2018 · 1 comment

Comments

@cshirky
Copy link

cshirky commented Feb 21, 2018

Nature of issue?

  • Existing feature enhancement
  • New feature request

Feature enhancement details:

This is midway between an enhancement and a new feature request, since Save is already a function.
Right now, the sketch is saved if the user chooses Save, edits a file name after the first save or if the user Duplicates or (after bug fix) Downloads the file.

All of these behaviors follow the 20th century pattern of 'Remember to save your work!", which was a trail of tears.

Here are three alternatives for versioning, which could help even first-time users get to the essential value of versioning, which is "User can always fall back to most recent working version."

Alternative 1: Manual

Everytime a user saves or downloads, a version of the file is saved, and the URL contains a version counter that increments by 1, so that the URL after the third save would look like

http://alpha.editor.p5js.org/cshirky/sketches/S1KgQrXPz/3
or
http://alpha.editor.p5js.org/cshirky/sketches/S1KgQrXPz?version=3

Each version would be accessible by a URL of this form, and the bare URL would always refer to the most recent version (as now.)

The versions would only be the script text (or even a diff of the text); assets would still be pointed to externally.

Alternative 2: Auto on success

This would work identically to Alternative 1, except that it would auto-save every changed version that plays without run-time errors. This would build up many more versions, but would really save people, and especially novices, from having a working sketch, modifying it til it breaks, then not being able to fall back.

Alternative 3: Auto on run, saving errors

This would work identically to Alternative 2, except that it would auto-save every played version with changes. When there are run-time errors, it would save those alongside the version. This would build up many more versions still, but would allow anyone using the editor in an instructional context to capture all the student errors for study.

@catarak
Copy link
Member

catarak commented Feb 21, 2018

First of all, just want to make sure that autosave is working (though it does not save the version).

Since saving a new version every time the sketch is run or saved would exponentially increase the size of the database, and each file has its own undo stack, maybe it would make sense to have an explicit button that's like 'save the sketch at this time to a version' and then maybe there's a GUI for users to see all of the versions for a sketch, and a user could access the version by a query string parameter as well. I guess I'm for Alternative 1 but more manual.

Open to other thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants