Skip to content
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

Add tags to output datasets from tool form #19225

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

PlushZ
Copy link
Contributor

@PlushZ PlushZ commented Dec 1, 2024

This PR introduces functionality to let users add tags to output datasets directly from the Tool Form in Galaxy. The tags are captured in the frontend, passed to the backend during job submission, and associated with the appropriate output datasets upon job completion.

UI:

  • Tags Section:

    • Option 1 (current code version): A static "Add tags" section is displayed above the "Run Tool" button. The tag functionality is powered by StatelessTags.vue, which allows users to add and manage tags dynamically.

      Flow:

      1. Users type a tag name in the input field.
      2. Tags are dynamically displayed and can be removed before submission.
      3. Tags are included in the job submission payload.

      Static Tags Section 1

      Static Tags Section 2

      Static Tags Section 3

    • Option 2: A collapsible dropdown toggle button is introduced to optionally show or hide the tags section. This alternative implementation uses Tag.vue for tag functionality.

      Flow:

      1. Users click on the dropdown toggle to reveal the "Add tags" section.
      2. Users can add or remove tags dynamically within the dropdown.
      3. Tags are included in the job submission payload.

      Dropdown Tags Section 1

      Dropdown Tags Section 2

      Dropdown Tags Section 3

  • Job submission:

    • Modified the onExecute method to include tags in the payload sent to the backend.

Backend:

  • Extracted tags from the job submission payload.
  • Validated and applied the tags to output datasets during job processing

Issues to be solved with this PR: #8710, #13885

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.

@github-actions github-actions bot added area/UI-UX area/database Galaxy's database or data access layer area/tool-framework labels Dec 1, 2024
@PlushZ PlushZ marked this pull request as ready for review December 4, 2024 16:01
@PlushZ
Copy link
Contributor Author

PlushZ commented Dec 4, 2024

@itisAliRH Can you have a look?

@github-actions github-actions bot added this to the 25.0 milestone Dec 4, 2024
itisAliRH and others added 3 commits December 6, 2024 14:57
Co-authored-by: PlushZ <polpolunina@gmail.com>
Changes the value prop to accept an array of strings instead of a comma-separated string
Sets default values for props using withDefaults
Simplifies the onInput function to emit an array directly

Co-authored-by: PlushZ <polpolunina@gmail.com>
Replaces the tags input section with a FormElement component with tags type for consistency.
Removes the StatelessTags component and its import.

Improves UI consistency and code maintainability.

Co-authored-by: PlushZ <polpolunina@gmail.com>
@itisAliRH
Copy link
Member

@PlushZ thank you for your work on this. As we discussed, I made the changes, which look good.

Moves tag extraction to ensure tags are correctly set during tool execution. This change ensures that tags are consistently retrieved from incoming parameters and applied to the request context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer area/tool-framework area/UI-UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants