Andreas Gohr wrote:
I think one backup per user per page would be necessary.Hi *!
I'm just thinking about adding the gmail style autobackup thingy I talked about a few weeks ago. Short reminder: when a logged in user edits a page, her work is saved in the background automatically every minute. If her browser crashes or something else happens she can later return to the last autosaved state of a document.
Adding the background save was simple. Just a few lines more to the lockrefresh code.
The complicated part is the workflow of continuing the lost edit session. I'm not sure how to integrate this best. Here are some questions bothering me:
1) I currently only save one backup per user. Is this a good idea?
Probably not. Multiple open browser windows would destroy overwrite
each others backup file.
If the user attempts to edit the same page again, ask them if they wish to user their backup.2) how and when to notify the user about her dangling backup files?
A message at the top could give the user a message about unfinished backups on all pages. (this could be technically the most expensive version)
The message could be displayed only when she visits the page the draft is for. (easy)
We could display a message on pressing the edit of the affected page
button only. (somewhat more easy because we this anyway)
This is just a decision of taste, technically both things are fine.
not if newer document created by different user. Would need a mechanism to allow user to choose between backup and more recent version. Ability to apply a diff could be useful here.4) should we add some cleanup mechanism for old backups? When to delete a backup file?
if a newer document revision exists?
if the newer document revision is X days older than the backup?I'm not sure waht you mean, how can new revision be older?
if the backup is older than X days?Yes. Again X could be a config value.
I'd like to get your input on these things. I want to keep this featureMaybe forget the diff thing then :-)
as simple as possible please keep this in mind when making suggestions.
Chris -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist