Content
View differences
Updated by Parimal Satyal 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 While offline I have some indication explaining that I'm in I am offline mode:
* Show a banner:
* Type: Warning (yellow)
* Text: You are currently offline. You can continue editing. Your and that the changes will be synced submitted when the connection is restored.
* Action: Retry
* Dismissable: Yes
* The number of active users says "1 active user"
* The "Last saved line" is changed:
* Add a `cloud-offline` icon (fgColor-muted) before the text
* Change text to "Currently offline. Last saved {time}".
* When the connection is restored:
* Turn the banner into a success banner:
* Type: Success (green)
* Text: "Connection reestablished. Your changes have been synced."
* Action: none
* Dismissable: Yes
* Remove the `cloud-offline` icon and the "Currently offline" part of the text
comes back.
**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
* Show a banner:
* Type: Warning (yellow)
* Text: You are currently offline. You can continue editing. Your
* Action: Retry
* Dismissable: Yes
* The number of active users says "1 active user"
* The "Last saved line" is changed:
* Add a `cloud-offline` icon (fgColor-muted) before the text
* Change text to "Currently offline. Last saved {time}".
* When the connection is restored:
* Turn the banner into a success banner:
* Type: Success (green)
* Text: "Connection reestablished. Your changes have been synced."
* Action: none
* Dismissable: Yes
* Remove the `cloud-offline` icon and the "Currently offline" part of the text
* 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>