fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

Add feature to promote assets to a new phase + move countywide toggle + UI tweaks #186

Closed smcalilly closed 2 years ago

smcalilly commented 2 years ago

Overview

This PR:

Includes some UI tweaks:

Demo

ccfp-assets-feature

Notes

Countywide

How do we want to deal with all the gis calculations when a project is considered "countywide"? This might throw off some of our existing calculations.

Map UI

I'm not in love with this map UI change but I needed to share it and not spend too much time moving things around/spinning my tires trying to get it perfect. We can discuss in our check-in on Monday.

Slow GIS backend

It takes a while to reload upon saving new assets or changing the phase (reason why in the next paragraph), so we might want to add a loading indicator.

The API can take a long time to process because we designed the API to save each geojson feature as a single LocalAsset, instead of saving the entire feature collection as a whole. So anytime any endpoint is called that deals with GIS stuff, it processes each individual local asset for a phase (most notably in the zones signal, in the phase distribution signal and now in the new promote assets serializer which calls those signals). Here's an example of what that data looks like coming from the client.

This backend implementation might be something we'll want to improve because it's been kind of tricky to deal with in a few places? It would be a pain to have to change once it's in production because we'll have to group/recreate all the existing localasset data.

Testing Instructions

smcalilly commented 2 years ago

@fgregg i made your suggested UI changes, thanks for your input. it feels a lot better.

promote-and-countywide