Conversation
|
Size Change: -45 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in ad8aecc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23142603880
|
|
Could this aggravate issues like #76025?
Just wanted to flag this as something to keep in mind. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Thanks for flagging, I believe all these issues are strongly connected together. More here: #76025 (comment) |
|
Thanks for replying there! |
|
Reading this comment I'm a bit confused if this is the right fix and if it's even needed. Can you please elaborate/follow up on what the suggested next path is for resolving #76310? |
I'd like to hear @talldan's feedback about this. In current Still even after #76305 the whole approach is very fragile. The At this moment it seems that the 7.0 branch is fixed and there is no immediate danger. |
This fixes a part of #76310. Where a newly created page has read-only content and can't be modified. How to reproduce:
RESET_BLOCKS, a big part of the block tree will stay the same, and only some of the controlled inner blocks will change. The logic in Block Editor: Optimize controlled inner blocks state churn #75458 will try to preserve the inner blocks.This happens because:
disabled, and then selectively setscontentOnlyto some of the child blocks (template parts,core/post-content). TheDisableNonPageContentBlockscomponent does this.RESET_BLOCKSwill preserve only thedisabledflag for the root block, but will remove all thecontentOnlyflags for the child blocks. They all become disabled.DisableNonPageContentBlockswill not reconstruct the block editing mode flags.I'm fixing this by:
RESET_BLOCKSDisableNonPageContentBlocks, merge allsetBlockEditingModecalls into one effects. That's somewhat inefficent, but will make sure that the rootdisabledmode is reconstructed when the block tree changes. Previously the root mode was set only on mount.There's still a second part of #76310 that's not fixed, namely failing to create the default
paragraphblock when the new page is empty. That's probably anotherRESET_BLOCKSquirk.