School roster: Add minimal download CSV button #2673
Merged
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.
Who is this PR for?
New Bedford MS folks
What problem does this PR fix?
We added this back in 2016 in a particular format as the first way to export to PowerBI, and then removed it in December 2016. We noticed in January 2018 that it wasn't here anymore, but didn't take action since no one was missing it :) I think we didn't immediately re-add it since the old way we used in Healey originally wasn't fast enough for a larger school like Normandin. This past June (#2507) I optimized how this works for a districtwide list, but that was only for project leads so includes things like student address and race that we'd want to scrub from an export on the overview page.
What does this PR do?
This adds CSV download, deferred to user action. We'll deploy and see if it works well enough with large schools, or whether we need to swap to the server side. This doesn't download the exact same data as is shown in the UI; this PR is just aimed at seeing if this works well enough with larger schools.
Also separately updates the server-side export (only exposed to project leads) to use a safelist rather than grabbing all fields on the model.
Screenshot (if adding a client-side feature)
Checklists
Which features or pages does this PR touch?
Does this PR use tests to help verify we can deploy these changes quickly and confidently?