Skip to content

Configure the email logo and its width, with the site name as alt text (#573) - #576

Merged
silverbackdan merged 4 commits into
mainfrom
feat/573-email-logo
Oct 31, 2026
Merged

silverbackdan merged 4 commits into
mainfrom
feat/573-email-logo

Conversation

@silverbackdan

Copy link
Copy Markdown
Collaborator

Closes #573.

Every bundle email extends emails/_template.html.twig, which hard-coded the CWA logo and alt="Logo".

  • New config emails.logo (a Twig path, default @SilverbackApiComponents/assets/images/email_logo.png) and emails.logo_width (positive integer in pixels, default null), so a 2x image renders sharp.
  • The logo's alt text is now website_name.
  • Both are passed in the context of every sender (UserMailer and the orphaned resources notification).
silverback_api_components:
    emails:
        logo: emails/logo.png   # templates/emails/logo.png
        logo_width: 200

Tests: configuration defaults and rejections, extension wiring for both senders, and Email\\EmailLogoTest asserting a sent user email and orphaned resources email embed the configured logo with alt, width and inline width: 200px.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.04%. Comparing base (7806a89) to head (43f3702).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #576   +/-   ##
=========================================
  Coverage     97.03%   97.04%           
- Complexity     5297     5298    +1     
=========================================
  Files           432      432           
  Lines         13700    13719   +19     
=========================================
+ Hits          13294    13313   +19     
  Misses          406      406           
Flag Coverage Δ
phpunit 97.04% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@silverbackdan
silverbackdan merged commit 3a21ea6 into main Oct 31, 2026
14 of 15 checks passed
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.

Email template: configurable logo and alt text (hard-coded CWA logo, alt="Logo")

1 participant