This is a big change so let's try to have this whole thing done by end of the quarter.
RELATED ISSUES:
Export to PDF wireframe - #29
Export to CSV feature - #21
PART 1: Export to CSV
Once @uci-mars has the wireframe ready, you can begin. In the meanwhile, make sure the export to CSV feature is working properly. Merge the master branch into the "export-to-csv" branch and work in the "export-csv" branch until you are sure the export to CSV feature works as intended.
screenshot of export-csv branch:
![image](https://user-images.githubusercontent.com/44284982/98056332-883f2f00-1df4-11eb-9c79-583fe3df1729.png)
Might have to clarify with Mars @uci-mars on this one. From my understanding, export to CSV should initiate a download of a CSV of the data being visualized. So, since we have dummy data it should just be a CSV file of the chosen time range (e.g., January 1st to January 3rd) for a particular sensor/bin. Check the API call and work with it, it will change later on most likely: https://github.com/zotbins/ZotBinsAPI/blob/master/README.md#get-observation-stats-as-csv
From what I checked, the export to csv button is broken and wont generate the file. please take a look at that and see if you can get it function. It's possible that this will be a really easy fix/change.
DELIVERABLE: A downloadable CSV file that shows the data retrieved from the API. Then, submit a PR.
DEADLINE: 1-2 weeks from now.
PART 2: Export to PDF
Add a new drop down to the CSV button like so
![image](https://user-images.githubusercontent.com/44284982/98056777-93df2580-1df5-11eb-92c7-a11279b70b8a.png)
from the drop down arrow, they should be able to choose their file type. With this kind of functionality in place, it will let the web app support other file types. But for now, just add one for the drop down for PDF.
Once they select pdf, the button's text will change to "Export PDF".
In terms of functionality, the idea is similar to the Export to CSV feature. It will need to initiate a download of a PDF report. Check the Figma link in the agenda. You would need to make an API call or find a way to retrieve all the data being visualized on the landing page at the moment of the "Export to PDF" button press.
For this feature change, these are the most interesting questions to tackle:
- How do you generate a PDF?
- How do you style the generated PDF?
- How do you start a download of that generated PDF?
- Should the PDF report be generated dynamically or are we storing all of them?
DELIVERABLE: A downloadable PDF file report that shows all the data being visualized on the front page. Then, submit a PR.
DEADLINE: End of quarter.
Let me know if you have any questions. We have 5-6 weeks starting from today, so let's see how much we will be able to get done this quarter! This is a big feature and will be very interesting to see.