Skip to content

Added support for publication icon in the welcome emails renderer#27268

Merged
troyciesco merged 2 commits intomainfrom
chris-ny-1214-support-publication-icon-in-the-email-renderer
Apr 9, 2026
Merged

Added support for publication icon in the welcome emails renderer#27268
troyciesco merged 2 commits intomainfrom
chris-ny-1214-support-publication-icon-in-the-email-renderer

Conversation

@cmraible
Copy link
Copy Markdown
Collaborator

@cmraible cmraible commented Apr 9, 2026

closes https://linear.app/ghost/issue/NY-1214/

This wires up the welcome email renderer to conditionally include the site's publication icon in the header. If the publication icon exists, and the show_header_icon email design setting is enabled, it will render the publication icon in the welcome emails.

This only updates the renderer; a forthcoming PR will add the toggle to the customize modal.

If you'd rather listen to this PR:

PR.27268.mp4

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cb2e130b-09fe-414b-b7f0-11a75d76853f

📥 Commits

Reviewing files that changed from the base of the PR and between 1b35519 and 17d5dbc.

📒 Files selected for processing (3)
  • ghost/core/core/server/services/member-welcome-emails/member-welcome-email-renderer.js
  • ghost/core/core/server/services/member-welcome-emails/service.js
  • ghost/core/test/unit/server/services/member-welcome-emails/member-welcome-email-renderer.test.js
✅ Files skipped from review due to trivial changes (2)
  • ghost/core/core/server/services/member-welcome-emails/service.js
  • ghost/core/test/unit/server/services/member-welcome-emails/member-welcome-email-renderer.test.js

Walkthrough

The pull request makes member welcome emails aware of a publication icon. The renderer computes showHeaderIcon (true only if designSettings.show_header_icon is not false and siteSettings.iconUrl is truthy), includes showHeaderIcon in the template context, and updates hasHeaderContent to account for the icon. The service's #getSiteSettings() now reads icon from settings and exposes iconUrl (via urlUtils.urlFor('image', {image: icon}, true) or null). Tests add an iconUrl fixture value and three cases covering enabled/disabled/missing icon scenarios.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding support for publication icons in welcome email rendering, which directly corresponds to the changeset modifications.
Description check ✅ Passed The description is directly related to the changeset, explaining the feature (conditionally rendering publication icons in welcome emails based on settings) and implementation scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chris-ny-1214-support-publication-icon-in-the-email-renderer

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.

@cmraible cmraible marked this pull request as ready for review April 9, 2026 02:54
@cmraible
Copy link
Copy Markdown
Collaborator Author

cmraible commented Apr 9, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cmraible cmraible requested a review from troyciesco April 9, 2026 03:21
@cmraible cmraible added the ok to merge for me You can merge this on my behalf if you want. label Apr 9, 2026
Base automatically changed from chris-ny-1213-add-migration-for-publication-icon-storage to main April 9, 2026 14:46
ref https://linear.app/ghost/issue/NY-1214/

- welcome emails already persisted the publication icon setting in the shared email design data
- wiring the renderer to pass icon state and icon URL lets welcome emails match newsletter header behavior
- focused renderer tests cover enabled, disabled, and missing-icon cases so the shared wrapper contract stays protected
@troyciesco troyciesco force-pushed the chris-ny-1214-support-publication-icon-in-the-email-renderer branch from 1b35519 to 17d5dbc Compare April 9, 2026 15:57
closes
https://linear.app/ghost/issue/NY-1215/add-publication-icon-to-the-customization-modal

Adds a publication icon toggle to the welcome email customize modal when
a site icon is configured, and updates the preview and save payload to
match.

Also fixes the related acceptance test to mock the missing paid welcome
email row that gets created during save.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
15.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@troyciesco troyciesco merged commit 0198561 into main Apr 9, 2026
36 of 37 checks passed
@troyciesco troyciesco deleted the chris-ny-1214-support-publication-icon-in-the-email-renderer branch April 9, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok to merge for me You can merge this on my behalf if you want.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants