Skip to content

PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold#19032

Merged
agnieszkaszuba merged 11 commits intofeature/SEO-optimization-thresholdfrom
PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold
Oct 10, 2022
Merged

PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold#19032
agnieszkaszuba merged 11 commits intofeature/SEO-optimization-thresholdfrom
PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold

Conversation

@hdvos
Copy link
Copy Markdown
Contributor

@hdvos hdvos commented Oct 5, 2022

Context

  • In the light of the new indexbles page, the start SEO data optimization-button will be hidden if only a few indexables are unindexed. Threshold: less than 10 indexables or less than 4% of the indexables (whichever is higher).
  • The function that implements this threshold has been created in: Add helpers for indexables button #19019

Summary

This PR can be summarized in the following changelog entry:

  • Hides the SEO data optimisation button in tools if the amount of unindexed indexables is below a threshold.
  • [yoastseo] Hides the SEO data optimisation button in tools if the amount of unindexed indexables is below a threshold.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

See this page on how to un-index a post.

Scenario 1: Un-indexing fewer than 10 indexables
  • Go to Yoast SEO -> Tools
  • If the Start SEO data optimization-button appears, click it to make sure everything is indexed.
  • Un-index fewer than 10 posts.
  • Go to Yoast SEO -> Tools.
  • Make sure that the Optimize SEO Data-action gives the following feedback:
    • SEO data is already optimized
  • Un-index about half of your all posts.
  • Go to Yoast SEO -> Tools.
  • Make sure the Start SEO data optimization-button appears.
  • Click the button.
  • Make sure that after indexing you get the following feedback:
    • SEO data optimization complete
Scenario 2: Un-indexing fewer than 4% of the indexables (but more than 10 indexables)
  • Make sure your site has at least 500 indexables (you can do so by using Generate Dummy posts, or by generating posts with FakerPress) and make sure that all posts are indexed.
  • Un-index between 10 and 20 posts.
  • Go to Yoast SEO -> Tools.
  • Make sure that the Optimize SEO Data-action gives the following feedback:
    • SEO data is already optimized
  • Un-index about half of your all posts.
  • Go to Yoast SEO -> Tools.
  • Make sure the Start SEO data optimization-button appears.
  • Click the button.
  • Make sure that after indexing you get the following feedback:
    • SEO data optimization complete
Scenario 3: upgrade to premium
  • Make sure Premium is not installed
  • Make sure that all content is indexed.
  • un-index 5 posts (or any other amount that is below the threshold)
  • Go to Yoast SEO -> Tools.
  • Make sure the button does not appear.
  • Install and activate premium
  • Go to Yoast SEO -> Tools.
  • Make sure the button appears.
Scenario 4: Change permalink structure
  • Make sure that all content is indexed.
  • un-index 5 posts (or any other amount that is below the threshold)
  • Go to Yoast SEO -> Tools.
  • Make sure the button does not appear.
  • Change the permalink structure:
    • settings -> permalinks -> select a different bullet in commin settings -> save
  • Go to Yoast SEO -> Tools.
  • Make sure the button appears.
Scenario 5: Import posts
  • Make sure that all content is indexed.
  • un-index 5 posts (or any other amount that is below the threshold)
  • Go to Yoast SEO -> Tools.
  • Make sure the button does not appear.
  • Import 50 posts or generate 50 posts with FakerPress
  • Make sure that the posts are automatically indexed (check that they appear in the database)
  • Go to Yoast SEO -> Tools.
  • Make sure the button does not appear.

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 (Block/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.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • 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 off.
  • I have written this PR in accordance with my team's definition of done.

Fixes https://yoast.atlassian.net/browse/PC-683?atlOrigin=eyJpIjoiZWI0NTgwNzE3MTgyNDQ1Nzg2ZDI4NDllMDgzOTBjYmMiLCJwIjoiaiJ9

@hdvos hdvos changed the base branch from trunk to feature/SEO-optimization-threshold October 6, 2022 08:31
@hdvos hdvos added changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog UI change PRs that result in a change in the UI labels Oct 6, 2022
@hdvos hdvos marked this pull request as ready for review October 7, 2022 12:09
Copy link
Copy Markdown
Contributor

@agnieszkaszuba agnieszkaszuba left a comment

Choose a reason for hiding this comment

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

CR: Looks good, I just have one naming change suggestion

Comment thread src/integrations/admin/indexing-tool-integration.php Outdated
…/wordpress-seo into PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold
@agnieszkaszuba
Copy link
Copy Markdown
Contributor

Acceptance: 💯

@agnieszkaszuba agnieszkaszuba merged commit efad108 into feature/SEO-optimization-threshold Oct 10, 2022
@agnieszkaszuba agnieszkaszuba deleted the PC-683-hide-seo-optimization-button-from-yoast-seo-tools-page-when-amount-of-unindexed-indexables-falls-below-threshold branch October 10, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog UI change PRs that result in a change in the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants