mml-io / mml

Metaverse Markup Language
https://mml.io
MIT License
120 stars 13 forks source link

Fix NetworkedDOM element syncing (#176) #180

Closed MarcusLongmuir closed 2 months ago

MarcusLongmuir commented 2 months ago

Fixes #176.

This PR addresses a class of issues where if multiple mutations occurred in a single tick (e.g. append an element to multiple parents one after the other) they could cause errors in the ObservableDOM handling because the inferred state from a single mutation would conflict with the handling of a subsequent mutation.

This is a complication that is tracked in #100.

This PR also adds tests to avoid regressions on this behaviour and integration tests that assert the state of the client NetworkedDOMWebsocket match the state of the server document NetworkedDOMDocument


What kind of changes does your PR introduce? (check at least one)

Does your PR introduce a breaking change? (check one)

Does your PR fulfill the following requirements?