Disable AI Optimize button in taxonomies#22246
Merged
mhkuu merged 3 commits intofeature/ai-optimize-classicfrom May 9, 2025
Merged
Disable AI Optimize button in taxonomies#22246mhkuu merged 3 commits intofeature/ai-optimize-classicfrom
mhkuu merged 3 commits intofeature/ai-optimize-classicfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request disables the AI Optimize button for taxonomy pages by introducing an additional condition to check if the current page is a term page. Key changes include:
- Updating the helper function shouldRenderAIOptimizeButton to include the isTerm parameter.
- Modifying component logic in SeoAnalysis and ReadabilityAnalysis to respect the new isTerm condition.
- Adding new tests to verify the correct behavior when isTerm is true.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/js/tests/helpers/shouldRenderAIOptimizeButton.test.js | Added tests for the new isTerm condition. |
| packages/js/src/helpers/shouldRenderAIOptimizeButton.js | Modified function signature and logic to check isTerm. |
| packages/js/src/components/contentAnalysis/SeoAnalysis.js | Updated prop handling and logic to include isTerm. |
| packages/js/src/components/contentAnalysis/ReadabilityAnalysis.js | Updated prop handling and logic to include isTerm. |
Pull Request Test Coverage Report for Build 7890eaf6f2557c09d109ee7585efbdac80881bb8Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
mhkuu
approved these changes
May 8, 2025
Contributor
mhkuu
left a comment
There was a problem hiding this comment.
Looks good! 🎉 I'm going to remove one test case as it's superfluous.
Contributor
|
ACC: passed! 🎉 |
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:
Post_Conditional, we already ensured the AI Optimize integration is not loaded.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Test only in Free
Taxonomies
Smoke test in non-taxonomies
Smoke test in non-classic editor
Note
Smoke testing only in Free should be sufficient
Test with Premium
feature/ai-optimize-classicbranch in Premium. Refer to this page for information on how to test the AI feature in stagingTaxonomies
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/wordpress-seo-premium/issues/4614