Skip to content

LG-5208: Add Help Text above SSN field#5497

Merged
jmdembe merged 2 commits intomainfrom
jd-LG-5208-ssn-help-text
Oct 14, 2021
Merged

LG-5208: Add Help Text above SSN field#5497
jmdembe merged 2 commits intomainfrom
jd-LG-5208-ssn-help-text

Conversation

@jmdembe
Copy link
Contributor

@jmdembe jmdembe commented Oct 13, 2021

This PR adds help text for users to enter their social security number
Why: So that users can understand how to enter their social security number

Edited to add screenshots

Before After
image image

@jmdembe jmdembe changed the title LG-5028: Add Help Text above SSN field LG-5208: Add Help Text above SSN field Oct 13, 2021
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM, can we also add some before/after screenshots to changes like this next time? Makes it easier to see what's going on

Comment on lines 6 to 16
<%# maxlength set and includes '-' delimiters to work around cleave bug %>
<%= f.label :ssn do %>
<strong>
<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
<div class="margin-bottom-1 text-hint">
<em><%= t('forms.example') %></em>
<em>123-45-6789</em>
</div>
<%= f.input(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<%# maxlength set and includes '-' delimiters to work around cleave bug %>
<%= f.label :ssn do %>
<strong>
<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
<div class="margin-bottom-1 text-hint">
<em><%= t('forms.example') %></em>
<em>123-45-6789</em>
</div>
<%= f.input(
<%= f.label :ssn do %>
<strong>
<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
<div class="margin-bottom-1 text-hint">
<em><%= t('forms.example') %></em>
<em>123-45-6789</em>
</div>
<%# maxlength set and includes '-' delimiters to work around cleave bug %>
<%= f.input(

Can we move the comment down closer to the input with maxlength set?

Comment on lines +7 to +11
<%= f.label :ssn do %>
<strong>
<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use the design system usa-label class here, which also adds the bolded effect?

Suggested change
<%= f.label :ssn do %>
<strong>
<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
<%= f.label :ssn, class: 'usa-label' do %>
<%= t('idv.form.ssn_label_html') %>
<% end %>

<%= t('idv.form.ssn_label_html') %>
</strong>
<% end %>
<div class="margin-bottom-1 text-hint">
Copy link
Contributor

Choose a reason for hiding this comment

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

My changes in #5481 are planning to remove this text-hint class. Can we use usa-hint as well?

I'm also a bit curious about the italicized effect, since that's not baked into the usa-hint class as well, though I think it would make sense to do that if that's how we'd want hints to appear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The proposed change in Figma calls for the italicized effect, so thats why I reached for the<em>.

Copy link
Contributor

Choose a reason for hiding this comment

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

The proposed change in Figma calls for the italicized effect, so thats why I reached for the\<em\>.

As discussed on Slack, it sounds like we'll want to use italics universally for hints. I can make that change in identity-style-guide, but in the meantime, maybe we add some temporary styles for .usa-hint { font-style: italic; } in the IdP?

Copy link
Contributor Author

@jmdembe jmdembe Oct 14, 2021

Choose a reason for hiding this comment

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

I can make that change in the IdP. I will also go ahead and remove .text-hint from the HTML and CSS as we are using it for the phone number hint.

Copy link
Contributor

@aduth aduth 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 👍

Comment on lines 10 to 11
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the spans ?

Suggested change
<span><%= t('forms.example') %></span>
<span>123-45-6789</span>
<%= t('forms.example') %> 123-45-6789

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used the span here to keep both of the elements inline, but after removing them, I realize we don't need them anymore.

@jmdembe jmdembe force-pushed the jd-LG-5208-ssn-help-text branch from 0e10156 to dd6220d Compare October 14, 2021 17:50
@jmdembe jmdembe merged commit 189db6d into main Oct 14, 2021
@jmdembe jmdembe deleted the jd-LG-5208-ssn-help-text branch October 14, 2021 20:31
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.

3 participants