This PR adds a user analytics event so we can track adoption of the projects map, and it also stores the map toggle state in the query params so filtered map view urls can be saved or shared.
Testing
URL to test:
Local
Steps to test:
Start the local stack and explore the moped_user_events table in your DB GUI. You should see that the event_name column has a new value in its constraint called projects_map_load
In your local editor, go to the projects list view and toggle the map switch on. You should see a new row in the moped_user_events table capturing this event
Also, notice that the url query parameters include a new k/v pair for map which is either true or false
Test toggling the map on, adding some advanced filters, and then copying your url
In a new tab, paste the url and make sure that the projects map loads with your filters applied
You can also test clicking on project features and then visiting a linked project in the sidebar. Click the < All Projects link in the project summary page, and see that you are linked to the map with your previous filters applied
@chiaberry Thanks for catching that!! In previous down migrations, it looks like we dropped event rows that violate the constraint before updating it in the down migration. I'll do the same here. 🙏
Associated issues
Closes https://github.com/cityofaustin/atd-data-tech/issues/17601 Closes https://github.com/cityofaustin/atd-data-tech/issues/17480
This PR adds a user analytics event so we can track adoption of the projects map, and it also stores the map toggle state in the query params so filtered map view urls can be saved or shared.
Testing
URL to test:
Local
Steps to test:
moped_user_events
table in your DB GUI. You should see that theevent_name
column has a new value in its constraint calledprojects_map_load
moped_user_events
table capturing this eventmap
which is eithertrue
orfalse
Ship list