Skip to content

feat: restore EditorIntro section in classic and Elementor editors#23267

Merged
FAMarfuaty merged 7 commits into
feature/editor-focus-keyphrase-redesign-newfrom
1215-restore-the-introduction-section-in-the-classic-and-elementor-editors
May 21, 2026
Merged

feat: restore EditorIntro section in classic and Elementor editors#23267
FAMarfuaty merged 7 commits into
feature/editor-focus-keyphrase-redesign-newfrom
1215-restore-the-introduction-section-in-the-classic-and-elementor-editors

Conversation

@vraja-pro
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro commented May 13, 2026

Context

  • We want to restore the editor intro.

Summary

This PR can be summarized in the following changelog entry:

  • Adds the editor intro of the Yoast Icon and intro text to Yoast Elementor integration and in Yoast editor in classic editor.

Relevant technical choices:

  • Centralizes spacing in one place, the Editor intro section using flex.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Testing overview for the editor Intro section:

  • We want to test the Yoast editor intro section in different editors:
    • Classic editor
    • Elementor editor
    • Block editor - sidebar and metabox

Key tests:

  • ADS TEST - We want to test with ads - ad appears between Yoast icon and intro text.
    • Black friday ad
    • Webinar ad
  • SPACING - We want to test the spacing between elements in the intro section are 12 px.
  • INTRO LOGO - Test the intro section has Yoast logo.
  • INTRO TEXT - We want to test the intro text changes to Optimize your content for discovery. and no "Get content suggestions" and we have INTRO LOGO.
  • AI INTRO - We want to test the intro text changes to Optimize your content for discovery or get new content suggestions. with "Get content suggestions" button under it.

Block editor

  • Deactivate Premium.
  • Edit a post in block editor and open yoast editor in sidebar and check AI INTRO TEXT.
  • Check metabox has AI INTRO and SPACING.
  • Edit a page and open the block editor sidebar and check INTRO TEXT and check SPACING.
  • Check metabox INTRO TEXT and check SPACING.
  • Enable the Webinar ad by changing the user meta _yoast_alerts_dismissed to:
    a:1:{s:26:"webinar-promo-notification";b:0;}
  • Edit the page again open the yoast editor in the sidebar and check ADS TEST and SPACING and INTRO TEXT.
  • Edit a post and open the yoast editor in the sidebar, check ADS TEST and SPACING and AI INTRO.
  • Trigger the Black Friday ad by changing the date in src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:
new Time_Interval( \gmmktime( 10, 00, 00, 3, 20, 2025 ), \gmmktime( 10, 00, 00, 3, 30, 2027 ) ),                           
  • Edit the page again open the yoast editor in the sidebar and check ADS TEST and SPACING and INTRO TEXT.
  • Check metabox ADS TEST and INTRO TEXT and SPACING.
  • Edit a post and open the yoast editor in the sidebar, check ADS TEST and SPACING and AI INTRO.
  • Check metabox ADS TEST and AI INTRO and SPACING.

Classic editor

  • Deactivate Premium edit a post in classic editor.
  • Check metabox has INTRO LOGO, INTRO TEXT and check SPACING.
  • Trigger the Black Friday ad by changing the date in src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:
new Time_Interval( \gmmktime( 10, 00, 00, 3, 20, 2025 ), \gmmktime( 10, 00, 00, 3, 30, 2027 ) ),                           
  • Check metabox ADS TEST and INTRO TEXT and SPACING.

Elementor editor

  • Deactivate Premium edit a post in elementor.
  • Check elementor sidebar for INTRO LOGO, INTRO TEXT and check SPACING.
  • Trigger the Black Friday ad by changing the date in src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:
new Time_Interval( \gmmktime( 10, 00, 00, 3, 20, 2025 ), \gmmktime( 10, 00, 00, 3, 30, 2027 ) ),                           
  • Check elementor sidebar ADS TEST and INTRO TEXT and SPACING.

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:

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.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on 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.
  • I have run grunt build:images and committed the results, if my PR introduces or edits images or SVGs.

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/reserved-tasks/issues/1215

@vraja-pro vraja-pro added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label May 13, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented May 13, 2026

Coverage Report for CI Build 0

Coverage increased (+0.02%) to 53.879%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (3 of 4 lines covered, 75.0%).
  • 3 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
packages/js/src/components/EditorIntro.js 4 3 75.0%

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
packages/js/src/components/BlackFridayPromotion.js 2 0.0%
packages/js/src/containers/PersistentDismissableNotification.js 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 68233
Covered Lines: 36567
Line Coverage: 53.59%
Relevant Branches: 17025
Covered Branches: 9369
Branch Coverage: 55.03%
Branches in Coverage %: Yes
Coverage Strength: 44086.11 hits per line

💛 - Coveralls

"yst-mt-6",
],
"yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm",
"yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm yst-mt-2",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The margin top here is added to compensate for the badge that overflow the ad.

@vraja-pro vraja-pro changed the base branch from feature/editor-focus-keyphrase-redesign to feature/editor-focus-keyphrase-redesign-new May 13, 2026 13:57
@vraja-pro vraja-pro requested a review from a team as a code owner May 13, 2026 13:57
vraja-pro and others added 3 commits May 13, 2026 17:03
Adds the EditorIntro component to the Elementor sidebar and restricts
withPromptForContentSuggestions to block editor only in the metabox fill.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…section

Splits EditorIntro into a layout wrapper (EditorIntro) and a text-only
component (EditorIntroText), moving withPromptForContentSuggestions and
isPost logic out of the container. Updates all fills to use the new API
and moves ContentPlannerEditorItem inside EditorIntro, removing the
separate SidebarItem for it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rActive guard

Resets EditorIntroText default margin to zero and passes context-specific
margins from each fill. Also removes the isBlockEditorActive condition
from SidebarFill since the sidebar is already block-editor-only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vraja-pro vraja-pro force-pushed the 1215-restore-the-introduction-section-in-the-classic-and-elementor-editors branch from 9f9f954 to 54fb459 Compare May 13, 2026 14:05
Uses yst-flex yst-flex-col yst-gap-3 on EditorIntro to centralize
child spacing, removing the inEditorIntro prop from BlackFridayPromotion
and PersistentDismissableNotification and all per-child margin overrides
in the fills. The yst-mt-2 on BlackFridayPromotion compensates for the
badge that overflows by 8px.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vraja-pro vraja-pro force-pushed the 1215-restore-the-introduction-section-in-the-classic-and-elementor-editors branch from 54fb459 to 04e1187 Compare May 14, 2026 06:53
@JorPV JorPV requested a review from Copilot May 18, 2026 07:55
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.

Pull request overview

Restores and standardizes the “EditorIntro” section (Yoast logo + intro messaging + optional notification/AI CTA) across Classic, Block Editor, and Elementor integrations by centralizing layout and extracting the intro text into a reusable component.

Changes:

  • Reintroduces EditorIntro in Elementor and Classic/Metabox contexts, and refactors Block Editor sidebar/metabox to use the same structure.
  • Extracts intro copy into a new EditorIntroText component and updates spacing/layout to use flex + gap.
  • Adjusts related promo/notification and AI Content Planner rendering to fit inside the intro section.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/js/src/elementor/components/fills/ElementorFill.js Adds EditorIntro (logo + notification + intro text) to the Elementor sidebar fill.
packages/js/src/containers/PersistentDismissableNotification.js Simplifies markup/classes and removes inEditorIntro handling.
packages/js/src/components/fills/SidebarFill.js Refactors sidebar intro to use EditorIntro + EditorIntroText and moves AI CTA into the intro section.
packages/js/src/components/fills/MetaboxFill.js Restores intro section in metabox (including Classic) and consolidates intro rendering.
packages/js/src/components/EditorIntro.js Refactors EditorIntro layout and introduces EditorIntroText for shared intro copy.
packages/js/src/components/BlackFridayPromotion.js Updates promotion container spacing/margins to align with the new intro layout.
packages/js/src/ai-content-planner/components/content-planner-editor-item.js Adjusts wrapper classes so spacing can be controlled by the surrounding intro layout.
Comments suppressed due to low confidence (2)

packages/js/src/components/BlackFridayPromotion.js:54

  • Badge JSX is malformed: size="small"className=... is missing a space between attributes, which will cause a syntax error and break the build. Add the missing space so size and className are separate attributes.
				<Badge size="small"className="yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2">
					{ __( "BLACK FRIDAY", "wordpress-seo" ) } </Badge>

packages/js/src/elementor/components/fills/ElementorFill.js:70

  • FirstEligibleNotification is rendered twice in Elementor: once inside the new EditorIntro (renderPriority 0) and again in the next SidebarItem (renderPriority 1). This will duplicate the promo/notification UI. Remove the second rendering (or gate it so it only renders in one place).
					<EditorIntro>
						{ FirstEligibleNotification && <FirstEligibleNotification /> }
						<EditorIntroText withPromptForContentSuggestions={ false } />
					</EditorIntro>
				</SidebarItem>
				<SidebarItem renderPriority={ 1 }>
					<Alert />
					{ FirstEligibleNotification && (
						<div className="yst-inline-block yst-px-1.5">
							<FirstEligibleNotification />
						</div>
					) }

Comment thread packages/js/src/components/EditorIntro.js Outdated
"yst-p-4",
location === "metabox" && "yst-flex yst-items-center yst-gap-3"
) }
className={ location === "metabox" ? "yst-flex yst-items-center yst-gap-3" : null }
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.

Two things on this line:

  1. Test gap. yst-p-4 has been dropped here and the component now relies on its parent EditorIntro for padding. The existing tests don't assert anything about the outer wrapper's classes — a future caller that renders ContentPlannerEditorItem outside EditorIntro will silently lose padding. Worth adding an assertion that the wrapper does not include yst-p-4 and does include the flex classes when location === "metabox".
  2. Style. className={ … ? "…" : null } works but is unconventional — prefer classNames(condition && "…") or an empty string over null to match the surrounding code.

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@JorPV JorPV 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 to address 🚧

Copy link
Copy Markdown
Contributor

@JorPV JorPV left a comment

Choose a reason for hiding this comment

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

➕ these adjustments

<EditorIntroText withPromptForContentSuggestions={ false } />
</EditorIntro>
</SidebarItem>
<SidebarItem renderPriority={ 1 }>
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.

SidebarItem at renderPriority={1}still renders FirstEligibleNotification also inside its yst-inline-block yst-px-1.5 wrapper. With Black Friday or the Webinar ad active, the user will see two copies stacked in the Elementor sidebar.

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.

image

: __( "Optimize your content for discovery.", "wordpress-seo" ) }
</p>;
};

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.

Add a minimal render test asserting the correct copy for each value

Comment thread packages/js/src/components/EditorIntro.js Outdated
vraja-pro and others added 2 commits May 19, 2026 16:19
- Use classNames() pattern instead of ternary with null in ContentPlannerEditorItem.
- Fix missing space between JSX attributes in BlackFridayPromotion.
- Remove trailing blank lines from EditorIntro.
- Remove duplicate FirstEligibleNotification render in ElementorFill.
- Fix JSDoc children type to React.ReactNode in EditorIntro.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@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.

…com:Yoast/wordpress-seo into 1215-restore-the-introduction-section-in-the-classic-and-elementor-editors
@FAMarfuaty
Copy link
Copy Markdown
Contributor

CR & AT: ✅

@FAMarfuaty FAMarfuaty merged commit 2291aae into feature/editor-focus-keyphrase-redesign-new May 21, 2026
42 checks passed
@FAMarfuaty FAMarfuaty deleted the 1215-restore-the-introduction-section-in-the-classic-and-elementor-editors branch May 21, 2026 09:00
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