5

I spent an hour or so on and off writing a post in the iOS app. Then did other stuff for a while, including at one point answering SO questions on my laptop. Swiping to read a notification in the app, I apparently threw away my draft, because it was:

  • overwritten remotely by a newer draft on the website
  • removed locally by reading a notification

Would it be practicable to save drafts on-device as well as in "the cloud" to avoid this problem?

2 Answers 2

3

I started typing out the full flow of how drafts work (below) but then I realized what the problem probably is. You can read the full flow below, but you probably got burnt by the bug that caused Saved Draft Already Posted. I'm thinking you opened the ask form and closed it, then you opened it again, wrote a draft, and closed it. You then pressed that home button and the draft got wiped out. If that's what happened it is fixed now.


There is currently question and answer drafting for a post in the app, distinct and separate from drafting that occurs on the web site. There is not drafting for edits. (I could go into some reasons.)

When you click "Ask Question", "Add Answer", or "Edit", we first check to see if the draft already exists (one draft for new questions, one draft per question to be answered, one per post being edited).

Drafts are saved when:

  1. You press home.
  2. Your phone falls asleep.
  3. You tap Cancel.

The save logic is, if any field has a value, write to disk otherwise delete from disk.

There are five cases where drafts get deleted:

  1. At a save point from above, the post is empty.
  2. When you open the form, you select not to resume the draft.
  3. When the post is successfully posted.
  4. When you log out of the app.
  5. When you remove the app.
12
  • @mhlester Just checked. Your phone falling asleep (taking you to the lock screen on resume) triggers the same save event as pressing home. Feb 12, 2014 at 19:05
  • thanks for checking. i guess i did just get burned by my other bug :)
    – mhlester
    Feb 12, 2014 at 19:16
  • I'm terribly sorry @BrianNickel, but I just lost another dang draft. Should I submit it as a new bug report or edit this one? I've tentatively unaccepted your answer... :(
    – mhlester
    Feb 19, 2014 at 5:02
  • That sucks. Can you provide context on what happened between drafting and when it was deleted? Is it possible that any of those five deletion cases were tripped? Feb 19, 2014 at 17:45
  • Does updating to the newer version qualify?
    – mhlester
    Feb 19, 2014 at 17:50
  • Shouldn't. If you install the new version without deleting the old version, you should still be logged in and have all your session data. If you had to log in again, it would be lost, but that shouldn't be the case. Feb 19, 2014 at 17:55
  • Ohhhh, you're right I did log out. Never mind! :)
    – mhlester
    Feb 19, 2014 at 17:56
  • Is there one question draft for all sites, or should it be one question draft per site? (want to know before I start bug report or feature request :)) Feb 5, 2015 at 15:31
  • 1
    @ShadowWizard One for all sites right now. Not looking forward to that UX work right now. 😓 Feb 5, 2015 at 16:17
  • @Brian did you add draft for edits at some point? (source) Apr 5, 2016 at 10:59
  • @ShadowWizard Yep, post drafts are saved. I think I did this as part of state restoration. Validating the issue now. Apr 6, 2016 at 23:25
  • Thanks @Brian, can you please edit the answer to reflect the app also got edit drafts? Apr 7, 2016 at 6:19
2

Here's how I could see it working:

  1. Separate drafts for questions & answers, with answer drafts associated with the question.
  2. Save drafts in the cloud (shared between website/app(s)) automatically.
  3. Option to save draft to local device.
  4. Option to forget a saved local draft.
  5. Check for local drafts first, then cloud drafts.
  6. Maybe forget answer drafts after a while, or only save one at any one time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .