Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add choice of files to package for download for datasets over zip maximum #1956

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

ahamelers
Copy link
Collaborator

@ahamelers ahamelers commented Dec 17, 2024

Closes datadryad/dryad-product-roadmap#3325

I think this solution is pretty elegant as it uses the same mechanisms for all datasets—it adds the ability to select files for packaging and download, then for datasets under the zip max, it hides the (checked) checkboxes and changes some text (so the experience remains as it currently is on production).

For datasets over the zip max, it allows you to select any files under the maximum, and as you select it disables checkboxes for files that, if you added them, would put you over the max.

While the ability to select/deselect all was requested, I have not implemented this as I can't think of a way to do it that makes sense while not allowing users to select more than the size limit—it would have to do something like start selecting all starting from the top but stop once the limit is reached, which I think might be frustrating and confusing.

The easiest way to test this is to adjust your dev or local APP_CONFIG.maximums.zip_size value way down (after doing this and restarting rails you may also need to hard refresh your browser to clear your javascript cache of the previous stored value)

@ahamelers ahamelers requested a review from alinvetian December 17, 2024 18:07
@ahamelers ahamelers requested a review from ryscher December 18, 2024 10:39
Copy link
Contributor

@alinvetian alinvetian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alinvetian alinvetian merged commit dfbf905 into main Dec 19, 2024
5 checks passed
@alinvetian alinvetian deleted the choose-file-zip branch December 19, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to select individual files for download
2 participants