There are in fact two issues here:
- Usability: you can open the macro parameters modal without being aware that someone else is editing the same macro, so whoever closes the modal last overwrites the parameter changes done by the other user, without being aware of it. We could handle this in multiple ways:
- prevent multiple users from editing the parameters of a given macro at the same time (whoever opens the macro parameter modal locks it until the modal is closed)
- show a warning message on the macro parameters modal indicating that other users are editing the same macro at the same time
- enable real-time synchronization on the macro parameters editing
- Bug: When we apply patches we can modify the structure of a widget (macro) without updating the logical (JavaScript) layer. Each widget holds a reference to the DOM element representing the widget and to each nested editable or widget parts. When these DOM elements are replaced the logic layer can end up referencing stale elements that are not present anymore in the DOM, which leads to JavaScript exceptions when interacting with the widgets. Another use case is when a remote patch adds a new nested editable (e.g. the information message title, enabled by another user). In this case the editor will notice this nested editable, but the widget won't be aware of it, leading to errors. The fix is probably to re-initialize the macros whose DOM elements (not text) are affected by a remote patch.
|