Skip to content

polish(accounts-email): A little polishing before building#19900

Merged
dschom merged 1 commit intomainfrom
fxa-mailer-polish
Jan 21, 2026
Merged

polish(accounts-email): A little polishing before building#19900
dschom merged 1 commit intomainfrom
fxa-mailer-polish

Conversation

@dschom
Copy link
Copy Markdown
Contributor

@dschom dschom commented Jan 16, 2026

Because

  • We to polish a few things before landing more code in fxa-mailer.

This pull request

  • Pass in metrics enabled
  • Handle undefined params in buildLInkWithQueryParam
  • Small polish on compound types in fxa-mailer
  • Normalize on strings as format for links, not url objects
  • Better encapsulation for link builder.

Issue that this pull request solves

Closes: (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

This is pre-work for the using email lib in fxa-auth-server ticket.

@dschom dschom requested a review from a team as a code owner January 16, 2026 17:52
Copy link
Copy Markdown
Contributor

@nshirley nshirley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - I think the failing tests will get fixed with a rebase

content?: string
): void {
// Don't include utm parameters if metrics are disabled. This flag
// comes from the users's account state and must be supplied.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good to know! Thanks for catching this


for (const [key, value] of Object.entries(opts)) {
link.searchParams.set(key, value);
if (value !== undefined) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

const { privacyUrl, supportUrl } = this.linkBuilder.buildCommonLinks(name);
// Build links for template
const initiatePasswordResetLink =
this.linkBuilder.buildInitiatePasswordResetLink(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, much cleaner to move that handling of additional params into the link builder 👍

@dschom dschom force-pushed the fxa-mailer-polish branch 4 times, most recently from 77a412f to 9dcb037 Compare January 20, 2026 23:38
- Pass in metrics enabled
- Handle undefined params in `buildLInkWithQueryParam`
- Small polish on compound types in fxa-mailer
- Normalize on strings as format for links, not url objects
- Better encapsulation for link builder.
@dschom dschom force-pushed the fxa-mailer-polish branch from 9dcb037 to 2ec06f0 Compare January 21, 2026 18:39
@dschom dschom merged commit d011a8d into main Jan 21, 2026
21 checks passed
@dschom dschom deleted the fxa-mailer-polish branch January 21, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants