Set up Events
CoryDCode opened this issue · 3 comments
CoryDCode commented
We need to implement events, to support Undo functionality and cross-platform workspace replay.
CoryDCode commented
When we take a look at the design for this, we need to look into decoupling FieldVariableLayout and WorkspaceLayoutCoordinator again. We linked them as a stop-gap, but may want to decouple them with this rework, as well.
vicng commented
Things to consider during implementation:
- NSNotifications that are being generated/listened to within Blockly iOS should most likely be refactored as part of this Events implementation (eg. MutatorProcedureDefinitionLayout, WorkspaceLayoutCoordinator, ProcedureCoordinator).
- As part of this implementation, EventManager should combine events that are valid merge partners (eg. two move events on the same block that are part of the same group).
- Disabling events during undo/redo avoids echoing for the library code, but it may prevent behavior for clients that rely on automatically state based on events being re-fired. We need to figure out a consistent behavior here.