This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
Enable downloading facility list item matches CSV #233
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kellyi
force-pushed
the
ki/download-facility-list-items-csv
branch
5 times, most recently
from
February 27, 2019 20:04
fc11836
to
0ae934a
Compare
kellyi
changed the title
WIP Enable downloading facility list item matches CSV
Enable downloading facility list item matches CSV
Feb 27, 2019
kellyi
force-pushed
the
ki/download-facility-list-items-csv
branch
2 times, most recently
from
February 28, 2019 16:47
3484a05
to
c156d42
Compare
I rebased this on |
jwalgran
reviewed
Feb 28, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working perfectly in Chrome, Firefox, and Safari on Mac and IE 11 on Windows. The implementation is straightforward and clear.
I commented on #204 that I think we should include lat
and lng
columns, which will require modifying the FacilityListItemSerializer
.
cabf1b7 updates the serializer and the csv export functionality to add the following fields for rows:
& also updates the tests and prop types. |
Looking at this now |
jwalgran
approved these changes
Mar 1, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well.
- add papaparse library - create utility functions to format list items data into CSV rows - add tests for CSV download utility functions - update list details page header to have buttons for downloading CSVs and returning to the main lists page
kellyi
force-pushed
the
ki/download-facility-list-items-csv
branch
from
March 1, 2019 18:00
cabf1b7
to
a588b10
Compare
Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Overview
This PR enables users to download CSVs of facility match data from the list details page. I created a suite of utility functions and tests for formatting the data into a 2-d array, then used Papaparse along with the existing FileSaver library to handle downloading it.
Connects #204
Demo
Sample CSV:
15_list eight_2_27_2019.csv.txt
Notes
Only the second commit is work for this issue, but feel free to test the first commit too (which is properly up as a PR in #235)
Testing
./scripts/update
./scripts/test
to verify that the tests pass