Closed
Description
Allow multiple list CRDTs to share a CPositionSource
, possibly across linked documents (#262).
E.g.:
- When a text CRDT grows beyond a certain point, it is retired (becomes delete-only) and new text CRDTs are defined on top of fractions of the document. New insertions go in those fractional documents; a user only needs to load the original document and the fraction they are currently using.
- Suggestions on a text document go in a separate document with its own text CRDT for new text. Users with suggestion-only access get edit access to the latter document and a base
CPositionSource
in a 3rd document, but not the original text CRDT's document.
(Can we make this work for multiple CRichTexts as well, including formatting spans?)
LocalList
gets partway there but not all the way.
Some specific changes needed:
- Individual list CRDTs allow specifying a
CPositionSource
, and also expose theirs. - Delete
newLocalList()
methods? (If fully redundant) - Get rid of Create-as-insert opt in
CValueList
. - Ensure CPositionSource doesn’t have any mutable state besides the abstract tree structure that might confuse sharers. E.g., the current delete counts would break
CValueList
merging if a separate list modified them. -
CPositionSource.compare
function, in case you want to opt out of whatever the list CRDTs are doing.
This feature is not critical, but it would be nice to implement it sooner because it will break backwards compatibility for saved states.