From 2c83589fffd415ddba2c400622d5bf0433eecd4b Mon Sep 17 00:00:00 2001
From: amy-corson-ibigroup
<115499534+amy-corson-ibigroup@users.noreply.github.com>
Date: Wed, 16 Aug 2023 16:20:01 -0500
Subject: [PATCH 1/2] refactor: reword and add styling to user emails
---
src/main/resources/templates/BaseEmail.ftl | 22 ++++++++++++++++---
.../resources/templates/MonitoredTripHtml.ftl | 4 ++--
.../resources/templates/OtpUserContainer.ftl | 7 ++----
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/src/main/resources/templates/BaseEmail.ftl b/src/main/resources/templates/BaseEmail.ftl
index 3178aeb0c..20a0e3abf 100644
--- a/src/main/resources/templates/BaseEmail.ftl
+++ b/src/main/resources/templates/BaseEmail.ftl
@@ -3,9 +3,25 @@
emails that use this must implement a macro called `EmailBody` and the whole html email will
eventually get rendered by the statement <@HtmlEmail/>.
-->
+
<#macro HtmlEmail>
-
- <@EmailBody/>
-
+
+
+ <@EmailBody/>
+
+
#macro>
\ No newline at end of file
diff --git a/src/main/resources/templates/MonitoredTripHtml.ftl b/src/main/resources/templates/MonitoredTripHtml.ftl
index 877a94c26..1876a405b 100644
--- a/src/main/resources/templates/MonitoredTripHtml.ftl
+++ b/src/main/resources/templates/MonitoredTripHtml.ftl
@@ -7,13 +7,13 @@
<#macro EmailMain>
-
Your trip has the following notifications:
+
Your trip has the following notifications:
<#list notifications as notification>
- ${notification}
#list>
-
View trip here.
+
View all of your saved trips in ${OTP_UI_NAME}.
#macro>
diff --git a/src/main/resources/templates/OtpUserContainer.ftl b/src/main/resources/templates/OtpUserContainer.ftl
index ffd0b2410..bb393a075 100644
--- a/src/main/resources/templates/OtpUserContainer.ftl
+++ b/src/main/resources/templates/OtpUserContainer.ftl
@@ -7,19 +7,16 @@
-->
<#macro EmailBody>
-<#-- header -->
-
-
An email from the ${OTP_UI_NAME}
-
<#-- main -->
<@EmailMain/>
<#-- footer -->
+
- Manage Subscriptions here.
+ You're receiving this email because you're subscribed to notifications through ${OTP_UI_NAME}. You can manage that subscription here.
From 47fe4643fbc4f4e3c995bf772a11884f4f45e477 Mon Sep 17 00:00:00 2001
From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com>
Date: Tue, 5 Sep 2023 12:16:33 -0400
Subject: [PATCH 2/2] test(TemplateUtilsTest): Update snapshots
---
.../utils/TemplateUtilsTest/Event_Errors_Html_Email-0.json | 2 +-
.../utils/TemplateUtilsTest/Monitored_Trip_HTML_Email-0.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Event_Errors_Html_Email-0.json b/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Event_Errors_Html_Email-0.json
index 7320e4f9d..b75092b89 100644
--- a/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Event_Errors_Html_Email-0.json
+++ b/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Event_Errors_Html_Email-0.json
@@ -1 +1 @@
-"\n\n\n\n
\n
An email from the OTP Admin Dashboard
\n\n
\n
\n
\n \n Manage subscriptions here.\n \n
\n
\n
\n"
\ No newline at end of file
+"\n\n\n\n\n\n \n
\n
An email from the OTP Admin Dashboard
\n\n
\n
\n
\n \n Manage subscriptions here.\n \n
\n
\n
\n\n"
\ No newline at end of file
diff --git a/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Monitored_Trip_HTML_Email-0.json b/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Monitored_Trip_HTML_Email-0.json
index d18f18eb8..3a22462f5 100644
--- a/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Monitored_Trip_HTML_Email-0.json
+++ b/src/test/resources/snapshots/org/opentripplanner/middleware/utils/TemplateUtilsTest/Monitored_Trip_HTML_Email-0.json
@@ -1 +1 @@
-"\n\n\n\n
\n
An email from the Trip Planner
\n\n
\n
\n
Your trip has the following notifications:
\n
\n - Test notification.
\n - Another notification.
\n
\n
View trip here.\n
\n
\n
\n
\n \n Manage Subscriptions here.\n \n
\n
\n
\n"
\ No newline at end of file
+"\n\n\n\n\n\n \n
\n
\n
Your trip has the following notifications:
\n
\n - Test notification.
\n - Another notification.
\n
\n
View all of your saved trips in Trip Planner.
\n
\n
\n
\n
\n
\n \n You're receiving this email because you're subscribed to notifications through Trip Planner. You can manage that subscription here.\n \n
\n
\n
\n\n"
\ No newline at end of file