This was a suggestion by Moshe to always save revisions on edit, to be coupled with #1678020: Auto-generate log message in revision log when saving new revision stating what field was changed.

I think we'll want to do this eventually, per the designs with the revision timeline.

Comments

Wim Leers’s picture

Status: Active » Postponed

"eventually"

Wim Leers’s picture

Wim Leers’s picture

Acquia's awesome Matt Edmunds linked us to http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-dr... this morning. On GitHub: https://github.com/simsalabim/sisyphus.

Definitely looks interesting. Unfortunately, it seems WYSIWYG editors are explicitly not yet supported: https://github.com/simsalabim/sisyphus/issues/4. We could still use it for non-WYSIWYG use cases though. What's more: we don't always use forms, i.e. in the case of the title, simple text fields and even for node bodies, we try to avoid using forms. So, in those cases, it may not be a good choice.
That being said, at the very least, it'd be interesting to learn from this :)

Wim Leers’s picture

Title: Auto-save revisions on edit » Auto-save revisions on edit + generate log message
Wim Leers’s picture

Status: Postponed » Closed (duplicate)

#3's sisyphus is irrelevant now because we'll be using Create.js, which also comes with localStorage support.

Merging with #1678002: Edit should provide a usable entity-level toolbar for saving fields.

doitDave’s picture

May I suggest something like a "draft bin"? With this, we would also catch these famous browser-closing-and-realizing-that-there-was-still-something-to-finish-cases like I just happened to have one. Yet another time. I really like that feature in Wordpress (although it's actually almost the only one) and it sucks to just have lost about 1 hour of advanced text authoring for a second of inattentiveness.

And yes, disregard Wysiwyg, do it with standard forms. Wysiwyg will find a way once a basis is there.

Roughly:

node/add/xyz: JS interval of say 5mins; reset on saving -> draftIds[] = this.saveToDraftBin() -> on save: this.removeFromDraftBin(draftIds)
(would also need a recovery option or something to browse existing drafts)

node/%node/edit: create revisions via Ajax but flag them as drafts; on save: remove drafts.

If there's already a project which needs a hand: I would be glad to help a bit.

Edit: An interim solution like a JS window.onclose=alert('You have unsaved changes. Sure you want to quit?') would already do a lot. (In case today's browsers wait for modal JS dialogs before shutting down, not sure right now...)