-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-28769] [PM-28768] [PM-28772] Welcome email bug fixes #6644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-28769] [PM-28768] [PM-28772] Welcome email bug fixes #6644
Conversation
…/pm-28769/copy-fix-for-welcome-emails
|
Claude finished @ike-kottlowski's task —— View job Code Review Complete ✅Tasks
SummaryThis PR successfully addresses three welcome email bugs. The implementation is clean and follows good practices. I've identified one critical issue with the production Critical Issues ❌1. Localhost SMTP in Production ConfigLocation: The SMTP localhost configuration was added to the production Issue: The author confirmed this is "only relevant for development environments" but it's in the production config file. Recommendation: Remove the SMTP config from # In bitwarden_license/src/Sso/appsettings.json
"mail": {
"sendGridApiKey": "SECRET",
"amazonConfigSetName": "Email",
- "replyToEmail": "[email protected]",
- "smtp": {
- "host": "localhost",
- "port": 10250
- }
+ "replyToEmail": "[email protected]"
}Issues Resolved ✅PM-28768: Families2025 Plan Type Bug FixLocation: Previous Code: if (organization.PlanType is PlanType.FamiliesAnnually
or PlanType.FamiliesAnnually2019
or PlanType.Free)New Code: if (organization.PlanType.GetProductTier() is ProductTierType.Free or ProductTierType.Families)👍 Excellent improvement! This change:
This is the superior approach compared to the array-based solution mentioned in review comments. PM-28769: Email Subtitle FixLocation: Multiple Changes:
✅ Matches Figma design (confirmed by author) CSS Fix: The Before (broken): componentHeadStyle = (breakpoint) => {
return `
@media only screen and (max-width:${breakpoint}): { // ← Extra colon
".mj-bw-icon-row-text": { // ← JSON syntax
padding-left: "5px !important", // ← Quoted valuesAfter (correct): headStyle = (breakpoint) => {
return `
@media only screen and (max-width:${breakpoint}) { // ✅ Valid media query
.mj-bw-icon-row-text { // ✅ Valid CSS selector
padding-left: 5px !important; // ✅ Unquoted values👍 This fix resolves the critical CSS syntax error flagged in previous reviews while also renaming the method to match MJML conventions. PM-28772: SSO Local Development Email ConfigLocation: ✅ Correctly added to Security & Best Practices ✅
Additional ObservationsTest Coverage 📝The test suite correctly validates the new behavior:
Maintainability Improvements 🌱The switch to
Recommendations
VerdictApproval Status: ✅ Approve with required changes Once the SMTP config is removed from production |
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6644 +/- ##
===========================================
+ Coverage 13.38% 53.40% +40.01%
===========================================
Files 1125 1917 +792
Lines 49593 85464 +35871
Branches 3914 7667 +3753
===========================================
+ Hits 6640 45644 +39004
+ Misses 42831 38054 -4777
- Partials 122 1766 +1644 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
enmande
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is literally the same question in 6 places. There isn't any occurrence of that copy which didn't change, and I think I understand typographically this is often the preferred character, so I imagine it's intended, but just wanted to check.
src/Core/MailTemplates/Handlebars/MJML/Auth/Onboarding/welcome-family-user.html.hbs
Show resolved
Hide resolved
src/Core/MailTemplates/Handlebars/MJML/Auth/Onboarding/welcome-individual-user.html.hbs
Show resolved
Hide resolved
src/Core/MailTemplates/Handlebars/MJML/Auth/Onboarding/welcome-org-user.html.hbs
Show resolved
Hide resolved
src/Core/MailTemplates/Mjml/emails/Auth/Onboarding/welcome-family-user.mjml
Show resolved
Hide resolved
src/Core/MailTemplates/Mjml/emails/Auth/Onboarding/welcome-individual-user.mjml
Show resolved
Hide resolved
src/Core/MailTemplates/Mjml/emails/Auth/Onboarding/welcome-org-user.mjml
Show resolved
Hide resolved
| if (organization.PlanType is PlanType.FamiliesAnnually | ||
| or PlanType.FamiliesAnnually2019 | ||
| or PlanType.Free) | ||
| if (FamilyAndFreePlanTypes.Contains(organization.PlanType)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works perfectly fine. If you prefer to not have to manage these in the future, you can use the PlanType.GetProductTierType extension.
if (organization.PlanType.GetProductTierType() is ProductTierType.Free or ProductTierType.Families)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome suggestion updated the code!
125c6e5

🎟️ Tracking
PM-28768
PM-28769
PM-28772
📔 Objective
PM-28768 - Updated conditional to include
PlanType.Families2025in the logic to send the correct email; added docs inPlanTypeto alert Billing of the dependency.PM-28769 - Fixed subtitle to match figma; also updated to use
headStyleso styling is only applied once per component rather than each time a component is used.PM-28772 - Added config to the
appsettings.development.jsonfor the SSO project to allow for emails to be sent on local dev. Alerted SRE to possible missing configuration for SSO project.📸 Screenshots
Individual User
indv_welcome_email.mp4
Organization User + JIT User
JIT_org_Welcome_Email.mp4
Families User
firefox_W3tuKzoSt6.mp4
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes