Skip to content

Add in app notifications for classic editor#22223

Merged
mhkuu merged 13 commits intofeature/ai-optimize-classicfrom
230-ai-optimize-add-in-app-notifications-for-classic-editor
May 13, 2025
Merged

Add in app notifications for classic editor#22223
mhkuu merged 13 commits intofeature/ai-optimize-classicfrom
230-ai-optimize-add-in-app-notifications-for-classic-editor

Conversation

@Jordi-PV
Copy link
Copy Markdown
Contributor

@Jordi-PV Jordi-PV commented Apr 30, 2025

Important

This branch makes the introduction of AI Optimize for Classic editor and the new popover component available.

Please only take into account the following files when reviewing this PR:
packages/js/src/introductions/components/provider.js, packages/js/src/introductions/initialize.js, src/introductions/application/ai-fix-assessments-upsell.php and src/introductions/user-interface/introductions-integration.php

The rest of the changes are addressed in :

  1. Creates the popover component

Context

  • We want to show a notification and a popover introducing the new AI Optimize feature when a user opens a post in the Classic Editor for the first time since the feature becames available.

Summary

This PR can be summarized in the following changelog entry:

  • Makes sure the introduction for AI Optimize in Classic Editor can be loaded properly.
  • Removes the general introduction for the AI Optimize feature.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

Note

In order to mock the introduction, comment the code in the is_seen() function in /wordpress-seo/src/introductions/application/introductions-collector.php The notification will always be shown, but PLEASE only do AT for the notification in a POST using the Classic Editor.

	private function is_seen( $name, $metadata ) {
//		if ( \array_key_exists( $name, $metadata ) ) {
//			return (bool) $metadata[ $name ];
//		}

		return false;
	}

This PR can be acceptance tested by following these steps:

  • Please only do the CR for the changes made in src/introductions/user-interface/introductions-integration.php and src/introductions/application/ai-fix-assessments-upsell.php
  • For the Acceptance Test, please refer to the testing instructions described in the Premium PR

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:

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 ux/#230

@Jordi-PV Jordi-PV added UI change PRs that result in a change in the UI changelog: other Needs to be included in the 'Other' category in the changelog labels Apr 30, 2025
@Jordi-PV Jordi-PV requested a review from a team as a code owner April 30, 2025 15:24
@github-actions
Copy link
Copy Markdown

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.

@Jordi-PV Jordi-PV added the innovation Innovative issue. Relating to performance, memory or data-flow. label Apr 30, 2025
@Jordi-PV Jordi-PV marked this pull request as draft April 30, 2025 20:13
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2025

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.

@mhkuu mhkuu changed the base branch from trunk to feature/ai-optimize-classic May 8, 2025 07:35
@Jordi-PV Jordi-PV changed the title 230 ai optimize add in app notifications for classic editor Add in app notifications for classic editor May 8, 2025
@Jordi-PV Jordi-PV marked this pull request as ready for review May 9, 2025 10:12
mhkuu added 2 commits May 12, 2025 15:27
…ess-seo into 230-ai-optimize-add-in-app-notifications-for-classic-editor
…ess-seo into 230-ai-optimize-add-in-app-notifications-for-classic-editor
@mhkuu mhkuu added changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog and removed UI change PRs that result in a change in the UI changelog: other Needs to be included in the 'Other' category in the changelog labels May 13, 2025
@mhkuu mhkuu added this to the feature/ai-optimize-classic milestone May 13, 2025
Copy link
Copy Markdown
Contributor

@mhkuu mhkuu left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build b5c478e79a132a85220f71e06e4d6abe37f5d08b

Details

  • 1 of 4 (25.0%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.003%) to 53.032%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/introductions/components/provider.js 0 1 0.0%
packages/js/src/introductions/initialize.js 0 1 0.0%
src/introductions/application/ai-fix-assessments-upsell.php 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/introductions/application/ai-fix-assessments-upsell.php 1 58.33%
Totals Coverage Status
Change from base Build 6a5887c0d153041ab308238d38db1b601d543ce1: -0.003%
Covered Lines: 29614
Relevant Lines: 57021

💛 - Coveralls

@mhkuu mhkuu merged commit 9752237 into feature/ai-optimize-classic May 13, 2025
40 checks passed
@mhkuu mhkuu deleted the 230-ai-optimize-add-in-app-notifications-for-classic-editor branch May 13, 2025 07:23
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 innovation Innovative issue. Relating to performance, memory or data-flow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants