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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interpretation location a variable in iRegs #5716

Merged
merged 1 commit into from
May 8, 2020

Conversation

niqjohnson
Copy link
Member

We're adding inline interpretations to Regulation D. Unlike all of our other regs, Reg D houses its interpretations in Appendix A instead of Supplement I. We had "Supplement I" hardcoded into the text of the links at the end of all inline interpretations, which didn't make sense for inline interps in Reg D. This PR fixes that by making the reference to the location of the interps in those links a variable and sets up a special case for Reg D interps.

Changes

  • The part of the link in inline interpretations that points to the interp in the regulation text is now a variable that will be "Appendix A" only for Reg D and "Supplement I" everywhere else.

Testing

  1. Make sure you have the latest production database.
  2. Go to the version of Reg D that has inline interpretations in it, http://localhost:8000/policy-compliance/rulemaking/regulations/1004/2021-07-22/
  3. Verify that the links at the end of all the inline interps there say "See interpretation of {{whatever}} in Appendix A"
  4. Check the inline interps in other regs to make sure the links at the end of those continues to say "See interpretation of {{whatever}} in Supplement I"

Screenshots

reg-d-interp

Notes

@willbarton and I were chatting about this one, and we both agree that hardcoding a special case for Reg D in the inline_interp template isn't the best way to handle this. A much better way would be to make the location of each inline interp available as a context variable in the template instead. But that's a much tricker change that needs some more thought, so we agreed to go with this change in the template for now.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the CFPB development guidelines
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 馃憞)
  • Project documentation has been updated
  • Reviewers requested with the Reviewers tool 鉃★笍

Testing checklist

Browsers

  • Chrome on desktop
  • Firefox
  • Safari on macOS
  • Edge
  • Internet Explorer 9, 10, and 11
  • Safari on iOS
  • Chrome on Android

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

We're adding inline interpretations to Regulation D. Unlike all of our other
regs, Reg D houses its interpretations in Appendix A instead of Supplement I.
We had "Supplement I" hardcoded into the text of the links at the end of all
inline interpretations, which didn't make sense for inline interps in Reg D.
This commit fixes that by making the reference to the location of the interps
in those links a variable and sets up a special case for Reg D interps.
@niqjohnson niqjohnson merged commit a423d5a into master May 8, 2020
@niqjohnson niqjohnson deleted the fix-interp-source branch May 8, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants