[WEB-5790] feat: new email templates
Description
new email templates
Type of Change
- [x] Code refactoring
Screenshots and Media (if applicable)
Test Scenarios
References
[!NOTE] Modern, responsive redesign of multiple email templates (auth, invitations, project notifications, analytics export) with unified header/footer, preheaders, CTAs, and fallback links.
- Emails:
- Auth templates: Rebuild
apps/api/templates/emails/auth/forgot_password.htmland.../auth/magic_signin.htmlwith a simplified, responsive layout, unified header/footer, preheader text, styled CTA buttons, and fallback plain links ({{forgot_password_url}},{{code}},{{email}}).- Invitations/Notifications: Redesign
.../invitations/workspace_invitation.htmland.../notifications/project_addition.htmlwith the same modern structure, clearer copy, primary CTA (accept/join/go-to links), and fallback link display ({{abs_url}},{{project_url}},{{email}}).- Exports: Replace minimal
.../exports/analytics.htmlwith a full responsive template including header, body copy, and footer indicating CSV attachment readiness.- General: Standardize titles, typography, spacing, and colors; remove legacy tables/styles/social blocks; add mobile-friendly adjustments and hidden preheaders across templates.
Written by Cursor Bugbot for commit e6371d177c6fd69c7497769819728f7f7e200cdd. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
- Style
- Modernized email templates across authentication, invitations, notifications, and analytics with responsive HTML5 layouts, replacing legacy table-based structures
- Enhanced email readability with improved typography, clearer call-to-action buttons, and mobile-first design for better cross-client rendering
βοΈ Tip: You can customize this high-level summary in your review settings.
Walkthrough
Modernized five email templates from legacy XHTML/Outlook-specific markup to HTML5 responsive structures. Changes include simplified layouts, consolidated CSS with media queries, removed vendor-specific conditionals, and improved typography and accessibility across forgot password, magic sign-in, analytics, workspace invitation, and project addition email templates.
Changes
| Cohort / File(s) | Summary |
|---|---|
Auth email templates apps/api/templates/emails/auth/forgot_password.html, apps/api/templates/emails/auth/magic_signin.html |
Replaced XHTML/MSO-heavy markup with HTML5 structures; removed nested table layouts and Outlook conditionals; introduced responsive containers, modern CSS resets, media queries, and simplified header/body/footer card design; updated text content and visual styling for clarity |
Invitation & notification templates apps/api/templates/emails/invitations/workspace_invitation.html, apps/api/templates/emails/notifications/project_addition.html |
Converted from table-driven XHTML to clean HTML5 layouts; removed legacy meta tags and MSO styles; introduced preheaders, centered card-based content areas, and mobile-friendly CSS; streamlined CTA buttons with text fallbacks; preserved dynamic template variables |
Export template apps/api/templates/emails/exports/analytics.html |
Expanded minimal inline HTML snippet into full responsive HTML5 email template with proper document structure, embedded CSS resets, preheader, branded header with logo, content card, and footer |
Estimated code review effort
π― 3 (Moderate) | β±οΈ ~25 minutes
- Focus areas:
- Verify all template variables (e.g.,
{{forgot_password_url}},{{workspace_name}},{{project_url}}) are correctly preserved and functional - Check email client compatibility across major platforms (Gmail, Outlook, Apple Mail) with responsive structures and inline styles
- Confirm CSS resets and media queries render correctly on mobile clients
- Validate button styling and fallback URL blocks display properly in clients with limited CSS support
- Review removed Outlook/MSO conditional comments to ensure no client-specific rendering breaks
- Verify all template variables (e.g.,
Poem
π° From tables deep and Outlook dread, HTML5 springs forth instead! Clean cards and modern styles so bright, Email templates now take flight! βοΈ Responsive, lean, and oh so neatβ A modernized refresh complete! π
Pre-merge checks and finishing touches
β Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | The title directly and accurately describes the main change: modernizing email templates across multiple locations with a responsive redesign. |
| Description check | β Passed | The description includes required sections and detailed information about the changes, but lacks specific test scenarios and screenshots showing before/after comparisons. |
| Docstring Coverage | β Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
β¨ Finishing touches
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
feat-email-templates
π Recent review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between cb9b4f7887f1207cd2302e53ca077e5c47671a15 and e6371d177c6fd69c7497769819728f7f7e200cdd.
π Files selected for processing (5)
apps/api/templates/emails/auth/forgot_password.htmlapps/api/templates/emails/auth/magic_signin.htmlapps/api/templates/emails/exports/analytics.htmlapps/api/templates/emails/invitations/workspace_invitation.htmlapps/api/templates/emails/notifications/project_addition.html
β° 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). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: Analyze (javascript)
π Additional comments (6)
apps/api/templates/emails/exports/analytics.html (1)
1-215: Well-structured responsive email template.The template follows a clean, consistent pattern with appropriate CSS resets, responsive media queries, and email client compatibility considerations. The structure aligns with the other modernized templates in this PR.
apps/api/templates/emails/auth/magic_signin.html (1)
1-265: Clean implementation of magic sign-in email.The template properly displays the login code in a styled, accessible chip format with clear instructions and appropriate expiration messaging. The structure is consistent with other templates in the PR.
apps/api/templates/emails/auth/forgot_password.html (1)
1-306: Solid password reset email template.Good implementation with a clear CTA button, fallback URL for email clients that don't render buttons properly, and appropriate security messaging. The
word-break: break-allon the fallback URL ensures long reset links don't break the layout.apps/api/templates/emails/invitations/workspace_invitation.html (1)
1-306: Well-designed workspace invitation email.The template provides a clear invitation flow with the inviter's name, workspace name, and a prominent CTA. The fallback URL and recipient note follow the established pattern across templates.
apps/api/templates/emails/notifications/project_addition.html (2)
1-307: Good implementation of project invitation email.The template follows the established pattern with clear messaging, appropriate template variables, and good accessibility. The structure is consistent with the other modernized templates.
44-46: No action needed. The*[class="gmail-fix"]CSS rule is consistently present across multiple email templates in the codebase (user notifications, project invitations, webhook notifications, and issue updates), making this a standard pattern rather than an inconsistency unique to this template.Likely an incorrect or invalid review comment.
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 @coderabbitai help to get the list of available commands and usage tips.