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

Integrate initial workflow configs with Formik & yup #153

Merged
merged 6 commits into from
May 15, 2024

Conversation

ohltyler
Copy link
Member

Description

This PR begins the process of refactoring configs / data that were stored in the data of the ReactFlow nodes, to stored in the config/state of the new form component. It also sets up the initial form schema and validation schema so we have basic form functionality. See video below for a short demo.

More details:

  • refactors IComponentField / similar interfaces to IConfigField / similar interfaces
  • sets up new configs/ dir to contain all of the initial configs that will be used to piece together preset workflows. For example, selecting semantic search will automatically populate a config with a text embedding processor within the ingest form step. This is inspired from the component_types dir which contains very similar configurations that were previously used within the reactflow components directly.
  • updates several workflow_inputs child components to integrate with the new form structure
  • updates validateFormAndFlow in ResizableWorkspace and renames to validaterAndSubmit. This is where the actual create or update workflow APIs will be executed
  • partial implementation of the conversion fns: converting the ui_metadata config -> form values and yup schema, and vice versa. As the explicit configs and fields get built out, these will be progressively updated
  • minor formatting updates

Demo video showing form & validation integration: (note the create fails - fns to generate the e2e template will be part of the next PR)

screen-capture.32.webm

Issues Resolved

Makes progress on #23

Check List

  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler merged commit dcef748 into opensearch-project:main May 15, 2024
5 checks passed
@ohltyler ohltyler deleted the interfaces-2 branch May 15, 2024 18:22
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 15, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit dcef748)
ohltyler added a commit that referenced this pull request May 15, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit dcef748)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x rapid refactor Refactoring / renaming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants