Skip to content

Conversation

@peterzimon
Copy link
Contributor

ref https://linear.app/ghost/issue/DES-1169/email-cta-for-signups-lacks-contrast-when-received-in-dark-mode

  • The transactional member emails had a problem that whenever the accent color was set to pure black, the contrast on the buttons was low. After experimenting with various solutions, it seems like the most reliable one is to restrict the available modes in Apple Mail to light only.

peterzimon and others added 2 commits December 8, 2025 16:55
ref https://linear.app/ghost/issue/DES-1169/email-cta-for-signups-lacks-contrast-when-received-in-dark-mode

- The transactional member emails had a problem that whenever the accent color was set to pure black, the contrast on the buttons was low. After experimenting with various solutions, it seems like the most reliable one is to restrict the available modes in Apple Mail to light only.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Walkthrough

This pull request adds color scheme metadata to five email template files within the Ghost member services. Each file receives two identical meta tags in the HTML head section: one declaring color-scheme set to "light only" and another declaring supported-color-schemes set to "light". The changes are purely additive, with no modifications to logic, control flow, or public APIs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Notes:

  • Homogeneous, repetitive change applied uniformly across five email template files
  • Only static metadata additions to HTML head; no functional or behavioral modifications
  • Consistency check across all five files is straightforward given the identical nature of edits

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: adding color-scheme meta tags to restrict member emails to light mode only across five email templates.
Description check ✅ Passed The description clearly relates to the changeset by explaining the problem context (low contrast buttons in dark mode) and the solution (restricting to light mode only), referencing a specific issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch restrict-member-emails-light-mode-only

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a8a9c0 and d6f0e27.

📒 Files selected for processing (5)
  • ghost/core/core/server/services/members/emails/signin.js (1 hunks)
  • ghost/core/core/server/services/members/emails/signup-paid.js (1 hunks)
  • ghost/core/core/server/services/members/emails/signup.js (1 hunks)
  • ghost/core/core/server/services/members/emails/subscribe.js (1 hunks)
  • ghost/core/core/server/services/members/emails/update-email.js (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 23824
File: ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs:919-926
Timestamp: 2025-06-13T11:57:58.226Z
Learning: In `ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs`, some style blocks (e.g., `.latest-post p` and `.latest-post p a`) still use the legacy colour `#73818c` on purpose; they are later overridden by `emailCustomization` feature rules, as noted by inline TODO comments. These occurrences should not be flagged as inconsistencies.
📚 Learning: 2025-06-13T11:57:58.226Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 23824
File: ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs:919-926
Timestamp: 2025-06-13T11:57:58.226Z
Learning: In `ghost/core/core/server/services/email-service/email-templates/partials/styles.hbs`, some style blocks (e.g., `.latest-post p` and `.latest-post p a`) still use the legacy colour `#73818c` on purpose; they are later overridden by `emailCustomization` feature rules, as noted by inline TODO comments. These occurrences should not be flagged as inconsistencies.

Applied to files:

  • ghost/core/core/server/services/members/emails/update-email.js
  • ghost/core/core/server/services/members/emails/subscribe.js
  • ghost/core/core/server/services/members/emails/signup-paid.js
  • ghost/core/core/server/services/members/emails/signin.js
  • ghost/core/core/server/services/members/emails/signup.js
📚 Learning: 2025-06-10T11:07:10.800Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 23770
File: apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModalLabs.tsx:435-450
Timestamp: 2025-06-10T11:07:10.800Z
Learning: In Ghost's newsletter customization features, when promoting a feature from alpha to beta status, the feature flag guards are updated to make the feature available under both the `emailCustomization` (beta) and `emailCustomizationAlpha` (alpha) flags. This is done by either removing conditional guards entirely when the component is already behind both flags, or by updating conditionals to check for either flag.

Applied to files:

  • ghost/core/core/server/services/members/emails/signup-paid.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: E2E Tests (Ember 4/4)
  • GitHub Check: [Optional] E2E Tests (React 3/4)
  • GitHub Check: E2E Tests (Ember 3/4)
  • GitHub Check: [Optional] E2E Tests (React 4/4)
  • GitHub Check: [Optional] E2E Tests (React 2/4)
  • GitHub Check: E2E Tests (Ember 2/4)
  • GitHub Check: E2E Tests (Ember 1/4)
  • GitHub Check: [Optional] E2E Tests (React 1/4)
  • GitHub Check: Inspect Docker Image
  • GitHub Check: Ghost-CLI tests
  • GitHub Check: Legacy tests (Node 22.18.0, mysql8)
  • GitHub Check: Unit tests (Node 22.18.0)
🔇 Additional comments (5)
ghost/core/core/server/services/members/emails/subscribe.js (1)

7-8: Light-mode meta tags correctly added to subscribe email

The color-scheme and supported-color-schemes meta tags are correctly placed in the <head> and match the intent to keep this transactional email in light mode only. No issues from a template or HTML-structure standpoint.

ghost/core/core/server/services/members/emails/signup-paid.js (1)

7-8: Consistent light-mode meta configuration for paid signup email

The new color-scheme and supported-color-schemes meta tags are correctly inserted in the head and kept consistent with the other member templates, which should give uniform light-only behavior across these emails.

ghost/core/core/server/services/members/emails/update-email.js (1)

7-8: LGTM for light-only meta in update-email template

The light-only color scheme meta tags are correctly added and keep this confirmation email aligned with the rest of the member transactional templates. No further changes needed here.

ghost/core/core/server/services/members/emails/signup.js (1)

7-8: Signup email head metadata updated correctly for light mode

The new color-scheme and supported-color-schemes meta tags are correctly added before the <title> and match the pattern used in the other updated templates, supporting the light-only rendering goal.

ghost/core/core/server/services/members/emails/signin.js (1)

8-9: Signin template now aligned with light-only color scheme

The added color-scheme and supported-color-schemes metas are correctly positioned in the head and consistent with the other member email templates, so signin messages should now respect the same light-only behavior.


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.

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.

3 participants