Skip to content

Commit 3932c3e

Browse files
authored
Merge pull request #18202 from mozilla/FXA-10636
feat(emails): Add inactiveAccountFirstWarning email template + partials
2 parents ac0eda8 + 52dbb4d commit 3932c3e

24 files changed

Lines changed: 335 additions & 5 deletions

File tree

libs/shared/l10n/src/lib/branding.ftl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
4040
-product-mozilla-vpn = Mozilla VPN
4141
-product-mozilla-hubs = Mozilla Hubs
42+
# Mozilla Developer Network
43+
-product-mdn = MDN
4244
-product-mdn-plus = MDN Plus
4345
-product-firefox-cloud = Firefox Cloud
4446
-product-mozilla-monitor = Mozilla Monitor

packages/fxa-auth-server/lib/senders/emails/global.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ $font-sans: sans-serif;
99
$blue-500: #0060df;
1010
$white: #fff;
1111
$black: #000;
12+
$grey-100: #e7e7e7;
1213
$grey-400: #6d6d6e;
1314
$grey-500: #4b5563;
1415
$grey-600: #464646;
@@ -139,8 +140,14 @@ tr > td:first-child {
139140
%banner-common {
140141
max-width: 640px !important;
141142
width: 100% !important;
142-
background: linear-gradient(88.76deg, #E4EAF6 3.37%, #DBEEF8 39.93%, #DAF3F4 65.09%, #E3F6ED 102.21%);
143-
background-color: #DBEEF8;
143+
background: linear-gradient(
144+
88.76deg,
145+
#e4eaf6 3.37%,
146+
#dbeef8 39.93%,
147+
#daf3f4 65.09%,
148+
#e3f6ed 102.21%
149+
);
150+
background-color: #dbeef8;
144151
}
145152

146153
%text-banner-common {

packages/fxa-auth-server/lib/senders/emails/layouts/fxa/index.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
align-items: center;
1717
}
1818

19-
2019
.sync-img {
2120
padding: global.$s-5 global.$s-0 !important;
2221
height: 137px;
@@ -104,3 +103,13 @@
104103
@extend .text-3xl;
105104
}
106105
}
106+
107+
.info-block {
108+
margin: 20px 0 0 0;
109+
background-color: global.$grey-100;
110+
border-radius: 10px;
111+
}
112+
113+
.info-block div {
114+
padding: 20px 0 0 0;
115+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
account-deletion-info-block-communications = If your account is deleted, you’ll still receive emails from Mozilla Corporation and Mozilla Foundation, unless you <a data-l10n-name="unsubscribeLink">ask to unsubscribe</a>.
2+
account-deletion-info-block-support = If you have any questions or need assistance, feel free to contact our <a data-l10n-name="supportLink">support team</a>.
3+
account-deletion-info-block-communications-plaintext = If your account is deleted, you’ll still receive emails from Mozilla Corporation and Mozilla Foundation, unless you ask to unsubscribe:
4+
account-deletion-info-block-support-plaintext = If you have any questions or need assistance, feel free to contact our support team:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<%# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/. %>
4+
5+
<mj-section>
6+
<mj-column css-class="info-block">
7+
<mj-text css-class="text-sub-body">
8+
<span data-l10n-id="account-deletion-info-block-communications">
9+
If your account is deleted, you’ll still receive emails from Mozilla Corporation and Mozilla Foundation, unless you <a class="link-blue" href="<%- unsubscribeUrl %>" data-l10n-name="unsubscribeLink">ask to unsubscribe</a>.
10+
</span>
11+
</mj-text>
12+
<%# css-class is not supported for mj-divider and styles must be applied inline %>
13+
<mj-divider border-color="#c2c2c2" border-width="2px" padding="10px 0"></mj-divider>
14+
<mj-text css-class="text-sub-body">
15+
<span data-l10n-id="account-deletion-info-block-support">
16+
If you have any questions or need assistance, feel free to contact our <a class="link-blue" href="<%- supportUrl %>" data-l10n-name="supportLink">support team</a>.
17+
</span>
18+
</mj-text>
19+
</mj-column>
20+
</mj-section>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import { Meta } from '@storybook/html';
6+
import { storyWithProps } from '../../storybook-email';
7+
8+
export default {
9+
title: 'Partials/accountDeletionInfoBlock',
10+
} as Meta;
11+
12+
const createStory = storyWithProps(
13+
'_storybook',
14+
'This partial is used in account deletion emails to provide information and assistance about the deletion process.',
15+
{
16+
layout: null,
17+
subject: 'N/A',
18+
partial: 'accountDeletionInfoBlock',
19+
}
20+
);
21+
22+
export const accountDeletionInfoBlock = createStory();
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
account-deletion-info-block-communications-plaintext = "If your account is deleted, you’ll still receive emails from Mozilla Corporation and Mozilla Foundation, unless you ask to unsubscribe:"
2+
<%- unsubscribeUrl %>
3+
4+
account-deletion-info-block-support-plaintext = "If you have any questions or need assistance, feel free to contact our support team:"
5+
<%- supportUrl %>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import { Meta } from '@storybook/html';
6+
import { storyWithProps } from '../../storybook-email';
7+
8+
export default {
9+
title: 'Partials/footers/automatedEmailChangePassword',
10+
} as Meta;
11+
12+
const createStory = storyWithProps(
13+
'_storybook',
14+
'This partial is used in footers for automated emails recommending a password change.',
15+
{
16+
layout: null,
17+
subject: 'N/A',
18+
partial: 'automatedEmailChangePassword',
19+
passwordChangeLink: 'http://localhost:3030/settings/change_password',
20+
}
21+
);
22+
23+
export const AutomatedEmailChangePassword = createStory();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
automated-email-inactive-account = This is an automated email. You are receiving it because you have a { -product-mozilla-account } and it has been 2 years since your last sign-in.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<%# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/. %>
4+
5+
<mj-section>
6+
<mj-column>
7+
<mj-text css-class="text-footer-automatedEmail">
8+
<span data-l10n-id="automated-email-inactive-account">
9+
This is an automated email. You are receiving it because you have a Mozilla account and it has been 2 years since your last sign-in.
10+
</span>
11+
</mj-text>
12+
</mj-column>
13+
</mj-section>

0 commit comments

Comments
 (0)