Skip to content
This repository has been archived by the owner. It is now read-only.

fix(email): add better password change link for certain emails #93

Merged
merged 1 commit into from Oct 15, 2015

Conversation

@vladikoff
Copy link
Contributor

@vladikoff vladikoff commented Oct 6, 2015

Fix #78

@vladikoff
Copy link
Contributor Author

@vladikoff vladikoff commented Oct 13, 2015

@vladikoff vladikoff removed the WIP label Oct 13, 2015
@@ -162,7 +169,8 @@ module.exports = function (log) {
email: message.email,
link: link,
supportUrl: this.supportUrl,
supportLinkAttributes: this._supportLinkAttributes()
supportLinkAttributes: this._supportLinkAttributes(),
passwordChangeUrl: this._initiatePasswordChange()

This comment has been minimized.

@rfk

rfk Oct 14, 2015
Member

naming nit: passwordChangeLinkAttributes or similar for consistency, since it's not just the URL?

@@ -321,7 +334,8 @@ module.exports = function (log) {
link: link,
oneClickLink: oneClickLink,
supportUrl: this.supportUrl,
supportLinkAttributes: this._supportLinkAttributes()
supportLinkAttributes: this._supportLinkAttributes(),
passwordChangeUrl: this._initiatePasswordChange()

This comment has been minimized.

@rfk

rfk Oct 14, 2015
Member

Wow that's a lot of identical changes...I wonder if we should factor these links out into some common set of attributes that are included in every render, so that we can manage them in a single place.

This comment has been minimized.

@vladikoff

vladikoff Oct 15, 2015
Author Contributor

opened https://github.com/mozilla/fxa-auth-mailer/issues/94 so we can merge this and cut strings

@rfk
Copy link
Member

@rfk rfk commented Oct 14, 2015

@vladikoff travis bustage?

@rfk
Copy link
Member

@rfk rfk commented Oct 14, 2015

Also if I understand the rules correctly (thanks to a recent refresher from @shane-tomlinson) then we shouldn't merge this l10n-affecting string change until after we cut the next train...?

@vladikoff
Copy link
Contributor Author

@vladikoff vladikoff commented Oct 15, 2015

will fix the tests and ping @shane-tomlinson before cutting strings....

@shane-tomlinson
Copy link
Member

@shane-tomlinson shane-tomlinson commented Oct 15, 2015

Also if I understand the rules correctly (thanks to a recent refresher from @shane-tomlinson) then we shouldn't merge this l10n-affecting string change until after we cut the next train...?

We are in the "merge new strings!" window, until I go to sleep tonight.

@vladikoff vladikoff force-pushed the vladikoff:i78 branch from 498aed5 to 34ce572 Oct 15, 2015
@vladikoff vladikoff force-pushed the vladikoff:i78 branch from 34ce572 to d5e2c0f Oct 15, 2015
@@ -43,7 +43,7 @@ P.all(
service: 'service',
}

var supportHtmlLink = new RegExp('<a href="' + config.mail.supportUrl + '" style="color: #0095dd; text-decoration: none;">Mozilla Support</a>')
var supportHtmlLink = new RegExp('<a href="' + config.mail.supportUrl + '" style="color: #0095dd; text-decoration: none; font-family: sans-serif;">Mozilla Support</a>')

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Oct 15, 2015
Member

Should we add a "Change Password" link test too?

This comment has been minimized.

@@ -27,7 +27,7 @@ <h1 style="font-family: sans-serif; font-weight: normal; margin: 0 0 24px 0; tex
<td border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
<br/>
<p class="secondary" style="font-family: sans-serif; font-weight: normal; margin: 0; text-align: center; color: #8A9BA8; font-size: 11px; line-height: 13px; width: 310px !important; word-wrap:break-word">
{{t "This is an automated email; if you received it in error, no action is required."}} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>"}}}
{{t "This is an automated email; if you did not authorize this action, then <a %(passwordChangeLinkAttributes)s>please change your password.</a>" }} {{{t "For more information, please visit <a %(supportLinkAttributes)s>Mozilla Support</a>"}}}

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Oct 15, 2015
Member

Ahh, since this now has HTML, you'll have to replace {{ with {{{or else the HTML will be escaped.

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Oct 15, 2015
Member

That's my theory anyways.

This comment has been minimized.

@vladikoff

vladikoff Oct 15, 2015
Author Contributor

yea good note fixed via 83984f6

vladikoff added a commit that referenced this pull request Oct 15, 2015
fix(email): add better password change link for certain emails
@vladikoff vladikoff merged commit c3e0d6e into mozilla:master Oct 15, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vladikoff vladikoff deleted the vladikoff:i78 branch Oct 15, 2015
@@ -130,7 +136,8 @@ module.exports = function (log) {
link: link,
oneClickLink: oneClickLink,
supportUrl: this.supportUrl,
supportLinkAttributes: this._supportLinkAttributes()
supportLinkAttributes: this._supportLinkAttributes(),
passwordChangeLinkAttributes: this._initiatePasswordChange()

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Oct 15, 2015
Member

Should _initiatePasswordChange be renamed to _passwordChangeLinkAttributes to stay consistent?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants