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

Select/dropdown - improve error handling and focus state #390

Merged
merged 13 commits into from
Jul 17, 2024

Conversation

mkernohanbc
Copy link
Contributor

This PR contains minor tweaks to the Select component, to address the issues documented in #388 (based on work done for #389):

  • 1c0c452: shows a visible error icon to the Select <Button> element when the isInvalid prop is passed
  • a56cd53: first pass at implementing validation and error handling using FieldError and ValidationResult. Creates an error message slot underneath the Select <Button>

@mkernohanbc mkernohanbc added the bug Something isn't working label Jun 20, 2024
@mkernohanbc mkernohanbc self-assigned this Jun 20, 2024
@mkernohanbc mkernohanbc linked an issue Jun 20, 2024 that may be closed by this pull request
2 tasks
@mkernohanbc
Copy link
Contributor Author

Leaving this in draft for the moment, currently having trouble validating whether the errorMessage slot is behaving as expected — need to do some more digging on how to put the component into different error/validation failure states to confirm that this is working.

@mkernohanbc mkernohanbc requested a review from ty2k June 20, 2024 21:38
@mkernohanbc
Copy link
Contributor Author

mkernohanbc commented Jun 20, 2024

Folding some additional tweaks into this PR:

(Took a couple of wrong turns and broke everything along the way, please disregard the commit/revert spam in the middle!)

@mkernohanbc mkernohanbc linked an issue Jun 24, 2024 that may be closed by this pull request
@mkernohanbc mkernohanbc changed the title Select/dropdown - improve error handling Select/dropdown - improve error handling and focus state Jun 24, 2024
@mkernohanbc mkernohanbc marked this pull request as ready for review June 24, 2024 21:51
Copy link
Contributor

@ty2k ty2k left a comment

Choose a reason for hiding this comment

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

Most excellent @mkernohanbc 🚀 . There are a couple tweaks needed in CSS, but the new error slot stuff looks awesome.

@mkernohanbc mkernohanbc requested a review from ty2k July 17, 2024 21:22
Copy link
Contributor

@ty2k ty2k left a comment

Choose a reason for hiding this comment

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

Great stuff ✅

@mkernohanbc mkernohanbc merged commit 9d9c9a9 into main Jul 17, 2024
4 checks passed
@ty2k ty2k deleted the 388-selectdropdown-refine-error-handling branch July 17, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select - implement new style for focus state Select/dropdown - refine error handling
2 participants