Scratch shouldn't force the user to save unsaved documents on exit

Registered by Andrea Basso

Scratch shouldn't force the user to save unsaved documents on exit, instead, it should save them in a temporary file and show it on start-up. Obviously the save-button should still be shown.

When the user close its tab, don't ask the user to save it, but send it to the trash bin to let the user quickly undo the closing.
This would make Scratch more HIG's compliant: http://elementaryos.org/docs/human-interface-guidelines/user-workflow/always-provide-undo

Blueprint information

Status:
Complete
Approver:
None
Priority:
Low
Drafter:
None
Direction:
Needs approval
Assignee:
Artem Anufrij
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2.1
Started by
Cody Garver
Completed by
Artem Anufrij

Whiteboard

+1 -- swizzle

I think: when the app is closed, unsaved docs should be put in a file in .local/share/scratch/unsaved/. When the docs are actually saved, their respective data dir files can be deleted. When just a tab (or another window, but not the app) is closed, Scratch could keep the file in /tmp until enough accumulate, or the app is closed. ~CameronNemo

+1 for keeping in .local/share/scratch/unsaved/. Because losing work is the worst user experience ever. If we keep files in /tmp they can get deleted by the system (think sudden power outage and user boots again or even someone is keeping /tmp in RAM - other systems and maybe future eOS). And if we keep them in trash user can delete them unknowingly because he expects that only files that he himself moved to trash are there. Also files that are not saved anywhere IMHO should have a *highly visible* warning so that even user that is absolutely new to PCs knows it's not saved. (Perhaps a red exclamation mark on the tab? Or the entire tab tinted slightly red?) Won't it be annoying? No, because how often do you write and keep in editor (for a longer time) something that you don't want to save? ~grzesiek1e5

Related blueprints:
https://blueprints.launchpad.net/elementaryos/+spec/meaningful-file-saving
https://blueprints.launchpad.net/elementaryos/+spec/zero-hassle-save

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.