You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When trying to implement editor specific features, having the ability to edit the commandStack is a very useful feature. There are already undo and redo methods, but no restoration of a stack from external sources, like backups. A very common feature generally considered a requirement for modern editors is the ability to restore dirty states without saving.
Describe the solution you'd like
The commandStack should be serializable so that a set of changes can be restored from a backup/cache, including restoring commandStack history.
Describe alternatives you've considered
Overwriting the commandStack module is an approach I could look into, but plugins shouldn't change core functionality due to compatibility issues. However other than that it would be a very reasonable approach.
I have thought about monitoring the _stack member and editing it externally along with any other relevant members, however this can cause unexpected results as it is not intended usage and therefore not well documented.
Additional context
I do recognize that command contexts are complex javascript objects and may not always be serializable, so adding a requirement to make it serializable is a breaking change. However I would still suggest this because I would argue scope dependent callbacks can and should always be avoided, especially since the context is supposed to be static. Also it would only be a breaking change if serialize and deserialize methods were used, which could be labeled unstable instead.
The text was updated successfully, but these errors were encountered:
Thanks for reporting! That's a valid feature request. We also heard in the past, that serializing the command would be very helpful. One another usage would be collaboration across multiple editors.
Is your feature request related to a problem? Please describe.
When trying to implement editor specific features, having the ability to edit the commandStack is a very useful feature. There are already undo and redo methods, but no restoration of a stack from external sources, like backups. A very common feature generally considered a requirement for modern editors is the ability to restore dirty states without saving.
Describe the solution you'd like
The commandStack should be serializable so that a set of changes can be restored from a backup/cache, including restoring commandStack history.
Describe alternatives you've considered
Overwriting the commandStack module is an approach I could look into, but plugins shouldn't change core functionality due to compatibility issues. However other than that it would be a very reasonable approach.
I have thought about monitoring the
_stack
member and editing it externally along with any other relevant members, however this can cause unexpected results as it is not intended usage and therefore not well documented.Additional context
I do recognize that command contexts are complex javascript objects and may not always be serializable, so adding a requirement to make it serializable is a breaking change. However I would still suggest this because I would argue scope dependent callbacks can and should always be avoided, especially since the context is supposed to be static. Also it would only be a breaking change if serialize and deserialize methods were used, which could be labeled unstable instead.
The text was updated successfully, but these errors were encountered: