-
Notifications
You must be signed in to change notification settings - Fork 110
enh/y indexeddb #7621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
enh/y indexeddb #7621
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
15aff59 to
9b4afdb
Compare
9b4afdb to
d43a2a7
Compare
d43a2a7 to
f52166a
Compare
6637691 to
e746625
Compare
6d4c06b to
1ade042
Compare
853ca71 to
0a18ad3
Compare
0a18ad3 to
d1d57d9
Compare
d1d57d9 to
f8e013c
Compare
Turns out this already happens and we don't have to change anything:
|
f8e013c to
b9d99f2
Compare
5c0e437 to
03bd0d1
Compare
Fixed by syncing the start script with what end_to_end encryption uses. Also renders the setup steps superfluous. Signed-off-by: Max <max@nextcloud.com>
For now text is sometimes duplicated Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Keep the baseVersionEtag and the editing session around in case people who are offline connect again later. Signed-off-by: Max <max@nextcloud.com>
... and use it to check if the server is still on the same session. Signed-off-by: Max <max@nextcloud.com>
When reopening a document that was edited offline it will also be considered dirty now. Autosave will not kick in yet... As no steps are pushed. But when closing the file it will be saved. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
…Step Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
If no changes have been made offline clear the indexedDb cache and reload Editor.vue to load the latest editing session from the server. Signed-off-by: Max <max@nextcloud.com>
Use a setter function that remains functional even if the component has already been destroyed and reactivity does not work anymore. Signed-off-by: Max <max@nextcloud.com>
yjs and editor update logging can be very verbose. Uncomment it but keep it disabled by default. Can be enabled by setting the corresponding key in OCA.Text - i.e. `window.OCA.Text.logWebSocketPolyfill = true` in the browser console. Signed-off-by: Max <max@nextcloud.com>
It was still enabled as we mistyped the `disableBc` option. We cannot use it right now as the y-websocket room name does not include the base version etag. Therefore different tabs may be in different sessions and would risk syncing never the less. Observed this when reloading the editor on an outdated session: * Cleaning up the old yjs document took a while in the beforeDestroy callback. * The new document was already created. * The new y-websocket provider issued a sync step 1 via browser broadcast. * The old y-websocket provider responded and send its full state. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Otherwise the old session would get mixed with the new content when people come back with old state in indexed-db. ( Run playwright/e2e/indexed-db.spec.ts for an example. ) Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
This could be the basis for automatically merging changes from an offline editing session and changes by overwriting the doc. Signed-off-by: Max <max@nextcloud.com>
03bd0d1 to
e9f6220
Compare
| @reload="onReload" | ||
| @resolved="localChange = ''" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are not handling these in other uses of the editor component yet. Namely direct editing and createEditor
Reconnect to a new session but remember the local change. Show a conflict between the remote session and the local change. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
e9f6220 to
e302ce3
Compare
Conflicts with unsaved changes in indexed db work differently. When the file is overwritten on the server while editing the editing session keeps going and the new file version is shown read only. When opening the file and a conflicting version is found in indexed db that local version is shown read only allowing to connect to a new session. Signed-off-by: Max <max@nextcloud.com>
e302ce3 to
5051e03
Compare
TODOs
base_version_etagas custom property to IndexedDBbaseVersionEtagas part of create requestbaseVersionEtag.