Skip to content

Added support for CTA and product cards in email editor#1754

Merged
EvanHahn merged 1 commit intomainfrom
evanhahn-ny-1123-support-for-call-to-action-product-gif-cards
Mar 4, 2026
Merged

Added support for CTA and product cards in email editor#1754
EvanHahn merged 1 commit intomainfrom
evanhahn-ny-1123-support-for-call-to-action-product-gif-cards

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

@EvanHahn EvanHahn commented Mar 4, 2026

ref https://linear.app/ghost/issue/NY-1123


Note

Medium Risk
Expands the email editor’s allowed node/plugin set, which can affect card insertion/serialization and email rendering behavior. Changes are localized but touch core editor configuration and e2e coverage.

Overview
Enables Call to action and Product cards in the email editor by adding CallToActionNode/ProductNode to EMAIL_EDITOR_NODES and wiring CallToActionPlugin/ProductPlugin into the email editor demo setup.

Exports ProductPlugin from the package entrypoint and extends the email editor Playwright suite to assert both cards can be inserted via the slash menu.

Written by Cursor Bugbot for commit 2c08ac1. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87984e82-a10d-447b-93af-804b3466b7f4

📥 Commits

Reviewing files that changed from the base of the PR and between 34aa42c and 2c08ac1.

📒 Files selected for processing (4)
  • packages/koenig-lexical/demo/DemoApp.jsx
  • packages/koenig-lexical/src/index.js
  • packages/koenig-lexical/src/nodes/EmailEditorNodes.js
  • packages/koenig-lexical/test/e2e/editors/email-editor.test.js

Walkthrough

This PR introduces CallToAction and Product plugins/nodes to the Koenig lexical editor. Changes include: adding CallToActionPlugin and ProductPlugin imports to DemoApp.jsx for rendering in the editor UI, exporting ProductPlugin from the public API in index.js, registering CallToActionNode and ProductNode in the email editor nodes configuration, and adding test cases to validate insertion of both new card types via the slash menu.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding support for CTA and product cards in the email editor, which aligns with the core modifications across all files.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding CallToActionNode/ProductNode to the email editor and the associated wiring and exports.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch evanhahn-ny-1123-support-for-call-to-action-product-gif-cards

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@EvanHahn EvanHahn merged commit 2aaf5e9 into main Mar 4, 2026
3 checks passed
@EvanHahn EvanHahn deleted the evanhahn-ny-1123-support-for-call-to-action-product-gif-cards branch March 4, 2026 18:03
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant