-
Notifications
You must be signed in to change notification settings - Fork 109
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
Open
max-nextcloud
wants to merge
20
commits into
main
Choose a base branch
from
enh/y-indexeddb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
enh/y indexeddb #7621
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Merged
0a18ad3 to
d1d57d9
Compare
d1d57d9 to
f8e013c
Compare
Member
Turns out this already happens and we don't have to change anything:
|
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>
f8e013c to
b9d99f2
Compare
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>
b9d99f2 to
5c0e437
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODOs
base_version_etagas custom property to IndexedDBbaseVersionEtagas part of create requestbaseVersionEtag.