-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Editor: All references to blocks should be accounted for in history #12327
Comments
Am I correct in thinking that this could apply to any state which holds a reference to a block's This would include:
|
Am I correct in thinking that this could apply to any state which holds a reference to a block's clientId? Yes, 👍 |
I think it's more accurate to consider this a bug. The issue has manifested itself in a few forms:
|
@youknowriad Is this still relevant after #17824? |
Maybe not, I was only aware of the selection. I think we can close and reopen specific issues if needed. |
Right now, if we edit blocks, the history (undo/redo) is kept in the redux store using the
withHistory
higher-order reducer. But only theblocks
substate is kept in the history while the block selection is not. Which means if we trigger undo/redo we can potentially end up with a state tree where the blockSelection points to a non-existing block. (For example a block that was removed by undoing a change).We should explore whether moving the block selection reducer inside the
withHistory
Higher-order reducer could solve these issues and which side-effects it would have on the undo/redo behavior.Related #12214
The text was updated successfully, but these errors were encountered: