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 quick-create fields in the create flow and form pre-population #309

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

ohltyler
Copy link
Member

Description

This is a continuation of the usability improvements. Specifically, this PR adds several standard quick-config fields to common use cases that users can optionally populate, before entering the advanced editor view. When populated, the values are then propagated into the workflow config in various places. Details below.

Implementation details:

  • adds a QuickConfigureFields type containing a set of optional fields
  • adds a QuickConfigureInputs component, that dynamically renders form fields based on the use case. For example, a custom/blank use case, vs. a semantic search use case, vs other advanced / hybrid search / neural sparse search / future use cases, will have different inputs exposed. Current implementation shows the same fields available to semantic/multimodal/hybrid; this will expand in the future
  • refactors the modal to configure the name (and expands its functionality) into a standalone QuickConfigureModal component. Exposes QuickConfigureFields if applicable, and maintains any/all of those field values. When actually executing the creation, those field values are injected into the workflow configs to auto-populate different parts of the form. See injectQuickConfigureFields and its child fns for details. The main idea, is each use case, we can maintain different logic for how some quick-create fields gets added into the initial workflow config when finally creating it and sending user to the detailed edit view.

Demo video, showing the list of optional inputs in the modal. When filled out, you can see the values show up in different places in the form, such as 1/ the ML processor ingest processor config's model, input map, and output map, 2/ the knn index mappings, and 3/ the query on the search flow.

screen-capture.3.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 8f276e3 into opensearch-project:main Aug 26, 2024
6 checks passed
@ohltyler ohltyler deleted the quick-create branch August 26, 2024 14:59
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 26, 2024
ohltyler added a commit that referenced this pull request Aug 26, 2024
) (#310)

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 8f276e3)

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants