Page MenuHomePhabricator

Auto-save to increase chances of lost edits recovery
Open, NormalPublic

Description

Proposed in Community-Wishlist-Survey-2016. Received 41 support votes and was ranked #31 out of 265 proposals. View full discussion and votes here.


As a use who is preparing an edit, I'd like to be confident that if some bad interruption happens before I save it (e.g. power outage) I'll likely be able to recover most of my work when I try to edit the page again, even if other countermeasures (e.g. browser cache, local copy) are missing or failed.

Local vs. remote storage, frequency of autosave, expiry etc. are negotiable. The less interface there is, the better; there should be no added preference(s).

Creating because of https://lists.wikimedia.org/pipermail/wikitech-l/2014-November/079378.html and the lack of a bug in core to track this.


Something else that I have had in the pipeline for a long while is autosave drafts. Basically, whenever you type, the article is saved to your local computer. If the browser crashes, and you visit the same article, it will prompt you for recovery. Making a Special:Autosave drafts index page would be trivial.

Implementation:
https://gerrit.wikimedia.org/r/#/c/5130/ https://gerrit.wikimedia.org/r/#/c/5130/

Of this, I also have an alternate implementation:
https://gerrit.wikimedia.org/r/#/c/157818/ https://gerrit.wikimedia.org/r/#/c/157818/
https://gerrit.wikimedia.org/r/#/c/159626/ https://gerrit.wikimedia.org/r/#/c/159626/

The original one is based on code by Joancreus and uses localStorage. It works, quite well actually, but while improving it, I became of the opinion that localStorage is basically so limited in storage and gives you so little feedback as an API and an enduser, that it's not really suited for much more than usersettings (big cookies). Not for saving potentially multiple 1MB articles, with structured details.

As a storage layer, indexedDB is much nicer in that regard. API wise, it's a bit convoluted, but a jQuery plugin makes it usable and readable. There are WebSQL polyfills for platforms that don't have indexedDB, which would allow us to support browsers of the past 6 years.

I would like some opinions on which way to go here. Additionally, i would love to hear what else people think would be required to make this usable for the Wikipedia audience and the naming. Would this be Drafts ? Autosave drafts ? autosave ? Would you say 'recover' when asking the user to use the version from drafts, or just 'use draft' etc?

Note that the '2nd' version also has a few more improvements like a separate RL module and a preference option, but those can easily be added to the first implementation as well.


Clearly, I prefer the word "autosave", which reminds people of the recovery features endemic in any document editing software; rather than "draft", which in the past caused a lot of confusion. LibreOffice, when restarted, asks if you want to "recover" a previous document, and many other FLOSS productivity softwares use the same terminology: what do they do on the devil's side (M$ and Apple)?


Version: unspecified
Severity: enhancement
Possible consumers:

See Also:

Details

Reference
bz73241

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:47 AM
bzimport set Reference to bz73241.
Nemo_bis created this task.Nov 10 2014, 9:16 PM

Change 5130 had a related patch set uploaded by Nemo bis:
mediawiki.action.edit: Autosave edit textareas in localStorage

https://gerrit.wikimedia.org/r/5130

Change 159626 had a related patch set uploaded by Nemo bis:
Drafts: Refactor with IndexedDB

https://gerrit.wikimedia.org/r/159626

You have linked the bug, but there should also be a link to [[mw:Extension:Drafts]], which supports auto saving on the server side.

(In reply to Umherirrender from comment #3)

You have linked the bug, but there should also be a link to
[[mw:Extension:Drafts]], which supports auto saving on the server side.

Sure, though that's not ready and even if it was, is not getting deployed to Wikimedia wikis, for reasons explained at length.

Merged in ContentTranslation: 00ebcc6e3e31b278092abde755cbd9009ef65cf4
No idea how much of its code/idea is reusable.

Jdforrester-WMF set Security to None.
Nemo_bis updated the task description. (Show Details)Dec 3 2015, 1:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 3 2015, 1:27 PM
Jdlrobson changed the task status from Open to Stalled.May 5 2016, 9:28 PM
Jdlrobson added a subscriber: Jdlrobson.

Looks stalled to me.

Change 5130 had a related patch set uploaded (by Jdlrobson):
mediawiki.action.edit: Autosave edit textareas in localStorage

https://gerrit.wikimedia.org/r/5130

Nemo_bis changed the task status from Stalled to Open.Jun 8 2016, 12:49 PM
TheDJ removed TheDJ as the assignee of this task.Apr 14 2017, 1:59 PM

Change 5130 abandoned by TheDJ:
mediawiki.action.edit: Autosave edit textareas in localStorage

Reason:
No progress on this for the past year, abandoning.

https://gerrit.wikimedia.org/r/5130

Nirmos added a subscriber: Nirmos.Jan 6 2018, 12:16 PM
Urfiner added a subscriber: Urfiner.