-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-21742] Fix MJML validation error. #6687
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
Conversation
|
Claude finished @JimmyVo16's task —— View job 📋 Review Complete ✅
🔍 Review SummaryThis PR correctly fixes the MJML validation error by excluding component files from standalone compilation. The implementation is sound, follows best practices, and has no security concerns. ✅ StrengthsCode Correctness (src/Core/MailTemplates/Mjml/build.js:45-47)
Security & Performance
Code Quality
📝 Suggestions for Enhancement1. Add Debug Logging (Priority: Medium) const mjmlFiles = glob.sync(`${config.inputDir}/**/*.mjml`, {
ignore: ['**/components/**']
});
if (flags.trace) {
const excludedFiles = glob.sync(`${config.inputDir}/**/components/**/*.mjml`);
console.log(`[DEBUG] Excluded ${excludedFiles.length} component file(s):`, excludedFiles);
}2. Documentation Gap (Priority: Medium)
3. Testing Considerations (Priority: Low)
❓ Questions
🎯 RecommendationApprove and merge - This is a well-executed bug fix. The code change is correct and the concerns are minor documentation/testing improvements that can be addressed in follow-up work. Code Quality Score: 8/10 |
|
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 #6687 +/- ##
=======================================
Coverage 53.40% 53.40%
=======================================
Files 1917 1917
Lines 85466 85466
Branches 7667 7667
=======================================
Hits 45643 45643
Misses 38056 38056
Partials 1767 1767 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-21742
📔 Objective
While working on this ticket, I discovered this error:

This validation error occurs because the build script treats this shared subcomponent as a standalone component. We have this subcomponent here because only the AC team needs it. By moving the files into an AC directory, we can reduce code review friction.
This change will make the build script recognize all “components” directories as non-standalone MJML templates.
Note: This has no impact on production code. We only use this build script during development.
📸 Screenshots
⏰ 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