Fix broken editor when AI features are disabled#23192
Open
leonidasmi wants to merge 2 commits intofeature/content-plannerfrom
Open
Fix broken editor when AI features are disabled#23192leonidasmi wants to merge 2 commits intofeature/content-plannerfrom
leonidasmi wants to merge 2 commits intofeature/content-plannerfrom
Conversation
Coverage Report for CI Build 2Coverage decreased (-0.005%) to 53.559%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
content-suggestionblock, because the latter doesn't useselect(STORE_NAME_AI)which is the culprit of the bug.your site doesn't include supportmessage for those blocks if we ever disable AI features and to keep them live and working.select(STORE_NAME_AI)usage in that block, we have to do the same safeguard then.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Without this PR:
TypeError: Cannot destructure property 'isUsageCountLimitReached' of 'select(...)' as it is undefinedconsole errorTypeError: Cannot read properties of undefined (reading 'selectHasAiGeneratorConsent'console errorThe "yoast-content-planner" plugin has encountered an error and cannot be renderederror at the top of the editorThe "yoast-content-planner" plugin has encountered an error and cannot be renderederror at the top of the editorWith this PR:
your site doesn't include support for the "yoast/content-planner-banner" block. You can leave it as-is or remove it.Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand commited the results, if my PR introduces new images or SVGs.Innovation
innovationlabel.Fixes #