Enhance email templates with configurable branding and compliance support#37
Enhance email templates with configurable branding and compliance support#37
Conversation
|
Summary of ChangesHello @Enalmada, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the reusability and compliance features of the email templating system. By introducing configurable branding through a new "appName" prop and an optional "unsubscribeUrl" for regulatory compliance, the templates become more adaptable and legally sound. Additionally, the changes improve developer experience with better type safety for preview data and comprehensive JSDoc documentation. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances the email templates by introducing configurable branding with an appName prop and compliance support with an unsubscribeUrl prop. The changes are well-documented and tested with new Storybook variants. The use of as const satisfies Required<T> for preview data is a great improvement for type safety.
My review includes a couple of suggestions to improve code readability and user experience. Specifically, I've recommended simplifying how an optional prop is passed to a component and making the support email in the footer a clickable mailto: link for consistency and convenience.
Add mailto: link to supportEmail in footer for better UX and consistency with WelcomeEmail template.
Response to Review Comments✅ Clickable support email (EmailLayout.tsx:59-62)Implemented in a7f39c5 - the support email in the footer is now a clickable ❌ Conditional spread pattern (WelcomeEmail.tsx:24)Keeping the current pattern. This project uses Using The conditional spread |
Summary
Follow-up improvements to PR #36, adding configurable branding and email compliance features:
appNamerequired prop for white-label branding supportunsubscribeUrloptional prop for CAN-SPAM/GDPR complianceas const satisfies Required<T>pattern for type-safe preview dataChanges
Modified files:
src/emails/components/EmailLayout.tsx- AddedappNameandunsubscribeUrlprops with JSDoc docssrc/emails/WelcomeEmail.tsx- Added new props, updated interfacesrc/emails/WelcomeEmail.stories.tsx- New story variants for edge casessrc/emails/preview-data.ts- Usesas const satisfies Required<T>patternsrc/emails/index.ts- Updated exports.plan/plans/email-updates/README.md- Expanded documentationTest plan
bun run check-typespassesbun run lintpassesbun run test:unitpassesbun run test-storybookpasses