Page MenuHomePhabricator

Create MVP for Edit Recovery
Closed, ResolvedPublic5 Estimated Story PointsFeature

Description

Feature summary (what you would like to be able to do and where):
To be able to make edits recover we will need the ability to

  1. save while typing,
  2. restore when reopening and
  3. delete when saving or cancelling.

There will be no UI developed as part of this task.

Acceptance criteria

  • Edits to all of a page's edit form fields are stored locally while typing. This should include the normal textarea and summary (which is also the new-section subject), as well as other core fields such as watchlist expiry and those from extensions such as ProofreadPage (which adds two textareas) or FlaggedRevs. It should work with all content models (e.g. CSS and JSON, which can be restored in the same way as wikitext).
  • Last saved state of the form fields is restored when a given page is re-opened.
  • Stored data is cleared if the page is saved, or editing is cancelled.
  • Feature is controlled by a feature flag $wgEnableEditRecovery. Note that this doesn't include clearing data if the feature is enabled and then disabled; that will be done in T341853.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • As an editor with unsaved changes, I could experience a power outage and I would like my changes to be safe.
  • As an editor with unsaved changes, when I open a page that I have previously been editing but haven't saved, I would like my changes to be restored.
  • As an editor, if I am editing a page that has been restored and I publish it, then when I return to it after someone else has edited it I don't expect my changes to be restored.
  • As an editor, if I am editing a page that has been restored and I cancel, then when I return to it I don't expect my changes to be restored.

Benefits (why should this be implemented?):

  • prevention of accidental change loss

Related Conversations
https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2023/Edit-recovery_feature

Event Timeline

Samwilson renamed this task from Create MVP for EditRecovery to Create MVP for Edit Recovery.Jul 14 2023, 8:41 AM
Samwilson claimed this task.
Samwilson updated the task description. (Show Details)
Samwilson set the point value for this task to 5.

Change 935987 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] [WIP] Edit recovery feature using indexedDB

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

Change 935987 merged by jenkins-bot:

[mediawiki/core@master] Edit recovery feature using indexedDB

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

Samwilson moved this task from QA 🐛 to Done 🏁 on the Community-Tech (CommTech-Kanban) board.

I think this task is all done, and all missing parts are now tracked in other tasks.