-
Notifications
You must be signed in to change notification settings - Fork 10
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
Refactor: simplify Eligibility Index templates #2705
base: main
Are you sure you want to change the base?
Conversation
87bfb66
to
0aab438
Compare
9d35d85
to
4546b45
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Annoying issue with
|
Failed attempts to solve the issueUse one
|
I'll need to rebase on top of changes from #2714 and add a test to check |
use a single template that will be given each agency's specific context. no need for the template override field on `TransitAgency` or the individual templates anymore.
b5ed1ce
to
506f241
Compare
unfortunately this will just be added back if we run `makemessages` again. not sure how to solve this problem, will be thinking more on this.
this makes it so the template gets the computed value, and `makemessages` and `compilemessages` get the literal value.
a2d4fb3
to
e009625
Compare
This PR refactors the
eligibility.index
view so that it uses a single template. It uses a context dictionary from the agency to provide the template with copy.The
EligibilityIndex
class andeligibility/index.html
template support one or more paragraphs.Testing locally
git checkout refactor/eligibility-index-context
./bin/init.sh
cst
,mst
,nevco
,sacrt
,sbmtd
(see notes below)CST
If you're using the sample fixtures, you'll have one
TransitAgency
with slugcst
and see this Eligibility Index:✅
MST
To see MST's Eligibility Index, you need a
TransitAgency
with slugmst
. An easy way to do this is to change the slug of your existingTransitAgency
in the admin interface.The Eligibility Index shows MST copy ✅
NevCo
We can repeat the same process for the rest of the slugs, but notice that for some slugs, like
nevco
, an error is raised when we go to the Eligibility Index:It's trying to load a Nevada County agency card template, but we don't have that template because that agency-flow combination isn't actually supported, so we need to go remove that flow from the agency.
Enrollment flows
Transit agency
field to be blankNow we see Nevada County's Eligibility Index ✅
SacRT
SacRT's Eligibility Index has its two paragraphs of copy ✅
SBMTD
✅