Content
View differences
Updated by Wieland Lindenthal 3 months ago
**As** an editor of a document
**I want to** be able to read and write documents even when my network is flaky
**so that** I am not kicked out of the flow of writing
**Acceptance criteria**
* If the network drops after I initially loaded a document I can continue writing to the document
* Once the network is back those edits get synced and persisted on the server.
* When the page goes offline, there are a number of indications that I'm in offline mode:
* Show an warning hint in a banner:
* Type: Warning (yellow)
* Text: You are currently offline. You can continue editing. Your changes will be synced when the header "Currently offline"
connection is restored.
* Action: Retry
* Dismissable: Yes
* The information on number of active users is gone says "1 active user"
* The information of the last successful save "Last saved line" is gone
changed:
* Add a `cloud-offline` icon (fgColor-muted) before the text
* Change text to "Currently offline. Last saved {time}".
* When the connection is restored:
* For the duration of 5 seconds:
* Turn the hint in the header banner into a success message banner:
* Type: Success (green)
* Text: "Connection reestablished": reestablished. Your changes have been synced."
* The information on active users is still gone Action: none
* The information of the last successful save is still gone Dismissable: Yes
* After 5 seconds:
* Remove the green success hint "Connection reestablished"
* Show `cloud-offline` icon and the header "Currently offline" part of the same as before the connection loss.
text
**Technical notes**
* Hopefully that is as easy as adding a y-indexeddb provider. 🤞
**Permissions and visibility considerations**
* When user only has read permissions, the user should continue having read-only permissions when offline.
**Out of scope**
* Syncing of the documents when the document is not open
* Moving the position of the banner to the bottom right; this will be handled in a separate feature: <mention class="mention" data-id="72657" data-type="work_package" data-text="##72657">##72657</mention>
**I want to** be able to read and write documents even when my network is flaky
**so that** I am not kicked out of the flow of writing
**Acceptance criteria**
* If the network drops after I initially loaded a document I can continue writing to the document
* Once the network is back those edits get synced and persisted on the server.
* When the page goes offline, there are a number of indications that I'm in offline mode:
* Show an warning hint in
* Type: Warning (yellow)
* Text: You are currently offline. You can continue editing. Your changes will be synced when
* Dismissable: Yes
*
* The information of the last successful save
* Change text to "Currently offline. Last saved {time}".
*
* For the duration of 5 seconds:
* Turn the hint in the header
* Type: Success (green)
* Text:
* The information on active users is still gone
* The information of the last successful save is still gone
* After 5 seconds:
* Remove the green success hint "Connection reestablished"
* Show
* Hopefully that is as easy as adding a y-indexeddb provider. 🤞
**Permissions and visibility considerations**
* When user only has read permissions, the user should continue having read-only permissions when offline.
**Out of scope**
* Syncing of the documents when the document is not open
* Moving the position of the banner to the bottom right; this will be handled in a separate feature: <mention class="mention" data-id="72657" data-type="work_package" data-text="##72657">##72657</mention>