Skip to content

Updated member email editor to support more cards#26671

Merged
9larsons merged 2 commits intomainfrom
update-member-email-editor
Mar 3, 2026
Merged

Updated member email editor to support more cards#26671
9larsons merged 2 commits intomainfrom
update-member-email-editor

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

@9larsons 9larsons commented Mar 3, 2026

no ref

This contains some changes to support additions within the Koenig repo:

  • embed cards
  • youtube cards
  • restricting width for image cards

9larsons added 2 commits March 3, 2026 11:15
no ref

This contains some changes to support additions within the Koenig repo:
- embed cards
- youtube cards
- restricting width for image cards
@9larsons 9larsons marked this pull request as ready for review March 3, 2026 17:53
@9larsons 9larsons changed the title Update member email editor Updated member email editor to support more cards Mar 3, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 3, 2026

Walkthrough

This pull request updates the member email editor functionality and dependencies. The member email editor component now includes configuration for email-type editors with image width constraints and conditionally injects an embed plugin when a feature flag is enabled. The @tryghost/koenig-lexical package dependency is bumped from 1.7.17 to 1.7.18 across two package.json files. Additionally, CSS styling rules are added to the member welcome email template to support gallery containers, gallery images with responsive sizing and optional rounded corners, NFT and Twitter link elements, and audio thumbnails with accent color styling.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the purpose and impact of the changes, such as what functionality the editor updates enable.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'Update member email editor' directly matches the main changes in the PR, which update the member email editor component with new configuration and capabilities.

✏️ 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 update-member-email-editor

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@ghost/core/core/server/services/member-welcome-emails/email-templates/partials/card-styles.hbs`:
- Around line 227-248: Replace the hard-coded dark color (`#15212A`) in the
.kg-nft-link and .kg-twitter-link rules with a theme-aware value so links remain
readable when backgroundIsDark is enabled: detect the existing backgroundIsDark
flag or template helper used in these email templates and output a
conditional/color variable (or inherit the surrounding text color) instead of
forcing `#15212A` for .kg-nft-link and .kg-twitter-link, ensuring the links use
the dark-theme link color when backgroundIsDark is true and the default
otherwise.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8eb03f and b7e0e21.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx
  • apps/admin/package.json
  • ghost/admin/package.json
  • ghost/core/core/server/services/member-welcome-emails/email-templates/partials/card-styles.hbs

Comment on lines +227 to +248
.kg-nft-link {
display: block;
text-decoration: none !important;
color: #15212A !important;
font-family: inherit !important;
font-size: 14px;
line-height: 1.3em;
padding-top: 4px;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 4px;
}

.kg-twitter-link {
display: block;
text-decoration: none !important;
color: #15212A !important;
font-family: inherit !important;
font-size: 15px;
padding: 8px;
line-height: 1.3em;
}
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.

⚠️ Potential issue | 🟠 Major

Use theme-aware link colors for dark-background emails.

Line 230 and Line 243 force dark text (#15212A), which can become unreadable when backgroundIsDark is enabled.

🎯 Proposed fix
 .kg-nft-link {
     display: block;
     text-decoration: none !important;
-    color: `#15212A` !important;
+    color: {{`#if` backgroundIsDark}}#ffffff{{else}}#15212A{{/if}} !important;
     font-family: inherit !important;
     font-size: 14px;
     line-height: 1.3em;
     padding-top: 4px;
@@
 .kg-twitter-link {
     display: block;
     text-decoration: none !important;
-    color: `#15212A` !important;
+    color: {{`#if` backgroundIsDark}}#ffffff{{else}}#15212A{{/if}} !important;
     font-family: inherit !important;
     font-size: 15px;
     padding: 8px;
     line-height: 1.3em;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.kg-nft-link {
display: block;
text-decoration: none !important;
color: #15212A !important;
font-family: inherit !important;
font-size: 14px;
line-height: 1.3em;
padding-top: 4px;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 4px;
}
.kg-twitter-link {
display: block;
text-decoration: none !important;
color: #15212A !important;
font-family: inherit !important;
font-size: 15px;
padding: 8px;
line-height: 1.3em;
}
.kg-nft-link {
display: block;
text-decoration: none !important;
color: {{`#if` backgroundIsDark}}#ffffff{{else}}#15212A{{/if}} !important;
font-family: inherit !important;
font-size: 14px;
line-height: 1.3em;
padding-top: 4px;
padding-right: 20px;
padding-left: 20px;
padding-bottom: 4px;
}
.kg-twitter-link {
display: block;
text-decoration: none !important;
color: {{`#if` backgroundIsDark}}#ffffff{{else}}#15212A{{/if}} !important;
font-family: inherit !important;
font-size: 15px;
padding: 8px;
line-height: 1.3em;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ghost/core/core/server/services/member-welcome-emails/email-templates/partials/card-styles.hbs`
around lines 227 - 248, Replace the hard-coded dark color (`#15212A`) in the
.kg-nft-link and .kg-twitter-link rules with a theme-aware value so links remain
readable when backgroundIsDark is enabled: detect the existing backgroundIsDark
flag or template helper used in these email templates and output a
conditional/color variable (or inherit the surrounding text color) instead of
forcing `#15212A` for .kg-nft-link and .kg-twitter-link, ensuring the links use
the dark-theme link color when backgroundIsDark is true and the default
otherwise.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.19%. Comparing base (9da77c9) to head (b7e0e21).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26671      +/-   ##
==========================================
+ Coverage   73.18%   73.19%   +0.01%     
==========================================
  Files        1530     1530              
  Lines      120510   120510              
  Branches    14571    14574       +3     
==========================================
+ Hits        88199    88213      +14     
+ Misses      31290    31278      -12     
+ Partials     1021     1019       -2     
Flag Coverage Δ
admin-tests 53.91% <ø> (+0.02%) ⬆️
e2e-tests 73.19% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons 9larsons merged commit 85880f6 into main Mar 3, 2026
35 checks passed
@9larsons 9larsons deleted the update-member-email-editor branch March 3, 2026 19:26
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