-
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: Error pages #2585
base: refactor/recaptcha-copy
Are you sure you want to change the base?
reCAPTCHA: Error pages #2585
Conversation
37c0630
to
817bae4
Compare
benefits/static/css/variables.css
Outdated
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 didn't change or touch this file at all.... the linter did this!
benefits/templates/error-base.html
Outdated
@@ -0,0 +1,26 @@ | |||
{% extends "core/base.html" %} | |||
{% load i18n %} |
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.
Maybe this {% load i18n %}
is unnecessary???
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 it, there are no {% translate %}
tags on this base page.
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
benefits/templates/error-base.html
Outdated
{% block page-title %} | ||
{% block title %} | ||
{% endblock title %} | ||
{% endblock page-title %} |
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.
Is this necessary? Test.
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 wouldn't think so. I would think the inheriting error page e.g. 404.html
or whatever could just use the
{% block page-title %}
directly, right?
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.
So this was not necessary, but I had to then go back to each 40X
error page and change page-title
to `title.
This anti-pattern is also exists on landing
/agency-index
(which btw is confusing naming. landing-base
/agency-landing
might be less confusing.
{% load i18n %} | ||
|
||
{% block title %} | ||
{% translate "Start over" %} | ||
{% endblock title %} | ||
|
||
{% block headline %} | ||
{% block icon %} | ||
{% include "core/includes/icon.html" with name="sadbus" %} |
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 love this refactor to have all error pages inherit from error-base.html
😍
I think this icon include could be moved there as the "default" icon. Which means it wouldn't have to be repeated on all these regular error pages.
That doesn't prevent us from overriding it on error pages that do need a custom icon.
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.
Ooooh yes!
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.
Default sad bus.
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
<div class="col-lg-6"> | ||
<div class="mt-5 pt-4 text-center"> | ||
{% block icon %} | ||
{% endblock icon %} |
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.
See comment above about a "default" icon here.
e24f966
to
b47401d
Compare
I noticed that the transit agency name bolding on agency links is a regression on |
d38b680
to
812446c
Compare
closes #2545
What this PR does
error-base.html
(previously waserror.html
). Now both Admin and Benefits have anerror-base
. Thebase
naming is used like this now:, to let the developer know that this is a template that inherits from
base.html
, and other templates then inherit it.error-base.html
now makes it so that there is one place to make these changes, making it easier to review also. When making a new error page that is based on this template/design, the developer should not have to write any padding/margin/centering/alignment classes or code. They should only have to write copy (headline-text), create a new or use an existinginclude
s for an icon, add any<p>
of text, and use an existing button, or create a new one (the button might have existing CSS classes, likelogin
). But there shouldn't be a need for any newrow
s orjustify-content-centers
orcol-lg-6
. That is the responsibility of theerror-base
template.How
error-base
works:Error pages
Side note outside of the scope of this PR/Milestone
agency-links
, but it's not. Not part of this PR.Start Here
andReturn home
andTry again
. Not part of this PR.reenrollment-error--calfresh
andstart--medicare
at least. Not sure why. Not part of this PR.