Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

In AWB, the escape key is too easily to press accidentally, losing edits
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
After pressing "escape", a dialog should request confirmation, warning that you will discard edits.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve.

  • Start editing an article
  • Press the Escape key unintentionally
  • Don't have a snapshot available, or don't know how to retrieve it safely

Benefits (why should this be implemented?):
Don't lose significant edits so easily

One ugly way to implement, in the code right at the start of MainForm_KeyDown, is to replace Stop() with btnStop_Click(null, null).

Event Timeline

Hi @DavidBrooks, I am interested in working on this issue. Can you please help me get started with it?

One more often scenario to loose changes is connectivity error after pressing Ctrl+S/Save button.

Some time ago it was a big problem in Ukraine with unpredictable black-outs for hours.

How to loose changes:

  1. Disable network to simulate connectivity error due to black-out
  2. Type Ctrl+S/Click Save button

@A.sav: There are two workarounds.

  1. So long as you keep the app open, when the network eventually returns and the original article is reloaded, right-click in the edit window will show a "Replace text with last edit" option.
  2. "Options/Preferences/Editing and saving" asks AWB to snapshot your edit at intervals locally. I chose 30 seconds because you need to grab it before it gets overwritten by possibly a different title (but potentially lose 30 seconds of editing).

Thank you very much!

Well, another case to loose edits with "Replace text with last edit":

  1. Press Ctrl+S, and unpress Ctrl first.
  2. In the list of files, the file whose name starts with S becomes active.
  3. This file is loaded instead of original one
  4. "Replace text with last edit" is inactive

Not a bug.

I think the answer to the above is "don't do that".

I also seem to remember that some time in the past, the "Replace test with last edit" was active under more circumstances than now. It now seems to be active only after an explicit failure in the asynchronous Save process.