mysociety / local-intelligence-hub

https://www.localintelligencehub.com
Other
6 stars 2 forks source link

Show Google Form feedback modal on Area and Explore pages #576

Closed zarino closed 4 months ago

zarino commented 4 months ago

Screenshot 2024-07-03 at 17-43-50 Explore Local Intelligence Hub

Markup, styling, and JavaScript handling for feedback modal that only gets shown on Area and Explore pages if the user hasn’t already skipped or submitted it. Form is submitted, via Ajax, to a Google Form in the mySociety/TCC shared drive.

As part of this, I reused and refactored the CollapsableMailingListForm from the Area page, into a general setUpCollapsable function.

I also fixed a bug where the "shared" JavaScript in home-out-esm.js (such as the .form-check + .conditional-fields handling) wasn’t being loaded on Area or Explore pages. I guess, really, we should either rename home-out-esm.js to shared-out-esm.js, or we should break out the parts that are intended to be used on other pages, and leave home-out-esm.js for homepage-only stuff.

And since the feedback form gathers some personal information, I’ve updated the Privacy Policy to explain that.