feat: restore EditorIntro section in classic and Elementor editors#23267
Conversation
Coverage Report for CI Build 0Coverage increased (+0.02%) to 53.879%Details
Uncovered Changes
Coverage Regressions3 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - 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", |
There was a problem hiding this comment.
The margin top here is added to compensate for the badge that overflow the ad.
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>
9f9f954 to
54fb459
Compare
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>
54fb459 to
04e1187
Compare
There was a problem hiding this comment.
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
EditorIntroin Elementor and Classic/Metabox contexts, and refactors Block Editor sidebar/metabox to use the same structure. - Extracts intro copy into a new
EditorIntroTextcomponent 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
BadgeJSX 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 sosizeandclassNameare 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
FirstEligibleNotificationis rendered twice in Elementor: once inside the newEditorIntro(renderPriority 0) and again in the nextSidebarItem(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>
) }
| "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 } |
There was a problem hiding this comment.
Two things on this line:
- Test gap.
yst-p-4has been dropped here and the component now relies on its parentEditorIntrofor padding. The existing tests don't assert anything about the outer wrapper's classes — a future caller that rendersContentPlannerEditorItemoutsideEditorIntrowill silently lose padding. Worth adding an assertion that the wrapper does not includeyst-p-4and does include the flex classes whenlocation === "metabox". - Style.
className={ … ? "…" : null }works but is unconventional — preferclassNames(condition && "…")or an empty string overnullto match the surrounding code.
🤖 Generated with Claude Code
JorPV
left a comment
There was a problem hiding this comment.
Some comments to address 🚧
| <EditorIntroText withPromptForContentSuggestions={ false } /> | ||
| </EditorIntro> | ||
| </SidebarItem> | ||
| <SidebarItem renderPriority={ 1 }> |
There was a problem hiding this comment.
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.
| : __( "Optimize your content for discovery.", "wordpress-seo" ) } | ||
| </p>; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Add a minimal render test asserting the correct copy for each value
- 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>
|
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
|
CR & AT: ✅ |
2291aae
into
feature/editor-focus-keyphrase-redesign-new

Context
Summary
This PR can be summarized in the following changelog entry:
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:
Testing overview for the editor Intro section:
Key tests:
Optimize your content for discovery.and no "Get content suggestions" and we have INTRO LOGO.Optimize your content for discovery or get new content suggestions.with "Get content suggestions" button under it.Block editor
_yoast_alerts_dismissedto:a:1:{s:26:"webinar-promo-notification";b:0;}src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:Classic editor
src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:Elementor editor
src/promotions/domain/black-friday-promotion.php, change only the year in the second date to 2027:Relevant test scenarios
Test instructions for QA when the code is in the RC
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
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand committed the results, if my PR introduces or edits images or SVGs.Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/1215