Skip to content

Conversation

cgwrench
Copy link
Contributor

This change updates the "update email" member email so that it's styles match the "sign up", and other, member emails.

This closes #21298.

Before After
sign-up-before sign-up-after

For comparison, here's what the sign up member email currently looks like:

sign-up

Note: I couldn't see any automated tests for this member email. If I've missed these and there's a test you'd like me to add or update, please do let me know.

Note: I've changed the footer message, from "Sent to {{email}}", to "This message was sent from {{site}} to {{email}}". The later is what the other member emails have in their footers. This is the only content change I've made. The other changes are purely stylistic.

Potentially the heading should change from "Hey there," to "Hey there!". Most other member emails use "Hey there!", expect the subscribe email, which also uses "Hey there,". Let me know if you'd like me to also make this change.

closes TryGhost#21298

This change updates the "update email" member email so that it's
styles match the "sign up" and other member emails.
Copy link
Contributor

coderabbitai bot commented May 11, 2025

Walkthrough

The update modifies the email template function used for confirming member email updates. The function signature is extended to accept new optional parameters for accent color, site domain, and site URL. The email's visual design is revised: the background color is changed to white, the container width is reduced, and line height is increased. The confirmation button and links now use a customizable accent color. Responsive CSS is added for small screens, and anchor tags receive a standard color. The footer is restructured within the main table for improved semantics, with updated sender and site information.

Assessment against linked issues

Objective Addressed Explanation
Update the "Confirm your email update" template styling to match the sign-up email (Issue #21298)
Add customizable accent color and update button/link colors for consistency (Issue #21298)
Revise footer layout and content for clarity and semantic HTML (Issue #21298)
Improve responsive design and adjust text spacing, line height, and colors (Issue #21298)

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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: 0

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

119-119: Consider updating the greeting for consistency

As mentioned in the PR objectives, you might want to change "Hey there," to "Hey there!" to be consistent with most other member emails. This is the only content modification suggested in the PR description besides the footer change which has already been implemented.

-                        <p style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 20px; color: #15212A; font-weight: bold; line-height: 24px; margin: 0; margin-bottom: 15px;">${t('Hey there,')}</p>
+                        <p style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 20px; color: #15212A; font-weight: bold; line-height: 24px; margin: 0; margin-bottom: 15px;">${t('Hey there!')}</p>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3270d20 and b64067a.

📒 Files selected for processing (1)
  • ghost/core/core/server/services/members/emails/update-email.js (4 hunks)
🔇 Additional comments (11)
ghost/core/core/server/services/members/emails/update-email.js (11)

1-1: Great enhancement to the function signature!

Adding optional parameters for accentColor, siteDomain, and siteUrl with a sensible default for accentColor improves the template's flexibility and customization options, aligning with the goal of making this email consistent with other member emails.


52-55: Good responsive design improvement

Adding responsive styles for small paragraphs and links ensures better readability on mobile devices, which is essential for a good email experience across devices.


97-99: Consistent link styling

Setting a global anchor tag color helps maintain visual consistency throughout the email, which is a good design practice.


102-102: Improved visual consistency

Changing the background color to white and increasing the line height from 1.4 to 1.5em improves readability and matches the style of other member emails, as mentioned in the PR objectives.


106-106: Better container sizing

Reducing the container width from 600px to 540px provides a more focused reading experience and likely improves appearance on various devices.


109-110: Excellent addition of preheader text

Adding a hidden preheader with localized text improves the email preview experience in most email clients, giving users context before they open the email.


115-115: Cleaner wrapper styling

Removing the explicit padding on the wrapper cell (previously 40px 50px) helps achieve a more consistent layout matching other email templates.


128-128: Excellent use of dynamic styling

Using the accentColor parameter for the button's background, border, and text colors enables better brand alignment and customization, making this email more adaptable to different site themes.


136-136: Improved text styling and readability

The adjustments to the expiration notice margin and URL text color (now a darker, more readable shade) improve the overall readability and visual hierarchy of the email.

Also applies to: 139-139


142-156: Well-structured footer section

The restructured footer with proper semantic HTML, small print text styling, and the addition of site information with clickable links matches the footer style of other member emails as mentioned in the PR objectives. The new "This message was sent from {{site}} to {{email}}" format is now consistent with other member emails.


1-173:

❓ Verification inconclusive

Consider adding tests as mentioned in PR objectives

Since you mentioned in the PR objectives that there are no automated tests for this member email, consider adding basic tests to ensure the email template renders correctly with various parameters and localizations.

You could run a check to see if other member emails have tests that could be used as a reference:


🏁 Script executed:

#!/bin/bash
# Look for tests related to other member email templates
rg -t js "test.*email" --glob "**/*.test.js" ghost/core/core/server/services/members/emails/

Length of output: 94


Add tests for member email templates

I ran the following search and didn’t find any existing tests for member email templates:

rg -t js 'test.*email' --glob '**/*.test.js' ghost/core/core/server/services/members/emails/

Please verify whether there are any tests elsewhere in the repo; if not, add a basic test suite for ghost/core/core/server/services/members/emails/update-email.js that covers:

  • Rendering with default and custom accentColor
  • Correct injection of url, siteUrl, siteDomain and email
  • Proper output of translated strings via t()

@peterzimon peterzimon enabled auto-merge (squash) July 29, 2025 12:44
@peterzimon peterzimon merged commit b8da1f1 into TryGhost:main Jul 29, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Confirm your email update" missed style update
4 participants