Skip to content

Adapt admin sidebar and footer upsell#22488

Merged
thijsoo merged 33 commits intotrunkfrom
adapt-admin-sidebar-and-footer-upsell
Aug 12, 2025
Merged

Adapt admin sidebar and footer upsell#22488
thijsoo merged 33 commits intotrunkfrom
adapt-admin-sidebar-and-footer-upsell

Conversation

@pls78
Copy link
Copy Markdown
Member

@pls78 pls78 commented Aug 8, 2025

Context

  • We want to update our Premium ads to reflect the new pricing scheme.

Summary

This PR can be summarized in the following changelog entry:

  • Updates ads to reflect the new pricing scheme.

Relevant technical choices:

  • Please note there are some small differences between the ads shown in the Tools page and the ones shown in the other pages. This is because the Tools page is plain html + css, while General, Settings, and Support pages uses React and Tailwind (see this Slack Thread).
  • I replicated the responsiveness of the React ad footer in the Tools page by adding a @media css directive.
  • I removed a check about the Black Friday promotion in packages/js/src/shared-admin/components/premium-upsell-list.js because adding the new check about WooCommerce would require some refactoring and I didn't have time to do that in this issue. That check is going to be re-instated in the dedicated BF ads issue.

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 you don't have Premium nor WooCommerce installed
  • Visit the following pages:
    • General
    • Settings
    • Tools
    • Support ( sidebar ad only)
      and verify the footer and sidebar ads are about Yoast SEO Premium and follow the designs here
  • Now install and activate WooCommerce
    • Visit the aforementioned pages and verify:
      • the footer and sidebar ads are about Yoast WooCommerce SEO and follow the designs here
      • the footer button shortlink is yoa.st/admin-footer-upsell-woocommerce
      • the sidebar button shortlink is yoa.st/admin-sidebar-upsell-woocommerce
  • Install and activate Yoast SEO Premium
    • Verify you don't get any ads (except for the sidebar one in Tools, which we still show - also in production)

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:

  • N/A

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 #715

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 8, 2025

Pull Request Test Coverage Report for Build 0898b1d39f803f41af8a0a3a23eee0cd30aa4c32

Details

  • 19 of 171 (11.11%) changed or added relevant lines in 12 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 52.846%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/general/components/connected-premium-upsell-list.js 0 2 0.0%
packages/js/src/general/components/sidebar-layout.js 0 2 0.0%
packages/js/src/shared-admin/components/premium-upsell-list.js 1 3 33.33%
packages/js/src/support/app.js 0 2 0.0%
packages/js/src/settings/app.js 0 3 0.0%
packages/js/src/shared-admin/components/premium-upsell-card.js 1 6 16.67%
packages/js/src/helpers/get-premium-benefits.js 4 10 40.0%
admin/class-premium-upsell-admin-block.php 0 53 0.0%
src/presenters/admin/sidebar-presenter.php 0 77 0.0%
Files with Coverage Reduction New Missed Lines %
src/presenters/admin/sidebar-presenter.php 1 0.0%
packages/js/src/shared-admin/components/premium-upsell-card.js 1 11.11%
Totals Coverage Status
Change from base Build 584e6cb981859da7e911b811e118f3226cf35a32: -0.04%
Covered Lines: 31240
Relevant Lines: 59768

💛 - Coveralls

@pls78 pls78 added the changelog: other Needs to be included in the 'Other' category in the changelog label Aug 11, 2025
@pls78 pls78 marked this pull request as ready for review August 11, 2025 22:52
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo left a comment

Choose a reason for hiding this comment

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

Some comments 🚧

Comment thread packages/js/src/shared-admin/components/premium-upsell-list.js Outdated
Comment thread src/presenters/admin/sidebar-presenter.php Outdated
Comment thread admin/class-premium-upsell-admin-block.php Outdated
Comment thread admin/class-premium-upsell-admin-block.php Outdated
Comment thread admin/class-premium-upsell-admin-block.php
Comment thread css/src/yst_plugin_tools.css Outdated
}

.yoast-sidebar__product .yoast-button-upsell {
background-color: rgb(252, 211, 77);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is also #fcd34d which we use in other places. so might wan to use that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is amber-300 from Tailwind. Could go @apply yst-bg-amber-300;

Comment thread css/src/yst_plugin_tools.css Outdated
Comment thread css/src/yst_plugin_tools.css Outdated
Comment thread css/src/yst_plugin_tools.css Outdated
margin-top: 0.3em;
font-size: 1.7em;
font-weight: bold;
color: rgb(166, 30, 105);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

#a61e69 also this? 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is our primary-500, so could go @apply yst-text-primary-500;

@thijsoo thijsoo force-pushed the adapt-admin-sidebar-and-footer-upsell branch from c537e04 to 3b6c784 Compare August 12, 2025 10:29
@thijsoo thijsoo added this to the 25.8 milestone Aug 12, 2025
@thijsoo thijsoo merged commit 9656a9a into trunk Aug 12, 2025
40 checks passed
@thijsoo thijsoo deleted the adapt-admin-sidebar-and-footer-upsell branch August 12, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: other Needs to be included in the 'Other' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants