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

Workflow Definition Picker #21

Merged
merged 3 commits into from
Aug 11, 2023
Merged

Workflow Definition Picker #21

merged 3 commits into from
Aug 11, 2023

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Aug 11, 2023

=== auto-pr-body ===

Pull Request Body:
This pull request features the following changes:

Summary

  • Added a protected async method OnAfterRenderAsync to retrieve and store available workflow definitions in a _items variable
  • Added a private method, GetSelectedValue, to retrieve the literal value for a given variable
  • Added a private method, OnValueChanged, to update the expression when a value is changed
  • Updated ServiceCollection extensions class to add a new UIHintHandler for workflow definition picking
  • Added a new UIHintHandler class: WorkflowDefinitionPickerHandler
  • Updated VariablePickerHandler to use the WellKnownSyntaxNames.Literal syntax

List of Changes

  • Added a YAML workflow file: .github\workflows\pr-body-generator.yml
  • Added the YAML workflow path to Elsa.Studio.sln
  • Extended IUIHintHandler interface with new members in src/core/Elsa.Studio.Core/Contracts/IUIHintHandler.cs
  • Added a component for picking a variable in src/modules/Elsa.Studio.UIHintHandlers/Components/VariablePicker.razor.cs
  • Added a component for picking a workflow definition in src/modules/Elsa.Studio.UIHintHandlers/Components/WorkflowDefinitionPicker.razor and src/modules/Elsa.Studio.UIHintHandlersp/Components/WorkflowDefinitionPicker.razor.cs

Refactoring Target

  • Refactor YAML workflow file for improved readability
  • Rename components to reflect more clearly what they do and to allow developers to quickly assess what they are for
  • Move the _items variable to a class-level variable and make it private
  • Move the GetSelectedValue and OnValueChanged methods to the WorkflowDefinitionPickerHandler class to follow principles of separation of concerns
  • In the VariablePickerHandler, move the UISyntax to the constuctor and assign the value once for more efficient access
  • Increase code coverage with automated tests for new components and for the extended interface.

@sfmskywalker sfmskywalker marked this pull request as ready for review August 11, 2023 13:01
@sfmskywalker sfmskywalker merged commit a15e761 into main Aug 11, 2023
2 checks passed
@sfmskywalker sfmskywalker deleted the workflow-definition-picker branch August 11, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant