Skip to content
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

Merged
merged 18 commits into from
Jul 21, 2023

Conversation

machikoyasuda
Copy link
Member

@machikoyasuda machikoyasuda commented Jul 12, 2023

closes #1475

What this PR does

  • Create Contactless modal
  • Add Contactless modal trigger
  • Bug: Fixes CSS bug on mobile
  • Refactor: Refactor all the modals that are triggered by text (rather than a button or an image, like the first Login.gov modal) - the Eligibility Start/Login.gov modal, Contactless Pay modal and LittlePay modal.
  • Fix: Add Go back button to the all informational modals on mobile

How to test

  1. Desktop: Make sure to open modal by clicking and also, keyboard tab focus + enter
  2. Mobile: Open, view whole modal and close modal
  3. Make sure all info modals have Back link and that the link works

Screenshots

Mobile: Trigger

image image image image image 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

image

Desktop: Trigger

image image

Desktop: Modal - English

image

Desktop: Modal - Spanish

image

Mobile: Modal - Eng and Span with Go back button

image

@machikoyasuda machikoyasuda self-assigned this Jul 12, 2023
@machikoyasuda machikoyasuda added this to the Veterans milestone Jul 12, 2023
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates i18n Copy: Language files or Django i18n framework labels Jul 12, 2023
@thekaveman thekaveman force-pushed the feat/1475-veterans--modal-contactless branch from bda411e to 81d90b8 Compare July 14, 2023 16:33
@thekaveman
Copy link
Member

@machikoyasuda I rebased this on dev because we merged #1533 which renamed a bunch of template files and caused other conflicts here. Hopefully I didn't clobber any of your work!

@thekaveman thekaveman force-pushed the feat/1475-veterans--modal-contactless branch from 81d90b8 to 48364c8 Compare July 14, 2023 16:39
@machikoyasuda machikoyasuda force-pushed the feat/1475-veterans--modal-contactless branch from 48364c8 to 934e683 Compare July 18, 2023 19:09
@machikoyasuda machikoyasuda force-pushed the feat/1475-veterans--modal-contactless branch from b8c6bb4 to 72bbe44 Compare July 19, 2023 19:02
@machikoyasuda machikoyasuda marked this pull request as ready for review July 19, 2023 22:58
@machikoyasuda machikoyasuda requested a review from a team as a code owner July 19, 2023 22:58
<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 %}
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

@machikoyasuda machikoyasuda Jul 20, 2023

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/locale/es/LC_MESSAGES/django.po Outdated Show resolved Hide resolved
Comment on lines 13 to 14
<!-- 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 %}
Copy link
Member Author

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.
image
image

I think something about the new line might be adding a space or something. Not sure!

Comment on lines -709 to -720
.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;
}
Copy link
Member Author

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.

@machikoyasuda machikoyasuda requested a review from thekaveman July 20, 2023 19:50
Copy link
Member

@angela-tran angela-tran left a 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 👍

@machikoyasuda machikoyasuda merged commit caae08c into dev Jul 21, 2023
@machikoyasuda machikoyasuda deleted the feat/1475-veterans--modal-contactless branch July 21, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates i18n Copy: Language files or Django i18n framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eligibility Start - Modal for Contactless Cards/Eligibility Start (All flows)
3 participants