Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
docker-compose up -d --build
docker-compose exec api /bin/bash
make validate
ctrl/command+D
orexit
docker-compose exec web /bin/sh
npm run test
ornpx jest
npm run lint-fix
Description
Issue: #261 #257 #260
This pull request:
Next Steps
In order to get to Map UI MVP - there are 4 steps developers can take right now
Issue Device Name Saved to the Database #259: Add 'Device Type' as a column to the
Collection
Table, have the frontend include that in theformData
upon upload, and then pull that for the map display.Complete issue Links to Open Session Files on the Map Page #260 - I've gotten the 'Download Raw Data' div in the
ControlPanel
component to bring us to the API endpoint which contains the relevant files - but can't key intocurrentCollection.collection_files[0].file
even though I can see thefile
parameter in thecurrentCollection.collection_files[0]
object. That code is found lines 53-57 of theControlPanel
index.tsx file.Issue Initial Error from Collection Date API Request #258 - 'cancel' is being logged to the console every time we call the
getCollections
function in the map component. I don't know if we just need to remove thatconsole.log(error)
or if there's something not ideal happening.Bug that appeared during demo - after we changed dates, the API call and pollution data parsing were not cancelled and the pins still appeared on dates where there were no collections.
For future work to get to Map UI MVP - as a team we need to have discussions about:
Part of issue Improve UX on map loading #257 - specifically about the second checkbox - pushing the user to the map immediately after clicking save. I don't think this will be ideal with what's happening under the hood - the
collections
for the specific dates are called as soon as the component is mounted, and if we push to the map page without the newest collection being successfully saved yet, I can see it not coming up. I think there should be some loading indicator on the upload page after clicking save that we could design out.Issue Display and color code readings on the map #237 - developers can implement the 'air quality this session/today' display that appears on the wireframe once we figure out how we are going to calculate that. Currently we pull just collection pollution data one session at a time (was too slow and erroring out when we pulled all sessions from a day) - so we will have to think of something to get daily aggregate data and then processing that. Maybe upon save - the backend ends up parsing the files and saving an average AQ index per
Collection
instance, and then the frontend can average out the dailyCollection
AQ indexes after it retrieves theCollections
set per day.