-
Notifications
You must be signed in to change notification settings - Fork 5
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
Preventing download of empty files #1195 #1232
Preventing download of empty files #1195 #1232
Conversation
…#1195 This involves passing the size of the relevant entity to the download button. In table and card view, this involves making use of the sizeQueries array. If the button is disabled, the user can move their mouse over the button to show a tooltip explaining the file is empty and thus cannot be downloaded.
Codecov Report
@@ Coverage Diff @@
## develop #1232 +/- ##
===========================================
- Coverage 97.51% 97.47% -0.04%
===========================================
Files 133 133
Lines 6753 6785 +32
Branches 2000 2059 +59
===========================================
+ Hits 6585 6614 +29
- Misses 153 155 +2
- Partials 15 16 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Pointless having it anyway and removing it boosts test coverage
Other than those minor points about the tooltip it seems to be working well |
Description
This requires passing the size of the relevant entity to the download button. In table and card view, we make use of the
sizeQueries
array for this, disabling the download button until we can confirm the entity size is greater than zero (realistically, this happens quickly enough that the user does not notice). If the button is disabled, the user can move their mouse over the button to show a tooltip explaining the file is empty and thus cannot be downloaded.Testing instructions
This should be tested with SciGateway and both Dataview and Search. The download button appears as both a box and an icon in many places so it's important to test it enables and disables properly everywhere. If you're hooked up to the production IDS, you'll get a variety of empty and non-empty sets of data to properly test this. Make sure that every time the button is disabled, a tooltip displays over it. Also check to see how this all looks in light/dark mode and give any thoughts on that too if you have any.
Agile board tracking
Closes #1195