-
Notifications
You must be signed in to change notification settings - Fork 43
Toggle reg update messages via settings #843
Conversation
This commit adds support for a new Django setting, EREGS_REGULATION_UPDATES, that allows for placement of a message on certain regulations to let users know that an update in progress. This allows for a central place to toggle these updates instead of requiring changes on each reg's specific landing page. Implementation is done via a new {% update_in_progress %} template tag that can be passed a regulation part, that checks the hardcoded list in settings. This change also removes the hardcoded update message that currently appears on part 1026 (Reg Z) and so any deployments will need to add the setting like this to maintain current behavior: \# in Django settings file EREGS_REGULATION_UPDATES = ['1026']
Add the "standard" class to the link in regulation update notifications to give that link the proper hover and active styles.
This is looking and working great for me. I added one small style tweak in a153adc to get the correct hover and active states on the link in the notification text, but otherwise I think this design is fine for now. In a future iteration I'd like to revisit the design of this landing page message alongside figuring out how this message should display on other pages of a regulation, but I don't think that work should hold up this PR. Content-wise, I think this message works well on landing pages both with and without new amendment notifications. I'm still waiting to hear back from other stakeholders on the final wording, though. If they come back with any changes, I'll push an update to this branch. Code-wise, I got the update notification to show up by defining |
Alerts on regulation landing pages can now come in three flavors: just an alert about new amendments taking effect in the future, just an alert that we're in the middle of making updates to a regulation, and an alert that combines both.
@chosak, I pushed one more commit to add the final styling and language. Do we need a third-party to do a review of everything? |
@niqjohnson I tried this locally and it works well for me. This is a really nice design for the combined messages! If you want to merge, go ahead, otherwise I can. Either way, once this is merged I can tag a new release of regulations-site (or show you how to, if you're interested). Then we'll need to open a related PR on cfgov-refresh to bump the version there and also set the appropriate value for |
This commit bumps the optional regulations-site package to 2.2.1 to add support for a new Django setting, EREGS_REGULATION_UPDATES, that allows for placement of a message on the landing page of certain regulations to let users know that an update in progress. See cfpb/regulations-site#843
This commit adds support for a new Django setting,
EREGS_REGULATION_UPDATES
, that allows for placement of a message on certain regulations to let users know that an update in progress. This allows for a central place to toggle these updates instead of requiringchanges on each reg's specific landing page.
Implementation is done via a new
{% update_in_progress %}
template tag that can be passed a regulation part, that checks the hardcoded list in settings.This change also removes the hardcoded update message that currently appears on part 1026 (Reg Z) and so any deployments will need to add the setting like this to maintain current behavior:
Documentation has been updated in the
README.md
file and new unit tests have been added.I'm assigning this PR to @niqjohnson pending his revisions on the design of the message, please feel free to push any desired changes to this branch.