Skip to content

Describe all types of deltas #280

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

Closed
dslmeinte opened this issue May 31, 2024 · 3 comments
Closed

Describe all types of deltas #280

dslmeinte opened this issue May 31, 2024 · 3 comments

Comments

@dslmeinte
Copy link
Contributor

dslmeinte commented May 31, 2024

Get inspired by the list of messages in issue #28 , and put a description of all types of deltas in this issue.

Out of scope (for now)

  • language migration
  • versioning
  • live collaboration (e.g. "user A currently edits this node")

Open questions

Events

Parameter types

  • Node: Either the whole node as json, or its id (tbd)
  • TargetNode: Target's node as id
  • MetaPointer: MetaPointer-tuple to describe an M2 element (classifier, feature, etc.)
  • PropertyValue: Property value encoded as string
  • ResolveInfo: ResolveInfo of a reference as string
  • Index: Position inside a multiple link or annotations as integer

Partitions

Name Required Params Optional Params
addPartition newPartition: Node
removePartition removedPartition: Node or TargetNode

Nodes

Name Required Params Optional Params
changeConcept node: TargetNode
newConcept: MetaPointer
oldConcept: MetaPointer

Properties

Name Required Params Optional Params
addProperty node: TargetNode
property: MetaPointer
newValue: PropertyValue
removeProperty node: TargetNode
property: MetaPointer
oldValue: PropertyValue
changeProperty node: TargetNode
property: MetaPointer
newValue: PropertyValue
oldValue: PropertyValue

Children

Name Required Params Optional Params
addChild parent: TargetNode
newChild: Node
containment: MetaPointer
index: Index
removeChild removedChild: Node or TargetNode parent: TargetNode
containment: MetaPointer
index: Index
replaceChild // implies newChild must be new
newChild: Node
replacedChild: Node or TargetNode
parent: TargetNode
containment: MetaPointer
index: Index
moveChildFromOtherContainment newParent: TargetNode
newContainment: MetaPointer
newIndex: Index
movedChild: TargetNode
oldParent: TargetNode
oldContainment: MetaPointer
oldIndex: Index
moveChildFromOtherContainmentInSameParent newContainment: MetaPointer
newIndex: Index
movedChild: TargetNode
parent: TargetNode
oldContainment: MetaPointer
oldIndex: Index
moveChildInSameContainment newIndex: Index
movedChild: TargetNode
parent: TargetNode
containment: MetaPointer
oldIndex: Index

Annotations

Name Required Params Optional Params
addNewAnnotation parent: TargetNode
newAnnotation: Node
index: Index
removeAnnotation removedAnnotation: Node or TargetNode parent: TargetNode
index: Index
replaceAnnotation // implies newAnnotation must be new
newAnnotation: Node
replacedAnnotation: Node or TargetNode
parent: TargetNode
index: Index
moveAnnotationFromOtherParent newParent: TargetNode
newIndex: Index
movedAnnotation: TargetNode
oldParent: TargetNode
oldIndex: Index
moveAnnotationInSameParent
newIndex: Index
movedAnnotation: TargetNode
parent: TargetNode
oldIndex: Index

References

Name Required Params Optional Params
addReference parent: TargetNode
newTarget: TargetNode
newResolveInfo: ResolveInfo
reference: MetaPointer
index: Index
removeReference parent: TargetNode
reference: MetaPointer
index: Index
removedTarget: TargetNode
removedResolveInfo: ResolveInfo
changeReference parent: TargetNode
newTarget: TargetNode
newResolveInfo: ResolveInfo
reference: MetaPointer
index: Index
replacedTarget: TargetNode
replacedResolveInfo: ResolveInfo
addReferenceResolveInfo parent: TargetNode
newResolveInfo: ResolveInfo
reference: MetaPointer
index: Index
removeReferenceResolveInfo parent: TargetNode
reference: MetaPointer
index: Index
removedResolveInfo: ResolveInfo
changeReferenceResolveInfo parent: TargetNode
newResolveInfo: ResolveInfo
reference: MetaPointer
index: Index
target: TargetNode
replacedResolveInfo: ResolveInfo
addReferenceTargetId parent: TargetNode
newTargetId: TargetNode
reference: MetaPointer
index: Index
removeReferenceTargetId parent: TargetNode
reference: MetaPointer
index: Index
removedTargetId: TargetNode
changeReferenceTargetId parent: TargetNode
newTargetId: TargetNode
reference: MetaPointer
index: Index
resolveInfo: ResolveInfo
replacedTargetId: TargetNode

Composite

Name Required Params Optional Params
composite parts: Event[]
giveUpDeltasJustReload

High-level

  • undo
  • redo
@enikao
Copy link
Contributor

enikao commented Jul 5, 2024

Depends on #273 and #284

@enikao
Copy link
Contributor

enikao commented Jul 6, 2024

Writing this table in Markdown became too tedious, so I started with an AsciiDoctor version: #288 / https://github.com/LionWeb-io/specification/blob/3d05a14197189b809a17db9d889f78be1f8d2b79/delta/delta-api.adoc

@enikao
Copy link
Contributor

enikao commented Jul 19, 2024

Will add all 3 variants of moveReference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants