-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Search][A11Y] Playground -> Open AI form #202071
Merged
Samiul-TheSoccerFan
merged 5 commits into
elastic:main
from
Samiul-TheSoccerFan:a11y-playground-openai
Dec 16, 2024
+163
−11
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
382501b
Adding header text when all fields are required in the form
Samiul-TheSoccerFan 3dc0bc1
Updating wanring message with callout
Samiul-TheSoccerFan bb9f46c
adding error message in the connector form
Samiul-TheSoccerFan d5b647e
Update to hide error message when submitted in both add and edit mode
Samiul-TheSoccerFan 31fc87e
Merge branch 'main' into a11y-playground-openai
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the code here will not meet this requirement. As is the message is triggered whenever the form is not valid.
We should not display a message saying all fields are required when some are optional.
This change will affect all connectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I restrict this change only to
gen AI
connectors that we use inplayground
as most of these have required fields, or should all connectors have the same behavior?cc: @mdefazio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adcoelho What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"
Ideally we will have some message at the top letting the user know there are errors in the form. (which I think is the point of the PR?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These would imo make more sense but I am also trying to be cautious here about a UI change that would affect all connectors. We didn't discuss it internally and weren't aware. But it doesn't seem like a big deal, I'll bring it up in our sync(today).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @adcoelho. Please keep us informed about the team's decision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, getting back to this @mdefazio
Won't your suggestion then go against the original comment from @MichaelMarcialis that originated this task and where he explicitly says:
?
This change only seems to make sense if it applies to connectors where all fields are required and if not we should leave things as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general idea is that if there are any errors in the form, a header should appear at the top with a message like,
There are some errors while submitting
. Individual fields or actions can then display their specific error messages for more details. However, I'll let @mdefazio confirm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct—this is about errors in the form. We removed the message "All fields required" that appears initially prior to submission since this wouldn't make sense for all Connector forms.
Related, the original comment is around noting which fields are required, prior to form submission, not about error handling.
If i'm not mistaken, the benefit of this additional callout, is to indicate that there are errors in the form, which may be out of view initially, and provide a landmark and message to screen readers.
If we make this message generic, meaning simply "There are fields with errors.", or "Some fields were not valid", etc., it allows us to show this regardless if all fields are required or not—so for every connector type form.
Someone can correct me on the need and benefit of this, but that is my understanding. I acknowledge that the Connector framework is unique based on the dynamic nature of the forms, so this is a tricky one to start off with for this pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, my comment wasn't saying that an error callout such a this can't be shown on form submission. I was just stating that a simple note stating that "All items are required" (shown before form submission) isn't to be used on a form that has one or more optional elements. If ya'll feel this form is lengthy, with some elements with validation errors falling out of view, and could benefit from the inclusion of an additional callout indicating errors, I'll leave that to your discretion.