-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eligibility Start: Contactless Pay Modal #1523
Conversation
bda411e
to
81d90b8
Compare
@machikoyasuda I rebased this on |
81d90b8
to
48364c8
Compare
48364c8
to
934e683
Compare
b8c6bb4
to
72bbe44
Compare
<p> | ||
{% translate "eligibility.pages.start.bankcard.text" %} | ||
{% translate "eligibility.pages.start.modal.title" as trigger_text %} | ||
{% include "core/includes/modal-trigger-link.html" with id="contactless-modal" classes="modal-trigger--link" text=trigger_text %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this modal-trigger--link
class is applied to each, could it be moved to the common include?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could, but in general, I want to keep the includes more flexible and less restrictive - so I opted to keep the CSS class out of the includes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the fact that this specific include is the modal trigger link... like, we always want that class associated with that include right? It isn't a more generic include that is used in different ways.
Definitely agree with you in general to try and keep them more flexible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to take a different CSS refactor approach here: 04bb644#diff-744df555aee38173a0b0868baa7befa720e6a28f80747523e74e724c126cd381R708-R729
Similar to how @angela-tran's external link CSS selector grabs all links, the code that adds the question mark icon grabs all links with [data-bs-toggle="modal"]:not(.btn)
- that is, all modal triggers that are not .btn
style buttons. All the modal triggers besides the Agency Selector have the question mark.
The one modal trigger that needs additional styles is the Login.gov icon button - so I added those as CSS Bootstrap utility classes.
benefits/eligibility/templates/eligibility/includes/modal--contactless.html
Outdated
Show resolved
Hide resolved
<!-- Button to trigger modal --> | ||
<button type="button" class="modal-trigger--link" data-bs-toggle="modal" data-bs-target="#identity-verification-help"> | ||
{% translate "eligibility.pages.start.senior.help.link_text" %} | ||
</button> | ||
{% translate "eligibility.pages.start.senior.help.link_text" as trigger_text %} | ||
{% include "core/includes/modal-trigger-link.html" with id="identity-verification-help" classes="modal-trigger--link" text=trigger_text %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting thing I learned: The above red code produces this tiny extra space between the end of the word
verification
and the (?)
By passing in the trigger text into the includes instead, the mysterious extra space is removed.
I think something about the new line might be adding a space or something. Not sure!
.modal-trigger--link { | ||
background: transparent; | ||
border: none; | ||
color: var(--primary-color); | ||
font-family: var(--bs-body-font-family); | ||
font-weight: var(--bold-font-weight); | ||
letter-spacing: var(--body-letter-spacing); | ||
padding: 0; | ||
margin-right: -5px; | ||
text-decoration: underline; | ||
text-decoration-style: solid; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are no longer necessary b/c we're using an <a>
element for the modal trigger. These classes were only overriding <button>
defaults and adding <a>
defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me 👍
closes #1475
What this PR does
How to test
Screenshots
Mobile: Trigger
Note: Now that the LittlePay modal is also a text modal, there is a chance that the (?) breaks into a second line, on narrower devices.Mobile: Modal
Desktop: Trigger
Desktop: Modal - English
Desktop: Modal - Spanish
Mobile: Modal - Eng and Span with Go back button