mcneilco / acas

http://mcneilco.com/acas.html
GNU General Public License v3.0
12 stars 5 forks source link

Mismatch between load experiment instructions and browse select behavior #1072

Closed hhan-schrodinger closed 1 year ago

hhan-schrodinger commented 1 year ago

Description

Instructional text for 'Load Experiment' says to 'select a file', but the file-browser GUI is multi select. This has caused issues where users may think they are uploading many experiments but are only uploading one.

To fix this, the "Browse Files..." button only allows users to select one file while uploading. Since users can also drag and drop multiple instead of using the "Browse Files..." button, logic was put in place to block validation when multiple files are trying to be uploaded. A error message explains that only one file can be uploaded at a time when this is attempted.

How Has This Been Tested?

Tried to use the "Browse Files..." button to select multiple files (no longer possible). Dragged and dropped multiple files and tried to upload them and saw that validation/upload was blocked. Subsequently tried with single files to ensure that the uploading and validation still worked.

hhan-schrodinger commented 1 year ago

Also want to note, that the (really old) file upload widget we are using actually has an option for maxNumberOfFiles. I don't now why we aren't using it, but it might be worth a shot passing the argument to it here and see what happens

https://github.com/blueimp/jQuery-File-Upload/wiki/Options#maxnumberoffiles

Gave it a shot, no luck sadly!

brianbolt commented 1 year ago

Setting maxNumberOfFiles: 1 on the file upload widget worked for me.

Screenshot 2023-01-26 at 1 40 30 PM Screenshot 2023-01-26 at 1 40 42 PM
hhan-schrodinger commented 1 year ago

Setting maxNumberOfFiles: 1 on the file upload widget worked for me.

Screenshot 2023-01-26 at 1 40 30 PM Screenshot 2023-01-26 at 1 40 42 PM

Oof, realized I had a typo and wrote mmaxNumberOfFiles which is why it didn't work. Thanks!

brianbolt commented 1 year ago

@hhan-schrodinger are you waiting on a review from @brianbolt ?

Not anymore.