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: agency links #1521
Refactor: agency links #1521
Conversation
8f3f977
to
479ed3e
Compare
0daecde
to
caeb72b
Compare
479ed3e
to
421b3f9
Compare
caeb72b
to
2d91f33
Compare
064d732
to
c1d847a
Compare
421b3f9
to
1159487
Compare
fb33b6c
to
37e2943
Compare
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 removal of viewmodel helper code in this PR looks great!
A separate thing I'm thinking about is that by moving the fields from TransitAgency
into the templates, it's not as easy for a non-developer to update that information from an admin interface - it would instead require a code change in a template. This came from me thinking about the documentation for configuring a new transit agency. The tradeoff I guess is between being able to customize what shows up in an agency's links vs. saying every agency should show the same info which we can then edit in the database.
This is a good point. Alternative idea:
Basically just removing the viewmodel layer, but still using the normal context and default rendering template. |
This sounds good to me 👍 |
37e2943
to
3162b6e
Compare
allows for passing in variables or taking the defaults from context
3162b6e
to
6700742
Compare
6700742
to
69f49fe
Compare
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.
Looks good!
Part of #1520
The
eligibility:unverified
view uses the agency links construct. They also show up in two other views:core:help
enrollment:retry
In
eligibility
andenrollment
, we assume an agency has been selected by the user.For
core:help
, the user may navigate there before selecting an agency, so we show all "agency links" for active agencies.This PR moves the variation and content to a new template field:
TransitAgency.links_template
, referencing anincludes
file specific for the agency. The include is used explicitly where it is needed in templates.This PR removes unused
TransitAgency
fields as well as deleting theButton.agency_contact_links()
viewmodel helper.