-
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
reCAPTCHA: Enrollment index #2575
reCAPTCHA: Enrollment index #2575
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
{% block call-to-action %} | ||
<div class="row d-flex justify-content-lg-end pt-8"> | ||
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8"> | ||
<div class="row d-flex justify-content-center pt-8"> | ||
<div class="col-12 col-lg-6"> | ||
{% block call-to-action-button %} | ||
{% endblock call-to-action-button %} |
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 block is only used by enrollment-index
.
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.
Note for #2540
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.
Hmm interesting observation 👍 Sounds like you're leaving any potential clean-up on this to be done in #2540?
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.
Yeah and this is turning into a true PR rabbit hole, but in the next PR for Enrollment Success/Logged Out, https://github.com/cal-itp/benefits/pull/2579/files#r1876743474, I moved some code out of call-to-action
to clean it up further. After https://github.com/cal-itp/benefits/pull/2579/files#r1876743474, in #2540 will be able to consolidate some of the blocks in base.
<div class="col-12 col-lg-6"> | ||
{% block media-items %} | ||
<ul class="d-flex list-unstyled ps-0 mb-0"> | ||
{% include "enrollment/includes/media-item--contactless-card--index.html" %} | ||
</ul> | ||
</div> | ||
{% endblock media-items %} | ||
{% block additional-info %} | ||
{% endblock additional-info %} | ||
{% endblock media-items %} | ||
{% block additional-info %} | ||
{% endblock additional-info %} | ||
</div> |
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 eliminates some div
itis:
Instead of having three <div class="row justify-content-center"><div class="col-lg-6"></div></div>
, we just have 1.
/* Media List */ | ||
|
||
:root { | ||
--media-item-icon-size: calc(64rem / 16); | ||
--media-item-icon-margin: calc(24rem / 16); | ||
} | ||
|
||
@media (min-width: 992px) { | ||
:root { | ||
--media-item-icon-size: calc(90rem / 16); | ||
--media-item-icon-margin: calc(32rem / 16); | ||
} | ||
} | ||
|
||
.media-list-icon-left-margin { | ||
margin-left: calc( | ||
var(--media-item-icon-size) + var(--media-item-icon-margin) | ||
); | ||
} | ||
|
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.
There are officially zero Media Item classes now. It's just a single <ul>
with some <li>
s in them, where there's always a <h2>
and some <p>
s.
Media items are used on two pages:
- Eligibility Start - There are 2 media items per flow. The content is semantically and stylistically a list. There is no "media" though, so it could be renamed to
heading-list
or something. - Enrollment Index - There is only 1 item, so it's not even really a list. On this page it really feels like a stretch to semantically even use a
ul
andli
. Just look at it:
Should this PR refactor Enrollment Index so it doesn't use the media-item
block and just has a <h2>
and <p>
in inner-content
? @angela-tran
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.
@thekaveman jinx!
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.
Media item now removed from Enrollment Index.
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.
Should this PR refactor Enrollment Index so it doesn't use the
media-item
block and just has a<h2>
and<p>
in inner-content? @angela-tran
(this question was essentially the same as the one in #2575 (comment))
Done by @machikoyasuda in 56b9322
|
||
msgid "We found your record!<br>Now let’s enroll your contactless card." | ||
msgid "We found your record! Now let’s enroll your contactless card." | ||
msgstr "" | ||
|
||
msgid "Eligibility confirmation" | ||
msgstr "" | ||
|
||
msgid "Your eligibility is confirmed!<br>You’re almost there." | ||
msgid "Your eligibility is confirmed! You’re almost there." | ||
msgstr "" |
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.
The copy is now free of any headlines with manual <br>
breaks in them.
{% block info %} | ||
{% include "enrollment/includes/info--contactless-card--index--calfresh.html" %} | ||
{% include "enrollment/includes/alert-box--warning--calfresh.html" %} | ||
{% endblock info %} |
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.
Taking suggestions for this naming. @thekaveman @angela-tran Really wasn't sure what to name the block (info
) or the includes file name. I could even get rid of the includes and just copy/paste the h2/p/modal in directly. Thoughts?
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 could even get rid of the includes and just copy/paste the h2/p/modal in directly.
I vote for this one
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.
Done by @machikoyasuda in 56b9322
…e cta to col-lg-6 width
c6d5503
to
e187a60
Compare
a744ac8
to
56b9322
Compare
@angela-tran Now ready for review! Incorporated your feedback on the media item template. |
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 changes look good to me.
Idk if you want to do this in a separate PR or as a part of this one, but now that Enrollment Index doesn't use any templates that inherit from core/includes/media-item.html
, I think we could rename all the media-item
templates to say eligibility-item
instead (since they're only used in Eligibility Start).
{% block call-to-action %} | ||
<div class="row d-flex justify-content-lg-end pt-8"> | ||
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8"> | ||
<div class="row d-flex justify-content-center pt-8"> | ||
<div class="col-12 col-lg-6"> | ||
{% block call-to-action-button %} | ||
{% endblock call-to-action-button %} |
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.
Hmm interesting observation 👍 Sounds like you're leaving any potential clean-up on this to be done in #2540?
@angela-tran Thank you Angela. I will do the renaming in #2540 |
closes #2546
What this PR does
<ul>
, just a regular headline and paragraph. Then, moves that code directly into the index template directly - removing the includes entirely.<br>
in them. I removed it.Test