Skip to content

Improves the feedback for passive voice and consecutive sentences assessments#22194

Merged
agnieszkaszuba merged 2 commits intotrunkfrom
fix/passive-and-consecutive-feedback-texts
Apr 14, 2025
Merged

Improves the feedback for passive voice and consecutive sentences assessments#22194
agnieszkaszuba merged 2 commits intotrunkfrom
fix/passive-and-consecutive-feedback-texts

Conversation

@mhkuu
Copy link
Copy Markdown
Contributor

@mhkuu mhkuu commented Apr 14, 2025

Context

  • We want to change the 'good' feedback for the passive voice and consecutive sentences assessments, because after Always show readability assessments #22156 they are also shown when there is little to no text in the post.

Summary

This PR can be summarized in the following changelog entry:

  • Improves the feedback texts for the passive voice and consecutive sentences assessments in case there is nothing to report.
  • [shopify-seo] Improves the feedback texts for the passive voice and consecutive sentences assessments in case there is nothing to report.
  • [yoastseo] Improves the feedback texts for the passive voice and consecutive sentences assessments in case there is nothing to report.

Relevant technical choices:

  • Improved the JSDoc for the passive voice assessment while at it.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Posts in WordPress

  • Activate Yoast SEO and Yoast SEO Premium
  • Create a new post without any content
Passive voice assessment
  • Confirm that the passive voice assessment returns a green traffic light with the following feedback: Passive voice: You are not using too much passive voice. That's great! (this is the changed behavior from this PR!)
  • Add the following sentence: "The mouse is eaten by the cat."
  • Confirm that the traffic light turns red and the assessment shows the following feedback: Passive voice: 100% of the sentences contain passive voice, which is more than the recommended maximum of 10%. Try to use their active counterparts.
  • Remove all text from the post.
Consecutive sentences assessment
  • Confirm that the consecutive sentences assessment returns a green traffic light with the following feedback: Consecutive sentences: There are no repetitive sentence beginnings. That's great! (this is the changed behavior from this PR!)
  • Add the following sentences to the text: "Cats are beautiful. Cats are adorable. Cats are the best animals."
  • Confirm that the traffic light turns red and the assessment shows the following feedback: Consecutive sentences: The text contains 3 consecutive sentences starting with the same word. Try to mix things up!
  • Remove all text from the post.

Shopify

  • Create a product with no content
  • Repeat the steps to test the passive voice assessment (the consecutive sentences assessment is not available on products).
  • Create a collection with no content
  • Repeat the steps to test the consecutive sentences assessment

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:

  • No further impact.

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. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.
    • See the assessment documentation.

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 off.
  • 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 https://github.com/Yoast/plugins-automated-testing/issues/2229

@mhkuu mhkuu added changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog Shopify This PR impacts Shopify. labels Apr 14, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 13578827bfeec99e5fc56177f1036b509b7777ad

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 57.733%

Totals Coverage Status
Change from base Build a77ef3d3d26dc76dee7f6b2382e028afd46cac28: 0.001%
Covered Lines: 13544
Relevant Lines: 23140

💛 - Coveralls

@mhkuu mhkuu requested a review from Copilot April 14, 2025 08:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

@mhkuu mhkuu marked this pull request as ready for review April 14, 2025 08:53
@agnieszkaszuba agnieszkaszuba added this to the 25.0 milestone Apr 14, 2025
@agnieszkaszuba
Copy link
Copy Markdown
Contributor

CR & acceptance: 💯
I only adapted the Shopify test instructions as the consecutive sentences assessment is not available for products.

@agnieszkaszuba agnieszkaszuba merged commit b621a63 into trunk Apr 14, 2025
25 checks passed
@agnieszkaszuba agnieszkaszuba deleted the fix/passive-and-consecutive-feedback-texts branch April 14, 2025 13:29
@mhkuu
Copy link
Copy Markdown
Contributor Author

mhkuu commented Apr 14, 2025

Ha, good catch! 👍

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 Shopify This PR impacts Shopify.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants