Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS editor history actions. #409

Closed
Pavel910 opened this issue Dec 31, 2018 · 0 comments
Closed

CMS editor history actions. #409

Pavel910 opened this issue Dec 31, 2018 · 0 comments
Assignees
Projects

Comments

@Pavel910
Copy link
Collaborator

Pavel910 commented Dec 31, 2018

Sometimes when undoing/redoing, elements get messed up especially when manipulating row columns. A possible cause is the fact that when manipulating columns multiple actions are dispatched during a single "manipulation", thus making history middleware create states that are incomplete.

Things to inspect:

  • see which element plugins dispatch multiple actions during one transaction
  • try refactoring code to make row/column elements more dependent on each other but handle the entire logic in the Row plugin to avoid dispatching multiple actions.
  • if all else fails, try adding a commit changes action that will trigger history middleware (maybe this is the best way to begin with?) (this doesn't work)

Implementation

Delete/Drop logic must work with a single action dispatch, meaning, once an element is dropped or deleted - plugins must modify the parent element and return the new data which will then be set using update element action at once. That way we avoid multiple history triggers.

@Pavel910 Pavel910 self-assigned this Dec 31, 2018
@Pavel910 Pavel910 changed the title CMS editor history debug. CMS editor history actions. Jan 1, 2019
@Pavel910 Pavel910 added this to Done in PageBuilder via automation Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
PageBuilder
  
Done
Development

No branches or pull requests

1 participant