Skip to content

Block Editor: All references to blocks should be accounted for in history #12327

@youknowriad

Description

@youknowriad

Right now, if we edit blocks, the history (undo/redo) is kept in the redux store using the withHistory higher-order reducer. But only the blocks 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

Metadata

Metadata

Assignees

Labels

[Feature] HistoryHistory, undo, redo, revisions, autosave.[Type] BugAn existing feature does not function as intended[Type] Code QualityIssues or PRs that relate to code quality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions