add support for continuous patching #334
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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