-
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
Adding alert label if file/size limit exceeded in selections table #1183 #1228
Adding alert label if file/size limit exceeded in selections table #1183 #1228
Conversation
This is designed to mimick Topcat as much as possible
Prevents an empty Grid item from appearing
Codecov Report
@@ Coverage Diff @@
## develop #1228 +/- ##
========================================
Coverage 97.51% 97.51%
========================================
Files 133 133
Lines 6753 6761 +8
Branches 2000 2008 +8
========================================
+ Hits 6585 6593 +8
Misses 153 153
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
See above comment. Also, if we're using the Alert
component for the other two warnings, should we use this warning for the empty_items_warning
? It would make it look more error like and since we've already included the mui-lab
library...
Too many files - you have exceeded limit of {fileCountMax}{' '} | ||
files - please remove some files |
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.
These strings need to be in the translation file - you should still be able to parameterise fileCountMax
and totalSizeMax
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.
I've given this some thought and decided to combine our ideas. I say we provide one <Alert>
object, like the one I've done, in the place where your empty_items_warning
is so that they aren't too many error messages on the page. We keep that <Alert>
there, with the appropriate error message, until no further errors remain on the page.
Empty items warning is now combined with alerts for file and size limits. Alert has also been moved to where the empty items warning was, above the download and remove all buttons. Also moved text for errors to translation file
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.
Good that the changes are addressed - I'm just wondering if it's better to only display one error or to display the errors individually. I'm thinking of times when I've been frustrated when filling out a form that only displayed one error meant that I felt I was playing whack-a-mole with the errors vs if you show all the errors individually then the user knows everything they need to know at once.
Although I'm not sure it's too big of a deal, since the error message will update on every action the user does to try and remedy the message (i.e. removing items from the cart via the remove item buttons) so perhaps it's fine to only show a single error? Thoughts?
Kinda flip flopping on the idea. Maybe it is nicer to put the error message right next to the offending item for convenience (first screenshot). However, if all errors are present, this could cause:
To top it all off, I presume we'd want to use |
@sam-glendenning true about the height of the page, but I don't mind that too much as it should be a rare occurrence that the user needs to rectify themselves right? The empty item message should be very rare I'd hope, and not occur at the same time as the max items messages often. Also I wouldn't think we'd need a |
Fair enough. I'll put the alerts back where they were |
This means we now have a separate error message for every error
@louise-davies back we go again! |
Description
This implementation is designed to mimic Topcat as much as possible.
Here is Topcat:
And here is DataGateway with this feature:Later amendment - this is the updated screenshot
Both the text and the label are open to change if we feel its too wordy, etc. Alternatively, if we don't like the design at all, we can have an error notification appear instead. I wasn't too keen on this idea as it may cause notifications to appear too frequently if the user is excessively amending the selections table. I was also more of a fan of the error message appearing next to the offending item so the user can more easily tell what's wrong.
Testing instructions
Best run through SciGateway so the selections can be customised. To make things easier, change the
fileCountMax
andtotalSizeMax
values in download settings to much smaller values so that the labels can be displayed more easily. Try adding and removing things from the selections - the labels should appear and disappear as necessary.Agile board tracking
Closes #1183