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

General form improvements #307

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

ohltyler
Copy link
Member

Description

This PR improves the form inputs in 2 places:

  1. Hides the multi-prediction feature unless the user explicitly wants to. In general, a single prediction configuration in the ML processors are sufficient.
  2. Changes the preset query selector from a super select, to a popover button. This is so we don't persist state after users begin editing/updating the query. For example, a user could select "semantic search" preset, edit it, and before, the dropdown would still show "semantic search", even if the query had been changed entirely to something else. The new flow is a stateless button to select from a starting preset, and nothing more

More details:

  • adds states in MapArrayField to dynamically render based on if there is 0 maps, a single map, a single map with no entries, and multiple maps. For example, we show the same view if there is no maps, or a single map with no entries.
  • minor word updates and removing the extra helper text to try to simplify the amount of information viewed at once
  • moves some button components into the preferred compact/small versions
  • changing the query selector from a super select to a context menu and popover

Demo video, showing the simplified view when editing ML processor input map / output maps, and the new preset query selector:

screen-capture.2.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 <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler merged commit cad5eab into opensearch-project:main Aug 22, 2024
11 checks passed
@ohltyler ohltyler deleted the simplify-model-form branch August 22, 2024 22:22
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 22, 2024
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
(cherry picked from commit cad5eab)
ohltyler added a commit that referenced this pull request Aug 22, 2024
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
(cherry picked from commit cad5eab)

Co-authored-by: Tyler Ohlsen <ohltyler@amazon.com>
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.

2 participants