cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Add update-in-progress alert to sidebar of all regulation pages #850

Closed niqjohnson closed 6 years ago

niqjohnson commented 6 years ago

Show the update-in-progress alert from #843 in the sidebar of all pages of an affected regulation instead of just the landing page.

Additions

Changes

Testing

  1. Rebuild the frontend assets from this branch with ./frontendbuild.sh
  2. Start eRegs locally from this branch (EREGS_API_BASE=https://www.consumerfinance.gov/eregs-api/ ./runserver.sh if you're running eRegs inside of cf.gov; EREGS_API_BASE=https://www.consumerfinance.gov/eregs-api/ python manage.py runserver if you're running it standalone).
  3. Pop on over to eRegs at http://localhost:8000/eregulations/ and go to a reg that has updates in progress. Reg B (1002) is a good candidate since it has every page type that the new alert will appear on.
  4. Verify that the update-in-progress alert appears in the sidebar on every page type in the reg as shown in the screenshots below:
    • Regulation text
    • Appendicies
    • Interpretations
    • Section-by-section analysis (1002.4 has SxS if you need an example)
    • Diffs
    • Search results

Screenshots

Reg with no SxS Reg with SxS Reg with definition SxS Diff Search
reg-no-sxs reg-yes-sxs reg-def sxs diff search

Notes

niqjohnson commented 6 years ago

@higs4281: Ah, sorry, I think I forgot a step in the instructions. Since this touches some JS, try rebuilding the frontend assets with grunt build before you start the server (I updated the original PR comment to add that step).

contolini commented 6 years ago

The alert doesn't consistently appear on the search results page, but I think that's a bug with the search results page template and not with the alert (the help module doesn't always appear either, even on production).

Good find. I'm going to dig into this a little bit.