opensearch-project / dashboards-flow-framework

A UI designer for constructing AI applications with OpenSearch
Apache License 2.0
6 stars 5 forks source link

Add new workflow config interfaces #151

Closed ohltyler closed 2 months ago

ohltyler commented 2 months ago

Description

This PR adds several base interfaces used in the new form/configuration component on the workflow editor page. These are kept generic for now until more details of the form inputs are finalized from UX. The base WorkflowConfig will live under the new config field added in the ui_metadata interface. The main idea is this base config will capture all of the input in the form, and will be used for generating the 1/ form values, 2/ yup validation schema, and 3/ the ReactFlow workspace's nodes/edges. The initial conversion fns have been added and stubbed.

Additionally, the form & schema values in ResizableWorkspace (formValues, formSchema) have changed from the workspace-flow-based form/schema, to the new interfaces, since these will be the source of truth, instead of the workspace nodes/edges being the source of truth. For now, we will leave those interfaces as they may prove useful later on, such as when full drag-and-drop functionality is supported.

This PR also removes the default workspace flow values (the sets of nodes/edges) for the various use cases; now we will only care about providing default values under config, since these will determine the final workspace flow. Defaults/presets are stubbed and left empty for now.

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.