-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Editor: Initialize blocks state by RESET_BLOCKS #11641
Copy link
Copy link
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Package] Editor/packages/editor/packages/editor[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Package] Editor/packages/editor/packages/editor[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently, blocks state is "reset" in response to two separate actions
RESET_BLOCKSandSETUP_EDITOR_STATE.gutenberg/packages/editor/src/store/reducer.js
Lines 292 to 293 in 005c790
gutenberg/packages/editor/src/store/reducer.js
Lines 395 to 396 in 005c790
If possible, we should seek to refactor the
SETUP_EDITOReffect handler to dispatchresetBlocksdirectly such that it would only be necessary to cover theRESET_BLOCKSaction type from the reducer.