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

Picker with Validation #124

Merged
merged 3 commits into from
May 17, 2023
Merged

Picker with Validation #124

merged 3 commits into from
May 17, 2023

Conversation

eunicekokor
Copy link
Contributor

@eunicekokor eunicekokor commented Apr 28, 2023

resolves https://github.com/Arize-ai/arize/issues/21007

  • add validation to picker + underlying dropdown button

Before

Image

After

Image

Up next:
Think through how to show help text in isQuiet (should it be within ui-components or passed in through controller) in design review

Screen.Recording.2023-04-28.at.3.16.36.PM.mov

@github-actions
Copy link

github-actions bot commented Apr 28, 2023

size-limit report 📦

Path Size
dist/components.cjs.production.min.js 154.33 KB (+0.22% 🔺)
dist/components.esm.js 103.95 KB (+0.27% 🔺)

@eunicekokor eunicekokor changed the title pickerValidation Picker with Validation Apr 28, 2023
@mikeldking
Copy link
Collaborator

Up next:
Think through how to show help text in isQuiet (should it be within ui-components or passed in through controller) in design review

I think it's more driven by the "inline" layout than anything here because it's the layout of the form that currently gives space for the errors. I think ultimately if errors are going to be shown in tooltips we need to figure out how to show an error indicator without changing the layout since these inputs are extremely small.

Screenshot 2023-05-01 at 11 03 46 AM

Datadog shows an error indicator at the top right of the input (not an icon) and puts a tooltip on the entire component. This is probably the least intrusive thing I've seen.
cc @theandylu

Copy link
Collaborator

@mikeldking mikeldking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think spectrum ultimately doesn't believe that pickers can be in an invalid state - e.g. why would you let someone pick something that's invalid.

Might be worth thinking about what causes pickers to be invalid - ultimately it's another field that causes it to be invalid - is there a way to completely eliminate that flow?

src/dropdown/DropdownButton.tsx Outdated Show resolved Hide resolved
src/dropdown/DropdownButton.tsx Show resolved Hide resolved
@eunicekokor eunicekokor marked this pull request as ready for review May 17, 2023 14:21
add validation to picker + dropdown button

PR comments
@eunicekokor eunicekokor merged commit e5222cb into main May 17, 2023
4 checks passed
@eunicekokor eunicekokor deleted the pickerValidation branch May 17, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants