Marks add a way to attach a ScalarValues to a specific range of a Sequence, differentiated by a key.
Overlapping marks with the same key are merged, upon conflict they are resolved in a deterministic, but unspecified way.
How marks expand to cover more of the Sequence when the Sequence is modified is configurable to include additions in front, in the back, both or none.
Using them for atom start and stop, paragraph speaker, etc would be possible, but not provide any immediately obvious benefit, as these properties have a rigid structure for us and are always present. On the contrary, using marks would mean additional steps required to convert the automerge document into one slate can handle.
We might want to look at marks again, when we add things like comments or actual rich-text formatting, which they seem more suitable for.
Marks add a way to attach a
ScalarValue
s to a specific range of aSequence
, differentiated by akey
. Overlapping marks with the samekey
are merged, upon conflict they are resolved in a deterministic, but unspecified way. How marks expand to cover more of theSequence
when theSequence
is modified is configurable to include additions in front, in the back, both or none.Using them for atom start and stop, paragraph speaker, etc would be possible, but not provide any immediately obvious benefit, as these properties have a rigid structure for us and are always present. On the contrary, using marks would mean additional steps required to convert the automerge document into one slate can handle.
We might want to look at marks again, when we add things like comments or actual rich-text formatting, which they seem more suitable for.