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

Migrate WorkflowEditor to TypeScript #19246

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

itisAliRH
Copy link
Member

This PR refactor the Workflow Editor component to utilize TypeScript and composition API syntax tio improve readabilty, type safty and maintance.

  • Enhance type safety in various functions and add a utility function for retrieving query parameters from the route.
  • Update event handling and component structure for better maintainability.

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 this to the 25.0 milestone Dec 4, 2024
@itisAliRH itisAliRH marked this pull request as draft December 4, 2024 13:57
Changes licenseId and inputLicense to optional types
Updates event emission to handle optional license (no license)
Changes the type of the 'transform' parameter in the defaultPosition function to use a more specific type, improving type safety and clarity.
Refactors WorkflowEditor component to use Vue 3's script setup syntax
Improves route query handling and editor configuration loading
Introduces a function to fetch query parameter values from the route.
Utilizes Vue Router's useRoute composable for accessing query parameters.
Migrates the Workflow Editor component to use the script setup and typescript syntax for improved maintainability, readability and performance.
Replaces BootstrapVue components with their corresponding B-prefixed versions.
Changes saveWorkflow to accept id and workflow separately
Simplifies request data construction and error handling
Changes the save button selector to use a more specific ID-based selector.
@itisAliRH itisAliRH force-pushed the workflow-editor-ts-migration branch from d875a20 to beec878 Compare January 9, 2025 16:23
Replaces 'any' type with 'Wrapper<Vue>' for better type safety
Removes redundant tests and properties
Drop the not possible old tests
@itisAliRH itisAliRH force-pushed the workflow-editor-ts-migration branch from beec878 to a4f9022 Compare January 9, 2025 16:29
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.

1 participant