Skip to content

[25.0] More fixes to FormData drag and drop and typing #19900

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

Open
wants to merge 9 commits into
base: release_25.0
Choose a base branch
from

Conversation

ahmedhamidawan
Copy link
Member

@ahmedhamidawan ahmedhamidawan commented Mar 25, 2025

@mvdbeek has pushed a commit that should fix map-over of collection DCEs. Fixes #20315

The rest of these changes (from a while ago 😅) are improvements/fixes for drag and drop as a follow up to changes in #19866.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@ahmedhamidawan ahmedhamidawan marked this pull request as draft March 25, 2025 18:19
@ahmedhamidawan ahmedhamidawan force-pushed the form_data_various_fixes branch from afafdc4 to 34f8de5 Compare June 4, 2025 18:25
@ahmedhamidawan ahmedhamidawan changed the base branch from dev to release_25.0 June 4, 2025 18:25
@github-actions github-actions bot changed the title [WIP] More fixes to FormData drag and drop and typing, and adds tests [25.0] [WIP] More fixes to FormData drag and drop and typing, and adds tests Jun 4, 2025
@ahmedhamidawan ahmedhamidawan changed the title [25.0] [WIP] More fixes to FormData drag and drop and typing, and adds tests [25.0] More fixes to FormData drag and drop and typing Jun 4, 2025
@ahmedhamidawan ahmedhamidawan added this to the 25.0 milestone Jun 4, 2025
@ahmedhamidawan ahmedhamidawan added release-testing-25.0 Issues stemming from 25.0 release testing process and PRs to address them and removed release-testing-25.0 Issues stemming from 25.0 release testing process and PRs to address them labels Jun 4, 2025
@ahmedhamidawan ahmedhamidawan requested a review from davelopez June 4, 2025 19:34
@ahmedhamidawan ahmedhamidawan marked this pull request as ready for review June 4, 2025 23:23
@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

We can’t do that, this breaks reruns of mapped over jobs.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

That’s not what we discussed in the backend meeting, you can’t allow paired collections in a non-paired input is the issue

@ahmedhamidawan
Copy link
Member Author

That’s not what we discussed in the backend meeting, you can’t allow paired collections in a non-paired input is the issue

But then, if you try a (non DCE) pair as an input here for this, it doesn't error out.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

I am not sure I understand this comment ? A DCE representing a list should and does work currently.

@ahmedhamidawan
Copy link
Member Author

Sorry, since you said:

you can’t allow paired collections in a non-paired input is the issue

I tried using a pair as in input to this same tool, and it doesn't produce the error (from Jen's issue). Its only when I try a pair that is inside a collection that this fails.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

We're talking about DCEs, so that's what I'm doing. And it works on lists inside of list:list collections.

@ahmedhamidawan
Copy link
Member Author

Ah ok

So it's a particular thing where, on the client we can look for if it's a DCE that is a paired collection, disallow it as a drag and drop input unless that input specifically allows that

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

That sounds right. The logic should all be there already, since it is the same that's used for hdcas, it's just that you'll likely have to pass along the collection type when you start dragging (as DCEs proper don't have a collection type, that is part of the element_object, however inside the parent you should know what what each member of the collection represents).

@ahmedhamidawan
Copy link
Member Author

We're talking about DCEs, so that's what I'm doing. And it works on lists inside of list:list collections.

I just tried list:list and it produces that error too:

list_list_also_errors.mp4

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

It works fine on multiple="true" inputs. I would suggest fixing this, instead of removing it.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 5, 2025

I've pushed a commit that should fix map-over of collection dces.

@ahmedhamidawan
Copy link
Member Author

Oh nice, so this fixes the bug reported in #20315 as well, because now we successfully accept DCE collections (even pairs!) as valid inputs here:

form_data_various_fixes_2.mp4

If a FormData has explicit collection types, that is already something we check and confirm against even on drag and drop.

So, I will remove the commit now that disallowed DCE collections as inputs (and update the PR description...)

For some reason, I had to use a counter `ref` to trigger this update as without it (a computed on `keepOptions`, turning `keepOptions` itself to a `ref` etc) did not update when `keepOptions` was changed.
This refers to `FormData` elements without the collection variant (only single or multiple dataset variants).

Explained in galaxyproject#19866 (comment)
@ahmedhamidawan ahmedhamidawan force-pushed the form_data_various_fixes branch from 409c1a3 to e6755dc Compare June 5, 2025 16:51
@ahmedhamidawan

This comment was marked as outdated.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 6, 2025

e6755dc definitely needs tests that exercise basic runs with DCEs as well as map over handling.

@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Jun 6, 2025

Good point, I can add backend tests.

@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Jun 9, 2025

I have added an API test, and ensured it tests the case where DCEs are passed as inputs directly. Tested that it breaks without your changes. @mvdbeek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug collections: Inner pair (only) of a paired-end collection is accepted by drag and drop, but this produces an error about the DCE type
2 participants