311-data icon indicating copy to clipboard operation
311-data copied to clipboard

Render 311 requests as we receive them

Open nichhk opened this issue 1 year ago • 0 comments

Overview

Currently, by default, the frontend pulls request data by making 7 concurrent API calls, one for each day of the past week. We wait until all the calls complete to render the request data on the map.

To improve the user experience, we can render request data as it comes in; i.e., as soon as we get the data for a day, immediately render it.

Action Items

  • [ ] here is where we block on all the responses. We should remove the Promise.all call and replace it with the appropriate code to render as soon as we get each day's worth of data.
  • [ ] We'll also need to modify the way that we are updating the state in redux, which is the code block immediately following. We track two things in redux: the actual request data, and the date ranges which are covered by the request data. So these redux updates will need to be split into per-day calls as well.

nichhk avatar Oct 21 '22 23:10 nichhk