@@ -47,43 +47,8 @@ Features:
47
47
- Deletion API for old snapshots & steps.
48
48
- Transform the document server-side, enabling easy AI interoperation.
49
49
50
- Features that could be added later:
51
-
52
- - Offline editing support: cache the document and local changes in
53
- ` sessionStorage ` and sync when back online (only for active browser tab).
54
- - Also save snapshots (but not local edits) to ` localStorage ` so new tabs
55
- can see and edit documents offline (but won't see edits from other tabs
56
- until they're back online).
57
- - Configuration for debouncing syncing steps (to reduce function calls).
58
- - Option to write the concrete value each time a delta is submitted.
59
- - Pluggable storage for ReactNative, assuming single-session.
60
- - Warning when closing tab with unsynced changes (works by default?).
61
- - Convert it to a ProseMirror plugin instead of a Tiptap extension, so raw
62
- ProseMirror usecases can also use it.
63
- - Handling edge cases, such as old clients with local changes on top of an older
64
- version of the document where the steps necessary for them to rebase their
65
- changes have since been vacuumed.
66
- - Type parameter for the document ID for more type safety for folks using Convex
67
- IDs as their document IDs. This is available on the server but not browser.
68
- - Drop clientIds entirely and just use two UUIDs locally to differentiate our
69
- changes from server-applied changes.
70
- - Add an optional authorId to the data model to track who made which changes.
71
-
72
- Missing features that aren't currently planned:
73
-
74
- - Supporting documents larger than 1 Megabyte.
75
- - Offline support that syncs changes between browser tabs or peer-to-peer.
76
- - Syncing Yjs documents instead of ProseMirror steps. That would be done by a
77
- different Yjs-specific component.
78
- - Syncing presence (e.g. showing other users' names and cursor in the UI). This
79
- is another thing a Yjs-oriented ProseMirror component could tackle.
80
- - Callback to confirm rebases and handle failures in the client (during sync).
81
- - Optimization to sync a snapshot instead of many deltas when an old client
82
- reconnects and doesn't have local changes.
83
- - Handling multiple AsyncStorage instances that are restored from the same
84
- cloud backup, leading to multiple clients with the same clientID. For now,
85
- we'll assume that AsyncStorage is only used by one client at a time.
86
-
50
+ See [ below] ( #future-features ) for future feature ideas and
51
+ [ CONTRIBUTING.md] ( ./CONTRIBUTING.md ) for how to contribute.
87
52
Found a bug? Feature request? [ File it here] ( https://github.com/get-convex/prosemirror-sync/issues ) .
88
53
89
54
## Pre-requisite: Convex
@@ -309,6 +274,45 @@ await prosemirrorSync.transform(ctx, id, schema, (doc, v) => {
309
274
});
310
275
```
311
276
277
+ ## Future features
278
+
279
+ Features that could be added later:
280
+
281
+ - Offline editing support: cache the document and local changes in
282
+ ` sessionStorage ` and sync when back online (only for active browser tab).
283
+ - Also save snapshots (but not local edits) to ` localStorage ` so new tabs
284
+ can see and edit documents offline (but won't see edits from other tabs
285
+ until they're back online).
286
+ - Configuration for debouncing syncing steps (to reduce function calls).
287
+ - Option to write the concrete value each time a delta is submitted.
288
+ - Pluggable storage for ReactNative, assuming single-session.
289
+ - Warning when closing tab with unsynced changes (works by default?).
290
+ - Convert it to a ProseMirror plugin instead of a Tiptap extension, so raw
291
+ ProseMirror usecases can also use it.
292
+ - Handling edge cases, such as old clients with local changes on top of an older
293
+ version of the document where the steps necessary for them to rebase their
294
+ changes have since been vacuumed.
295
+ - Type parameter for the document ID for more type safety for folks using Convex
296
+ IDs as their document IDs. This is available on the server but not browser.
297
+ - Drop clientIds entirely and just use two UUIDs locally to differentiate our
298
+ changes from server-applied changes.
299
+ - Add an optional authorId to the data model to track who made which changes.
300
+
301
+ Missing features that aren't currently planned:
302
+
303
+ - Supporting documents larger than 1 Megabyte.
304
+ - Offline support that syncs changes between browser tabs or peer-to-peer.
305
+ - Syncing Yjs documents instead of ProseMirror steps. That would be done by a
306
+ different Yjs-specific component.
307
+ - Syncing presence (e.g. showing other users' names and cursor in the UI). This
308
+ is another thing a Yjs-oriented ProseMirror component could tackle.
309
+ - Callback to confirm rebases and handle failures in the client (during sync).
310
+ - Optimization to sync a snapshot instead of many deltas when an old client
311
+ reconnects and doesn't have local changes.
312
+ - Handling multiple AsyncStorage instances that are restored from the same
313
+ cloud backup, leading to multiple clients with the same clientID. For now,
314
+ we'll assume that AsyncStorage is only used by one client at a time.
315
+
312
316
<!-- END: Include on https://convex.dev/components -->
313
317
314
318
## Running the example locally
0 commit comments