Skip to content

Commit 90dbb32

Browse files
committed
move future features
1 parent ba1855c commit 90dbb32

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,43 +47,8 @@ Features:
4747
- Deletion API for old snapshots & steps.
4848
- Transform the document server-side, enabling easy AI interoperation.
4949

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.
8752
Found a bug? Feature request? [File it here](https://github.com/get-convex/prosemirror-sync/issues).
8853

8954
## Pre-requisite: Convex
@@ -309,6 +274,45 @@ await prosemirrorSync.transform(ctx, id, schema, (doc, v) => {
309274
});
310275
```
311276

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+
312316
<!-- END: Include on https://convex.dev/components -->
313317

314318
## Running the example locally

0 commit comments

Comments
 (0)