Closed bcherny closed 6 years ago
Maybe even create a "Run Analysis" button? Since the user may be tweaking service areas and we don't want to re-calculate each time. Thoughts @viviandien?
This would make the Analysis controls (Enrollee dist, Adequacy std, Adequacy metric) not function well. The UI right now is optimized for real-time analysis interaction. If we wanted to make it more linear, I think we'd have to move those Analysis controls into a left-drawer instead of hovering over the map.
I think it would still work. Note that we don't recompute after selecting the hovering features; just when reselecting data from the left panels. My point is that it could take a while to select all the correct zipcodes, and it does not make sense to automatically re-compute before the user has selected everything. The flow would still be real-time for the distance and distribution choices though @viviandien :)
@ericboucher What is the downside of re-computing each time?
We would have to be pretty slick with the UX. As designed, when a user changes enrollee service areas, not only do the point As need to update real-time (location of dots), but so does the adequacy analysis (color of dots).
Are you proposing that we continue to keep the location real-time, but make the analysis gated by a button? ie: the coloring of dots and the charts in the Analysis drawer would be dependent on a Run Analysis button.
If we did this and it significantly saves on processing time, I think the proper flow would be:
@bcherny @ericboucher thoughts?
Before we jump to conclusions, maybe it's worth talking through what exactly the downside of re-calculating is. If there is a performance issue, there are likely some cheap optimizations we can make rather than degrade the UX.
Addressing this PR as part of https://github.com/bayesimpact/tds-frontend/pull/93.
Note: The original intent of this issue was simply to not show a Report unless both some Providers and some Service Areas are selected. The issue was then hijacked :) @ericboucher I moved the question you brought up to its own issue: https://github.com/bayesimpact/tds-frontend/issues/94.
Just like what we already do for Service Areas: