Conversation
Ref https://linear.app/ghost/issue/DES-1296/cancellation-email-missing-styling-for-cancellation-reason We had previously removed the cancellation reason heading. This adds it back.
WalkthroughThis change updates the paid subscription cancellation email template to include a "Cancellation reason:" label before the cancellation reason value when present. A corresponding test file was updated to verify the new label appears correctly in three assertions. The changes add clarity to the cancellation details section without altering the conditional visibility logic or template structure. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ghost/core/core/server/services/staff/email-templates/new-paid-cancellation.hbs (1)
19-23: Consider updating the preview text label for consistency.The preview snippet (shown in email clients before opening) still reads
Reason:while the email body now usesCancellation reason:. The label mismatch is cosmetic but noticeable.✏️ Suggested update
- Reason: {{subscriptionData.cancellationReason}} + Cancellation reason: {{subscriptionData.cancellationReason}}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ghost/core/core/server/services/staff/email-templates/new-paid-cancellation.hbs` around lines 19 - 23, The preview text label in the new-paid-cancellation template is inconsistent: update the preview snippet that conditionally renders subscriptionData.cancellationReason so the label matches the email body by replacing "Reason:" with "Cancellation reason:" (locate the conditional block using subscriptionData.cancellationReason in new-paid-cancellation.hbs and change the preview label to "Cancellation reason:" to ensure consistency).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@ghost/core/core/server/services/staff/email-templates/new-paid-cancellation.hbs`:
- Around line 19-23: The preview text label in the new-paid-cancellation
template is inconsistent: update the preview snippet that conditionally renders
subscriptionData.cancellationReason so the label matches the email body by
replacing "Reason:" with "Cancellation reason:" (locate the conditional block
using subscriptionData.cancellationReason in new-paid-cancellation.hbs and
change the preview label to "Cancellation reason:" to ensure consistency).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
ghost/core/core/server/services/staff/email-templates/new-paid-cancellation.hbsghost/core/test/unit/server/services/staff/staff-service.test.js
Ref https://linear.app/ghost/issue/DES-1296/cancellation-email-missing-styling-for-cancellation-reason
We had previously removed the cancellation reason heading. This adds it back.