Remove email templates migrated to ol-keycloakify#251
Remove email templates migrated to ol-keycloakify#251blarghmatey wants to merge 2 commits intomainfrom
Conversation
The HTML email templates have been migrated to ol-keycloakify where they are now implemented as React components using keycloakify-emails and jsx-email, with full MIT/OL branding. See mitodl/ol-keycloakify#115 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary of ChangesHello, 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 cleans up the codebase by removing outdated HTML email templates. This action is a direct result of a strategic migration to centralize and modernize email template management within the Highlights
Changelog
Activity
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 aims to remove legacy email templates that have been migrated. While it correctly removes the generated .ftl files, it overlooks the removal of the source .mjml files. This oversight means the deleted files will be regenerated on the next build, nullifying the change. I've added a specific comment with details on the source files that also need to be removed to complete this migration.
| @@ -1,263 +0,0 @@ | |||
| <!doctype html> | |||
There was a problem hiding this comment.
While this file and other templates are being removed, their source .mjml files are not. The build script (scripts/compile-emails.sh) will regenerate these deleted .ftl files from the existing sources, making this PR ineffective. To fix this, please also remove the corresponding source files:
ol-keycloak/oltheme/src/main/resources/theme/ol/email/mjml/email-verification.mjmlol-keycloak/oltheme/src/main/resources/theme/ol/email/mjml/password-reset.mjmlol-keycloak/oltheme/src/main/resources/theme/ol/email/mjml/template.mjml
Email templates are now maintained in ol-keycloakify as React components. There is no longer any email compilation or testing to perform here. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary Migrates Keycloakify email templates to use full MIT/OL branding, replacing the MJML-based FTL templates previously maintained in `ol-keycloak`. Templates are now React components using `keycloakify-emails` and `jsx-email`, matching the visual identity of the login pages. Closes mitodl/hq#8794 See cleanup PR: mitodl/ol-keycloak#251 ## Changes ### `src/emails/styles.ts` *(new)* Shared inline style objects (`paragraph`, `ctaButton`, `fallbackUrl`) extracted into a single module to avoid drift across templates. ### `src/emails/layout.tsx` Rewrote `EmailLayout` with full MIT branding: - `#F3F4F8` background, white card with `border-radius:8px`, `max-width:600px` - Header: MIT Learn logo (left) + MIT logo (right), separated by a `#DDE1E6` border-bottom - Adobe Typekit font (`neue-haas-grotesk-text`) via `<link>` in `<Head>` (non-Outlook clients) - Footer: realm name + 77 Massachusetts Ave, Cambridge address - Uses jsx-email table components (`Row`, `Column`, `Img`) for Outlook compatibility - PNG logos referenced via `import.meta.isJsxEmailPreview` URL pattern for correct asset resolution in both preview and production ### `src/emails/templates/assets/mit-learn-logo.png` *(new)* PNG MIT Learn logo (300×55px) for email header. PNG used instead of SVG for broad email client support (Gmail, Outlook). ### `src/emails/templates/assets/mit-logo-black.png` *(new)* PNG MIT logo (45×24px) for email header. ### `src/emails/templates/email-verification.tsx` Rewrote to use `EmailLayout` with MIT-branded content: - "Verify Your Email" heading - `exp("realmName")` in body text - MIT red (`#A31F34`) CTA button linking to `exp("link")` - Expiration notice and fallback URL ### `src/emails/templates/password-reset.tsx` *(new)* Created missing password-reset template matching `ol-keycloak/password-reset.ftl`: - "Reset Your Password" heading - MIT red CTA button - Fallback URL ### `src/emails/templates/org-invite.tsx` Simplified by removing brittle theme `if/else` branching. Now uses `exp("realmName")` generically, so it works consistently for both `ol-learn` and `ol-data-platform` themes. ## Design tokens used | Token | Value | |---|---| | Background | `#F3F4F8` | | Card bg | `#FFFFFF`, `border-radius:8px` | | Header/footer border | `#DDE1E6` | | Text | `#212326` | | CTA button | `#A31F34` (MIT red) | | Font | `neue-haas-grotesk-text, sans-serif` | --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Removes the legacy HTML email templates now that they have been migrated to ol-keycloakify#115 as React components using
keycloakify-emails+jsx-email.Templates removed
email/html/template.ftl— email layout (header/footer)email/html/email-verification.ftl— verify email templateemail/html/password-reset.ftl— password reset templateRelated