Content
View differences
Updated by Wieland Lindenthal over 1 year ago
**As** a contributor writing long texts, e.g. work package descriptions or comments
**When** experiencing **I want to** keep my unsaved inputs (let's call them drafts) even when the page closes or the browser crashes or any other reason that kills my editor instance (happened to me lately
**so that** I don't lose these messages (and lose a lot unfortunately)
**When re**loading of time)
**Acceptance criteria**
* When composing/editing a work package description or comment and I kill the page browser process, and I restart the browser and open the same URL, it will preload the input fields for with the drafted value.
* When I save the work package, comment, wiki page,... the draft is removed.
* After X days the (let's say a week) drafts also get discarded in order to not pollute the browser's local storage too much.
The technical idea is assigning every rich text editor
**I want to** input field (a field that uses CKeditor) something like a URN. The URN could serve us as a key in the browser's local storage to identify that input field's drafted value.
So for example
* the draft for the description of a new work package could have the editor pre-filled URN `work_packages/new/description`
* the draft for the description of an existing work package (ID 54) could have the URN `work_packages/54/description`
* the draft of a comment for work package (ID 54) could be `work_packages/54/comment`
* Similar for meetings agendas and minutes, wiki pages etc.
When a user starts composing a message, it will continuously save the current value in the local storage using that URN as the key.
Every time the front-end renders it will check for relevant URNs and change those fields into edit mode and prefill it with the last auto value that was saved text
**so that** I don't need to learn/find as draft in the option to chose local storage.
Every time a field gets saved the "time machine" icon from value in the editors toolbar local storage gets removed.
**EXTRA:**
We could also store the drafts on the server that a user can start working on a text on one device and select then continue working on a different device. However, that is a different usage scenario and I believe it complements the latest saved version. local storage approach.
**When** experiencing
**so that** I don't lose these messages (and lose
**When re**loading
**Acceptance criteria**
* When composing/editing a work package description or comment and I kill
* When I save the work package, comment, wiki page,... the draft is removed.
* After X days the (let's say a week) drafts also get discarded in order to not pollute the browser's local storage too much.
The technical idea is assigning every
**I want to**
So for example
* the draft for the description of a new work package could
* the draft for the description of an existing work package (ID 54) could have the URN `work_packages/54/description`
* the draft of a comment for work package (ID 54) could be `work_packages/54/comment`
* Similar for meetings agendas and minutes, wiki pages etc.
When a user starts composing a message, it will continuously save the current value in the local storage using that URN as the key.
Every time the front-end renders it will check for relevant URNs and change those fields into edit mode and prefill it
**so that** I don't need to learn/find
Every time a field gets saved
**EXTRA:**
We could also store the drafts on the server that a user can start working on a text on one device