-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: various fixes for the Run > Files view #78
Conversation
With this pull request #41 gets reverted. Now when I upload files to Workspace they end up in Home. |
@Xarthisius Good catch! #41 was actually about creating folders, but was likely the same problem as it uses the same logic to determine the |
Looking good. Testing no. 10 from your list, I got into a very strange state. I selected the checkbox for the top level "Humans and Hydrology" dataset and that worked fine. I went to deselect it and instead select a single item from within the folder and things got weird. I can uncheck the checkbox, but clicking "Select" results in a new entry for the top level "Humans and Hydrology" folder. I can select a single file from within the dataset, but the top level folder remains: Basic test case:
|
@craig-willis good catch, I've noticed this before... I think that modal needs to be reworked quite a bit for #31 as well. The current implementation seems to get confused between what was previously added and what you're trying to add now. The navigation bits can still be preserved, but the additional panel showing a list of what has already been selected may help keep things straight. |
So I have a fix for the @Xarthisius any preference here? Should I make a new PR after this one gets merged, since there's already a lot going on in this one? What do you think? |
Please add it here and let's review it in a one go. |
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.
Re-tested with the new commits and things look great!
Ran into an unexpected behavior while testing the fix. Should "Remove" remove the file/dataset from My External Data (i.e., deselect) or remove from the system catalog? Currently, the "Remove" menu calls DELETE https://girder.local.wholetale.org/api/v1/folder/, effectively removing the dataset/file from Girder. Selected dataset or file still remain selected in "Selected Data" To repeat:
Something I can't readily repeat -- when I select an individual file in the folder, sometimes the folder is automatically selected for me. I'll try to get a repeatable test case. |
@craig-willis ahhh, I think this was an oversight on my part. While fixing #30, I think I accidentally made this view writeable. Will make a new commit to hide the "Remove" option there, is it is in fact deleting the dataset from Girder. |
…into fix-file-upload-bad-request
@bodom0015 I went through the test plan (and some more). Very nice! I filed issues for some minor things I've found. In particular #89 looks like something you might want to address here, but I'm open to merging this PR as-is and dealing with it in a separate branch. Please let me know what would you prefer. |
Good catch on these! I've pushed a fix for #89 as well as another minor bug I noticed. Apparently we could not upload the same file twice in a row due to using the onChange handler.. since the selected file technically wasn't changing, the upload would never trigger :D Clearing out the selected file(s) after it/them to the queue seems to workaround the issue |
@@ -209,6 +209,8 @@ export class TaleFilesComponent implements OnInit, OnChanges { | |||
});*/ | |||
}); | |||
}); | |||
|
|||
this.uploadQueue.delete(upload); |
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.
While it did successfully workaround the issue, I am amazed that this did not trigger a concurrent modification exception.. in other languages, deleting an item from an array that you're looping over is not allowed and likely not advisable here
Problem
Fixes #89 - Files upload twice
Fixes #50 - Adding External Data would return a 400
Fixes #48 - Uploading a file would result in a 400, even though the file appeared to upload successfully
Fixes #41 - Create Folder in Home actually creates the folder in the Tale Workspace
Fixes #37 - Files cannot be removed/downloaded until after refreshing
Fixes #33 - Data registration dropdown should auto-select first result
Fixes #31 - Show previously-added data on select-data-modal
Fixes #30 - Add button should be disabled for read-only Tales
Fixes #28 - External Data shows nothing even after adding a dataset
Approach
/chunk
endpoint - logic forinitUpload
appears to upload correctly (Upload file results in 400 bad request #48)createFolder
to use the same logic for choosingparentId
as theuploadFiles
function uses (Creating a folder in Home results with a new folder in workspace #41)select-data-modal
to show Selected Data on the right, as was previously true in the Ember.js dashboard ([View > Files > External Data] Add from Catalog modal doesn't display currrent dataSet #31)How to Test
Prerequisites: at least one Tale created, LIGO Tale
Item
, as expected, and not aFile
)10.5065/D6862DM8
and search