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

Stop showing zero notification bubble outside yoast pages #21784

Conversation

leonidasmi
Copy link
Contributor

@leonidasmi leonidasmi commented Oct 31, 2024

Context

Summary

This PR can be summarized in the following changelog entry:

  • Fixes an unreleased bug, where a bubble with zero notifications would be shown outside Yoast pages.

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:

  • Make sure that you have no errors/notifications in the General page
  • Confirm that you see no notification bubble in the admin bar:
    image
  • Go to a non-Yoast page, eg. the plugins page
  • Confirm again that you see no notification bubble in the admin bar.
  • Go to a Yoast page, eg. the Yoast settings page
  • Confirm again that you see no notification bubble in the admin bar
  • Repeat the tests above, but this time while having at least one error/notification

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.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

Check adminbar behavior:

  • Create an empty post with a keyphrase and visit the frrontend
  • Confirm that the topbar shows the red mark, both for sites where the have zero notifications in the admin, and for sites that have at least one notification in the admin
  • Go to a network admin site and confirm that there is never a notification bubble on the topbar
  • Log in as a contributor and confirm that there is never a notification bubble on the topbar.
  • As an admin, use the test helper to enable books and movies. Once you do, confirm that
    • a notification was added to inform users that an extra post type was added, prompting them to go to settings
    • a pop-up was also added, with the There is a new notification message:
      image

Regression test updating counters in the new General page:

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.

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/1944

@leonidasmi leonidasmi changed the base branch from trunk to release/23.8 October 31, 2024 10:51
@coveralls
Copy link

Pull Request Test Coverage Report for Build d1a0b83e05dacbf3692a89b34745336a35ca1eb1

Details

  • 1 of 8 (12.5%) changed or added relevant lines in 2 files are covered.
  • 117 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.02%) to 54.654%

Changes Missing Coverage Covered Lines Changed/Added Lines %
inc/class-wpseo-admin-bar-menu.php 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
admin/views/partial-notifications-errors.php 1 0.0%
inc/class-wpseo-admin-bar-menu.php 1 12.28%
packages/js/src/first-time-configuration/tailwind-components/steps/indexation/indexation-step.js 3 0.0%
packages/js/src/ai-assessment-fixes/components/ai-assessment-fixes-button.js 6 82.95%
packages/js/src/initializers/post-scraper.js 106 0.0%
Totals Coverage Status
Change from base Build 78f4f018d05786dcd50911c7fb975c6e5e6df347: 0.02%
Covered Lines: 29712
Relevant Lines: 54652

💛 - Coveralls

@leonidasmi leonidasmi marked this pull request as ready for review October 31, 2024 11:15
@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Oct 31, 2024
@leonidasmi leonidasmi added this to the 23.8 milestone Oct 31, 2024
@vraja-pro
Copy link
Contributor

CR & AC ✅

@vraja-pro vraja-pro merged commit 1e49922 into release/23.8 Oct 31, 2024
35 checks passed
@vraja-pro vraja-pro deleted the 1944---notification-count-0-is-shown-on-pages-not-related-to-yoast branch October 31, 2024 13:10
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.

3 participants