-
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
Navigation editor: Fix content mode #56856
Conversation
Size Change: +6 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and this resolves the problem.
Thank you for the quick fix.
Please do merge and I will go ahead and write some e2e tests to provide coverage on these unique features to avoid future regressions.
Flaky tests detected in 428cc01. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7127485535
|
In #56000 we move the "content mode" enabling of the navigation block editor from the site editor to the editor provider but we introduced a subtle race condition, where the "content mode" was not set properly if the "blocks" were not set yet in the "BlockEditorProvider".
This PR fixes that by moving that hook under the "BlockEditorProvider" in the block tree and also updates to be reactive, as soon as the root block clientId changes, it retrievers the "content mode".
Testing instructions