Skip to content

Conversation

leonidasmi
Copy link
Contributor

@leonidasmi leonidasmi commented Aug 20, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Adds the Black Friday announcement modal.

Relevant technical choices:

  • The biggest change here is that we now add multiple initial components in the introduction's initialize. In order for that to work, we had to decouple the Content component and make it into separate components for each introduction.
  • We then let the already-existing infrastructure to show only the component with the biggest priority - this infrastructure hasn't been battle tested in the wild, so let's be critical and vigilant in testing.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

new Time_Interval( \gmmktime( 10, 00, 00, 11, 28, 2024 ), \gmmktime( 10, 00, 00, 12, 3, 2026 ) )
  • Go to any Yoast page and confirm that you see the Black Friday promotion modal (Image pending from Brand team)
    • Confirm that the shortlink in the buttons is yoa.st/black-friday-modal-ecommerce when Woo is enabled and yoa.st/black-friday-modal-premium when Woo is not
    • Confirm that the data-ctb-id is c7e7baa1-2020-420c-a427-89701700b607 when Woo is enabled and f6a84663-465f-4cb5-8ba5-f7a6d72224b2 when not.
    • Check both when Woo is enabled and not, to check both designs.
  • Refresh the page and confirm that you now see the AI Brand Insights modal
    • Compare it with how it looks with the production versions and confirm it looks exactly the same, as well as having the same links. Also confirm that the close button actually closes the modal
  • Now reset the _yoast_wpseo_introductions usermeta and activate Premium
  • Go to any Yoast page and confirm that you see the AI Brand Insights modal only
  • Deactivate Premium, go to a Yoast page and confirm that you now see the BF modal
  • Now reset usermeta and revert the /src/promotions/domain/black-friday-promotion.php code
  • You should see the AI Brand Insights modal once and only once
  • Re-add the /src/promotions/domain/black-friday-promotion.php code and confirm that you now will see the BF modal once again.
  • Reset usermeta and go straight to the FTC page (/wp-admin/admin.php?page=wpseo_dashboard#/first-time-configuration)
    • Confirm that you dont see any modal
  • Go to any other Yoast page and confirm that the first time you will see the BF modal and the next time you will see the AI Insights modal.

Regression test:

  • For devs: in packages\js\src\introductions\initialize.js, change the "ai-brand-insights-pre-launch": AiBrandInsightsPreLaunch, line into "google-docs-addon-upsell": GoogleDocsAddonUpsell, (and add import { GoogleDocsAddonUpsell } from "./components/modals/google-docs-addon-upsell"; in the imports). Then in src\introductions\application\ai-brand-insights-pre-launch.php return false in the should_show() function and in src\introductions\application\google-docs-addon-upsell.php return return $this->current_page_helper->is_yoast_seo_page() in that same function.
    • go to a Yoast page and confirm that you see the Google Add-on modal
    • compare it with how it looks with the production versions and confirm it looks exactly the same, as well as having the same links. Also confirm that the close button actually closes the modal
    • repeat the test with Premium enabled.
  • Also regression test Stops showing the introduction modals in the FTC #22489

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:

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 #

…make alternating through introductions easier
@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Aug 20, 2025
@leonidasmi leonidasmi added this to the feature/bf-2025 milestone Aug 20, 2025
@coveralls
Copy link

coveralls commented Aug 20, 2025

Pull Request Test Coverage Report for Build e6a7e0b80499bdb8a730b54214937f6933fbef32

Details

  • 23 of 69 (33.33%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on 746-black-friday-ads-2025---announcement-modal at 41.435%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/introductions/user-interface/introductions-integration.php 10 12 83.33%
src/introductions/application/black-friday-announcement.php 10 13 76.92%
packages/js/src/introductions/components/modals/ai-brand-insights-pre-launch.js 0 6 0.0%
packages/js/src/introductions/components/modals/google-docs-addon-upsell.js 0 12 0.0%
packages/js/src/introductions/components/modals/black-friday-announcement.js 0 23 0.0%
Totals Coverage Status
Change from base Build bff8b27b5ad182052331cc6c9ffb6daa9e42599a: 41.4%
Covered Lines: 21982
Relevant Lines: 49851

💛 - Coveralls

… future and create the new BF one as prioritized
Copy link

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

@leonidasmi leonidasmi force-pushed the 746-black-friday-ads-2025---announcement-modal branch from faa1047 to 6e7bafb Compare August 20, 2025 12:26
@leonidasmi leonidasmi marked this pull request as ready for review August 21, 2025 06:41
Copy link
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.

Acc 👍 two tiny suggestions.

return isWooEnabled ? "yst-woo-introduction-gradient" : "yst-introduction-gradient";
}, [ isWooEnabled ] );

const ctb = useMemo( () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const ctb = useMemo( () => {
const ctbId = useMemo( () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed here.

Copy link
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.

CR + ACC 👍

@thijsoo thijsoo merged commit d676124 into feature/bf-2025 Aug 21, 2025
36 of 37 checks passed
@thijsoo thijsoo deleted the 746-black-friday-ads-2025---announcement-modal branch August 21, 2025 13:22
@leonidasmi leonidasmi mentioned this pull request Aug 22, 2025
17 tasks
@pls78 pls78 mentioned this pull request Aug 26, 2025
17 tasks
@pls78 pls78 modified the milestones: feature/bf-2025, 25.9 Aug 26, 2025
@enricobattocchi enricobattocchi mentioned this pull request Aug 27, 2025
17 tasks
@enricobattocchi enricobattocchi added this to the 25.9 milestone Aug 28, 2025
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.

5 participants