[x] I documented the TypeScript code using JSDoc style. (NA)
[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
Currently, incoming patches that resize elements with child elements might result in further layout changes (to fix child element layout), which erroneously would cause further patches to be issued by the recipient client, putting collaboration peers in a dead lock (continuously patching each other, not allowing the actual resize to happen).
Description
With this fix, the layouter code is completely removed from the patcher service. Based on prior optimisations, this doesn't seem to break any layouts while importing patches.
Use Apollon.subscribeToAllModelPatches() method for syncing patches.
Open two clients in collaboration mode.
Create elements with child elements (e.g. a Class node).
Resize the parent element.
Without this change, you will get a deadlock. With this change, resizing is smoothly synced between clients.
Caveat
This solution has the downside that importing some patches can actually result in broken diagram layout. Previously, the patcher service would have prevented this. This might specifically happen when two clients are greatly out of sync and for some reason they receive patches from each other.
Checklist
I documented the TypeScript code using JSDoc style.(NA)I translated all the newly inserted strings into German and English(NA)Motivation and Context
Currently, incoming patches that resize elements with child elements might result in further layout changes (to fix child element layout), which erroneously would cause further patches to be issued by the recipient client, putting collaboration peers in a dead lock (continuously patching each other, not allowing the actual resize to happen).
Description
With this fix, the layouter code is completely removed from the patcher service. Based on prior optimisations, this doesn't seem to break any layouts while importing patches.
Steps for Testing
Apollon.subscribeToAllModelPatches()
method for syncing patches.Class
node).Without this change, you will get a deadlock. With this change, resizing is smoothly synced between clients.
Caveat
This solution has the downside that importing some patches can actually result in broken diagram layout. Previously, the patcher service would have prevented this. This might specifically happen when two clients are greatly out of sync and for some reason they receive patches from each other.
Test Coverage
Some code was removed, so coverage is unaffected.
Screenshots
Before:
After: