Skip to content

Add a check to remove optimisation notification for unindexed objects below threshold#19023

Open
iolandasequino wants to merge 7 commits intofeature/SEO-optimization-thresholdfrom
PC-684-do-not-show-optimization-notification-below-indexables-threshold
Open

Add a check to remove optimisation notification for unindexed objects below threshold#19023
iolandasequino wants to merge 7 commits intofeature/SEO-optimization-thresholdfrom
PC-684-do-not-show-optimization-notification-below-indexables-threshold

Conversation

@iolandasequino
Copy link
Copy Markdown
Contributor

@iolandasequino iolandasequino commented Sep 30, 2022

Context

Summary

This PR can be summarized in the following changelog entry:

  • Adds a check to remove the optimization notification in case the unindexed objects are below 10 or below the 4% 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:

Test instructions are based on the Extended test plan and adapted to the purposes of this PR.

  • Build and activate Yoast SEO Free

  • Install and open Sequel Pro on your laptop to access the indexed database (here the instructions on how to connect to the database)

  • Install and activate Yoast Test Helper

  • Install and activate Transients Manager in your Wordpress plugins

  • Make sure your site has at least 276 posts (you can add them by using Fakerpress)

  • Running the first time configuration should not be necessary since the posts are automatically indexed when they are created through Fakerpress

  • To make sure that your posts are indexed, check that they appear in the database. Otherwise, run the first time configuration

  • Go to the Yoast Test tools and press the Reset notifications button in the Yoast SEO menu

  • Follow these instructions to unindex your posts for the scenarios described below

Test a scenario where the site has just been optimised

Note: make sure that all your indexables are indexed. You can do so by pressing the Reset the Indexables & table migrations button in the Yoast SEO menu and then running the first time configuration optimisation

  • Confirm that you don't see a notification to optimise the site

Test a scenario where the number of unindexed posts is less than 10

Note: make sure that all your indexables are indexed. You can do so by pressing the Reset the Indexables & table migrations button in the Yoast SEO menu and then running the first time configuration optimisation

  • Go to the Yoast Test tools and press the Reset notifications button in the Yoast SEO menu
  • Unindex 3 posts from your site and then delete all the transients (using the Delete all button)
  • Confirm that you don't see a notification to optimise the site

Test a scenario where the number of unindexed posts is more than 10 but less than 4% of the total number of site posts

Note: make sure that all your indexables are indexed. You can do so by pressing the Reset the Indexables & table migrations button in the Yoast SEO menu and then running the first time configuration optimisation

  • Go to the Yoast Test tools and press the Reset notifications button in the Yoast SEO menu
  • Unindex 11 posts from your site and then delete all the transients (using the Delete all button)
  • Confirm that you don't see a notification to optimise the site

Test a scenario where the number of unindexed posts is more than 4% of the total number of site posts

Note: make sure that all your indexables are indexed. You can do so by pressing the Reset the Indexables & table migrations button in the Yoast SEO menu and then running the first time configuration optimisation

  • Go to the Yoast Test tools and press the Reset notifications button in the Yoast SEO menu
  • Unindex more than 4% of the your indexables (you can compute the number by checking how many indexables you have in the database and then do (indexables number/100)*4)
  • Delete all the transients (using the Delete all button)
  • Confirm that you see a notification to optimise the site

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-684

@iolandasequino iolandasequino changed the title add check to remove optimisation notification if the unindexed object… Add a check to remove optimisation notification for indexed objects Sep 30, 2022
@iolandasequino iolandasequino changed the title Add a check to remove optimisation notification for indexed objects Add a check to remove optimisation notification for indexed objects below threshold Sep 30, 2022
@iolandasequino iolandasequino changed the title Add a check to remove optimisation notification for indexed objects below threshold Add a check to remove optimisation notification for unindexed objects below threshold Sep 30, 2022
…-not-show-optimization-notification-below-indexables-threshold
@iolandasequino iolandasequino changed the base branch from trunk to feature/SEO-optimization-threshold October 4, 2022 10:54
@iolandasequino iolandasequino added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Oct 5, 2022
iolse and others added 4 commits October 10, 2022 10:28
…/wordpress-seo into PC-684-do-not-show-optimization-notification-below-indexables-threshold
…/wordpress-seo into PC-684-do-not-show-optimization-notification-below-indexables-threshold
…/wordpress-seo into PC-684-do-not-show-optimization-notification-below-indexables-threshold
@iolandasequino iolandasequino added the UI change PRs that result in a change in the UI label Oct 13, 2022
Copy link
Copy Markdown
Contributor

@hansjovis hansjovis left a comment

Choose a reason for hiding this comment

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

Code looks good and clean to me!

…om/Yoast/wordpress-seo into PC-684-do-not-show-optimization-notification-below-indexables-threshold
@marinakoleva
Copy link
Copy Markdown
Contributor

Acceptance testing:

  • I couldn't get the notification to show up when more than 4% of the posts are unindexed.

  • Also, a question about 2 other conditions:

    • when the number of unindexed posts is more than 10 but less than 4%, the notification doesn’t appear, but the SEO data optimization button is available
    • while when the number of unindexed posts is less than 10 (and less than 4%), the notification doesn’t appear, and neither does the SEO data optimization button, i.e. there is the SEO data optimization complete feedback
      Is this expected?

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 UI change PRs that result in a change in the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants