[x] I documented the TypeScript code using JSDoc style.
[x] I added multiple screenshots/screencasts of my UI changes
[x] I translated all the newly inserted strings into German and English (NA)
Motivation and Context
In realtime collaboration, it helps if changes made by one collaborator are visible to other collaborators continuously, i.e. when moving or resizing an element.
Description
This PR adds APIs to Apollon to allow tracking and syncing continuous patches during moving and resizing of elements. The feature is opt-in (off by default for previous consumers of Apollon), as continuous patches need to be throttled and are ok to miss, unlike discrete patches, and syncing continuous change might require more sophisticated reconciliation mechanisms and backpressure handling that consumers might not have implemented.
Specifically the following APIs are added:
subscribeToAllModelChangePatches(callback: (patch: Patch) => void): number
This will emit patches for all changes, whether they are discrete or continuous (previous API, subscribeToModelChangePatches(), only emits patches for discrete changes).
subscribeToModelContinuousChangePatches(callback: (patch: Patch) => void): number
This will emit patches for continuous changes, and is useful for when consumers want to handle discrete and continuous changes via different channels.
All of these new subscription options can be unsubscribed using the already existing unsubscribeFromModelChangePatches() method.
Checklist
I translated all the newly inserted strings into German and English(NA)Motivation and Context
In realtime collaboration, it helps if changes made by one collaborator are visible to other collaborators continuously, i.e. when moving or resizing an element.
Description
This PR adds APIs to Apollon to allow tracking and syncing continuous patches during moving and resizing of elements. The feature is opt-in (off by default for previous consumers of Apollon), as continuous patches need to be throttled and are ok to miss, unlike discrete patches, and syncing continuous change might require more sophisticated reconciliation mechanisms and backpressure handling that consumers might not have implemented.
Specifically the following APIs are added:
This will emit patches for all changes, whether they are discrete or continuous (previous API,
subscribeToModelChangePatches()
, only emits patches for discrete changes).This will emit patches for continuous changes, and is useful for when consumers want to handle discrete and continuous changes via different channels.
All of these new subscription options can be unsubscribed using the already existing
unsubscribeFromModelChangePatches()
method.Steps for Testing
subscribeToAllModelChangePatches()
instead.Test Coverage
Screenshots