zooniverse / wildcam-gorongosa-education

This is WildCam Labs, the education/exploration-oriented extension of the WildCam Gorongosa project.
https://lab.wildcamgorongosa.org/
Apache License 2.0
0 stars 1 forks source link

Fix 284 by adding AlternateDownloader to handle Safari's nonsense #286

Closed shaunanoordin closed 8 years ago

shaunanoordin commented 8 years ago

Fixes #284

What?

How?

WARNING: it may be conceivable that, in the future, the amount of data that a user can query will grow even larger, exceeding the already generous upload limit, so we need to consider preemptively curbing the download size at the app level. Right now, the largest CSV file that can get echoed (uploaded-then-downloaded-again) is about 12MB in size, if the user requests for all aggregated results. I'm looking into zipping the content to reduce strain on the EduAPI.

@simoneduca, please feel free to review and comment on this, as I'm thinking of generalising the CSV download function into a component that can be used by Students>Assignments, not just Map Explorer.

@ali I just realised how ironic it is that it's so difficult to get a Safari going in Gorongosa.

shaunanoordin commented 8 years ago

Just to clarify the New Plan:

I'm taking a break from the zipping functionality for the moment; I may need to simply limit all downloads to 10000 items like before for the time being, while I figure out wtf is up with the file formats I'm getting back.

The individual functions are working fine, but since they tend to be rather interlocked in the supercomponents they exist in, I'm still trying to find an elegant way to package all those functions into a standalone SuperDownloadButton component.

shaunanoordin commented 8 years ago
shaunanoordin commented 8 years ago

screen shot 2016-08-19 at 17 55 20 New look

@simoneduca, this is ready for review when we're back next week! Woot!

simoneduca commented 8 years ago

On my screen

screen shot 2016-08-22 at 14 50 30

I'd recommend setting max-width: 75em in .student-assignmentlist

simoneduca commented 8 years ago

Please add readOnly to the input fields in the form of SuperDownloadButton to suppress react warning Warning: Failed form propType: You provided avalueprop to a form field without anonChangehandler. This will render a read-only field. If the field should be mutable usedefaultValue. Otherwise, set eitheronChangeorreadOnly. Check the render method ofSuperDownloadButton.

shaunanoordin commented 8 years ago

Update:

screen shot 2016-08-22 at 16 23 09

👍 Thanks for the feedback, @simoneduca!

simoneduca commented 8 years ago

LGTM 👍