Skip to content

LG-6343: Implement email template for "Ready to verify"#6585

Merged
aduth merged 25 commits intomainfrom
aduth-lg-6343-verify-email
Jul 27, 2022
Merged

LG-6343: Implement email template for "Ready to verify"#6585
aduth merged 25 commits intomainfrom
aduth-lg-6343-verify-email

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Jul 14, 2022

Why: As a public user trying to proof online I want to see the details of my newly scheduled in-person proofing visit to the USPS as an email so that I can reference it later.

Testing Instructions:

  1. Go to http://localhost:3000/rails/mailers/user_mailer/in_person_ready_to_verify

Screenshot:

localhost_3000_rails_mailers_user_mailer_in_person_ready_to_verify

@aduth aduth force-pushed the aduth-lg-verify-content branch from f308b5f to d488d81 Compare July 14, 2022 19:23
@aduth aduth force-pushed the aduth-lg-6343-verify-email branch from 4b3b578 to 87fa839 Compare July 14, 2022 20:49
@aduth aduth force-pushed the aduth-lg-verify-content branch from 59b74d6 to ac07bc6 Compare July 15, 2022 18:35
Base automatically changed from aduth-lg-verify-content to main July 15, 2022 19:12
@aduth aduth force-pushed the aduth-lg-6343-verify-email branch from 87fa839 to 536dc49 Compare July 15, 2022 19:16
@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Jul 18, 2022

  • Test real email sends in sandbox environment (see how it looks in a real email client)

This came through in pretty good shape to both Gmail and Apple Mail. The one stand-out was a missing icon for the alert banner in Gmail, since apparently SVG images are not well-supported. This is probably not critical, though I could just create a raster version of the icon to use in the email template.

aduth added a commit that referenced this pull request Jul 18, 2022
Better email support

See included README.md
See: #6585 (comment)
@aduth aduth marked this pull request as ready for review July 18, 2022 15:11
@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Jul 18, 2022

Marking this as ready to review, though for design review consideration I want to acknowledge that there are some limitations of overall email support and our email templates which means that the template may not be a 1-to-1 match with the approved designs. Some of these can be fine-tuned (e.g. margins and paddings), and some cannot (no custom font support in emails). A lot of this is also inherited from the existing default email styling, so it could be worth considering consistency or a more holistic approach to certain adjustments (e.g. paragraph spacing or heading stylings). Let me know what kinds of improvements we'd be most interested in making (if any), and I'll try to judge how best to approach them.

@aduth aduth requested review from a team and WheresHJ and removed request for a team July 18, 2022 15:17
@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Jul 18, 2022

Also, the preview from the screenshot is just that: a preview. Email clients have notoriously inconsistent rendering for email messages. I have this set up in my sandbox environment to trigger a real email message and I can forward that along to anyone if it's helpful.

@kellular kellular self-requested a review July 18, 2022 21:02
Copy link
Copy Markdown

@kellular kellular left a comment

Choose a reason for hiding this comment

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

Given the styling limitations that Andrew mentioned, I think the email looks okay and even better if we can address the two comments I added.

<%= t('user_mailer.in_person_ready_to_verify.intro') %>
</p>

<table class="info-alert margin-y-4">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it possible to make the alert heading:

  • the same font size as the alert body copy
  • bolded

I think this is one way to introduce some consistency in style between the email and the Login page.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The font size difference is present in the Figma designs (18px for bolded heading, 16px for unbolded text). It'd be easy enough for me to standardize them as the same body font size though if that's what we want.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can see how it's a bit more noticeable a difference to control these font sizes in the email template though, since the default body font size is 13px in the emails (vs. 16px elsewhere in the app).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can see how it's a bit more noticeable a difference to control these font sizes in the email template though, since the default body font size is 13px in the emails (vs. 16px elsewhere in the app).

This is a good point. Might be worth the design team looking at the email styling after pilot.

<%= @presenter.selected_location_details['state'] %>
<%= @presenter.selected_location_details['zip5'] %>-<%= @presenter.selected_location_details['zip4'] %>
</div>
<h3 class="font-sans-sm margin-y-0 text-normal text-bold"><%= t('in_person_proofing.body.barcode.retail_hours') %></h3>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could we update "Retail hours" so that:

  • the font size is the same as our body copy
  • bolded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could we update "Retail hours" so that:

  • the font size is the same as our body copy
  • bolded

@kellular Similar to my previous comment, this is also how it's designed in the Figma document. I can also change this one to use standard body font size.

@aduth aduth force-pushed the aduth-lg-6343-verify-email branch from f960468 to 52b2795 Compare July 26, 2022 14:55
@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Jul 26, 2022

@kellular I updated the font sizes in 52b2795 to standardize the alert and "Retail hours" headings with surrounding body copy. Note that I applied this to both the email template, as well as the "Ready to verify" page (since the inconsistency was there as well).

Can you take another look and let me know if this looks alright now?

Screen Before After
Email email before email after
Page page before page after

@aduth aduth requested a review from kellular July 26, 2022 15:03
Copy link
Copy Markdown
Contributor

@tomas-nava tomas-nava left a comment

Choose a reason for hiding this comment

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

approve!

But I've made a bunch of suggestions that will make the work merge more cleanly with #6624

Comment on lines +169 to +186
'name' => 'BALTIMORE — Post Office™',
'streetAddress' => '900 E FAYETTE ST RM 118',
'city' => 'BALTIMORE',
'state' => 'MD',
'zip5' => '21233',
'zip4' => '9715',
'phone' => '555-123-6409',
'hours' => [
{
'weekdayHours' => '8:30 AM - 4:30 PM',
},
{
'saturdayHours' => '9:00 AM - 12:00 PM',
},
{
'sundayHours' => 'Closed',
},
],
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.

Suggested change
'name' => 'BALTIMORE — Post Office™',
'streetAddress' => '900 E FAYETTE ST RM 118',
'city' => 'BALTIMORE',
'state' => 'MD',
'zip5' => '21233',
'zip4' => '9715',
'phone' => '555-123-6409',
'hours' => [
{
'weekdayHours' => '8:30 AM - 4:30 PM',
},
{
'saturdayHours' => '9:00 AM - 12:00 PM',
},
{
'sundayHours' => 'Closed',
},
],
'name' => 'BALTIMORE',
'streetAddress' => '900 E FAYETTE ST RM 118',
'addressLine2' => 'BALTIMORE, MD 21233-9715',
'phone' => '555-123-6409',
'weekdayHours' => '8:30 AM - 4:30 PM',
'saturdayHours' => '9:00 AM - 12:00 PM',
'sundayHours' => 'Closed',

This is the format you can expect from selected_location_details, as of #6624

Comment on lines +80 to +82
<%= @presenter.selected_location_details['city'] %>,
<%= @presenter.selected_location_details['state'] %>
<%= @presenter.selected_location_details['zip5'] %>-<%= @presenter.selected_location_details['zip4'] %>
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.

Suggested change
<%= @presenter.selected_location_details['city'] %>,
<%= @presenter.selected_location_details['state'] %>
<%= @presenter.selected_location_details['zip5'] %>-<%= @presenter.selected_location_details['zip4'] %>
<%= @presenter.selected_location_details['addressLine2'] %>

With the difference in selected_location_details noted in my last comment. I've made the same change to the page view here in #6624.

EnrollmentCodeFormatter.format(enrollment_code)
end

def selected_location_hours(prefix)
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.

The body of this method should change to the below, to accommodate the difference in format of selected_location_details noted in previous comments.

      hours = selected_location_details["#{prefix}Hours"]
      return localized_hours(hours) if hours

This is also done here in PR #6624.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hm, if I make those changes here before #6624 is merged, then it would break the page rendering for "Ready to verify"? 🤔

I guess I can plug the same changes noted previously into this code:

selected_location_details: {
'name' => 'BALTIMORE — Post Office™',
'streetAddress' => '900 E FAYETTE ST RM 118',
'city' => 'BALTIMORE',
'state' => 'MD',
'zip5' => '21233',
'zip4' => '9715',
'phone' => '555-123-6409',
'hours' => [
{
'weekdayHours' => '8:30 AM - 4:30 PM',
},
{
'saturdayHours' => '9:00 AM - 12:00 PM',
},
{
'sundayHours' => 'Closed',
},
],
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tomas-nava Yeah, there's a lot from #6624 that I'd have to pull into this branch to be able to use the updated selected location shape. Could we merge this without those and update #6624? Or, conversely, merge #6624 and I'll update this one?

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'm fine with merging this first and updating in #6624 @aduth

Copy link
Copy Markdown

@kellular kellular left a comment

Choose a reason for hiding this comment

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

hi @aduth the updates look good to me! Thanks for looking into the font sizes. I can reconcile any differences in Figma after pilot launch

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.

4 participants