Skip to content
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

add fallback to isAiFeatureEnabled #21882

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

vraja-pro
Copy link
Contributor

@vraja-pro vraja-pro commented Dec 2, 2024

Context

Summary

This PR can be summarized in the following changelog entry:

  • Refactor check for if AI Feature is enabled.

Relevant technical choices:

  • Moved the check from free to premium since it's a premium feature.
  • Kept the original check as fallback.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Without Premium edit a post and check you have a Tab called "SEO analysis" that contain the analysis and a tab for "Premium SEO analysis" which is used as an upsell button.
  • Enable Yoast Premium and check the tab label of "Premium SEO analysis" now contains the analysis and the "SEO analysis" is no longer there.
  • Enable the AI feature and edit a post, check you can see the Fix assessments AI button when editing.
  • Go to Yoast SEO -> Settings -> Site features and disable the AI feature.
  • Edit a post and check you can't see the sparkle AI button anymore.
  • Repeat test with https://github.com/Yoast/wordpress-seo-premium/pull/4529

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

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

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched of
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #21632

@vraja-pro vraja-pro added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Dec 2, 2024
@vraja-pro vraja-pro added this to the feature/plugin-fixes milestone Dec 2, 2024
@coveralls
Copy link

coveralls commented Dec 2, 2024

Pull Request Test Coverage Report for Build 72cba33fad4193fedf671b5f99eb466751efb907

Details

  • 1 of 5 (20.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.003%) to 54.383%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/components/contentAnalysis/SeoAnalysis.js 0 2 0.0%
packages/js/src/redux/selectors/preferences.js 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
packages/js/src/components/contentAnalysis/SeoAnalysis.js 1 0.0%
Totals Coverage Status
Change from base Build b602854da9bd10c690131950c0472809c3328df6: -0.003%
Covered Lines: 29939
Relevant Lines: 55466

💛 - Coveralls

@vraja-pro vraja-pro linked an issue Dec 2, 2024 that may be closed by this pull request
@pls78 pls78 force-pushed the feature/plugin-fixes branch from ce4d990 to 3997998 Compare December 4, 2024 13:48
@enricobattocchi enricobattocchi changed the base branch from feature/plugin-fixes to trunk December 6, 2024 11:13
@enricobattocchi enricobattocchi removed this from the feature/plugin-fixes milestone Dec 6, 2024
@vraja-pro vraja-pro force-pushed the 21632-refactor-isaifeatureactive-property branch 2 times, most recently from 408e788 to 989fd3b Compare December 6, 2024 11:39
@vraja-pro vraja-pro force-pushed the 21632-refactor-isaifeatureactive-property branch from 989fd3b to ebd11ac Compare December 13, 2024 09:56
Copy link
Member

@pls78 pls78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acc: ⚠️
Both the SEO Analysis and the Premium SEO analysis are shown in the sidebar.
Screenshot 2024-12-20 at 15 19 13

@pls78 pls78 added this to the 24.2 milestone Dec 20, 2024
Copy link
Member

@pls78 pls78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR && Acc: ✅

@pls78 pls78 merged commit 3e0db5e into trunk Dec 20, 2024
17 checks passed
@pls78 pls78 deleted the 21632-refactor-isaifeatureactive-property branch December 20, 2024 15:50
@mhkuu mhkuu modified the milestones: 24.2, 24.3 Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor isAiFeatureActive property
5 participants