Open
Conversation
..ErrorMessage props
🦋 Changeset detectedLatest commit: 0c2e4d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new ValidationMessage component to replace the deprecated ErrorMessage component, expanding validation feedback capabilities beyond just errors to include info, success, warning, and danger variants.
Key Changes
- New
ValidationMessagecomponent with support for multiple variants (info, success, warning, danger) - Updated form components (Input, Textarea, Select, DatePicker) to accept
validationMessageprop - Deprecated
ErrorMessagecomponent now wrapsValidationMessagefor backward compatibility
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/form/validation-message/validation-message.tsx | Implements new ValidationMessage component with variant support |
| packages/react/src/form/validation-message/validation-message.stories.tsx | Adds Storybook stories for ValidationMessage |
| packages/react/src/form/validation-message/index.tsx | Exports ValidationMessage component and types |
| packages/react/src/form/input-group/input-group.tsx | Integrates ValidationMessage, handles both old errorMessage and new validationMessage props |
| packages/react/src/form/input/input.tsx | Adds validationMessage prop support |
| packages/react/src/form/textarea/textarea.tsx | Adds validationMessage prop support |
| packages/react/src/form/select/select.tsx | Adds validationMessage prop support |
| packages/react/src/form/date-picker/date-picker.tsx | Adds validationMessage prop support |
| packages/react/src/form/error-message/error-message.tsx | Refactors to use ValidationMessage, marks as deprecated |
| packages/react/src/form/index.tsx | Exports ValidationMessage from form module |
| packages/css/src/index.css | Imports validation-message CSS |
| packages/css/src/form/validation-message/validation-message.css | Defines styles for all validation message variants |
| apps/examples/app/examples/form/validation-message/demo.tsx | Demonstrates ValidationMessage variants |
| apps/examples/app/examples/form/error-message/demo.tsx | Adds deprecation notice to ErrorMessage example |
| apps/examples/app/examples/form/input/different-states.tsx | Updates to showcase all validation message variants |
| apps/examples/app/examples/form/input/small-different-states.tsx | Updates to showcase all validation message variants in small size |
| apps/examples/app/examples/form/input/form-input-errors.tsx | Migrates from errorMessage to validationMessage |
| apps/examples/app/examples/form/textarea/different-states.tsx | Updates to showcase all validation message variants |
| apps/examples/app/examples/form/textarea/small-different-states.tsx | Updates to showcase all validation message variants in small size |
| apps/examples/app/examples/form/select/different-states.tsx | Updates to showcase all validation message variants |
| apps/examples/app/examples/form/select/small-different-states.tsx | Updates to showcase all validation message variants in small size |
| apps/examples/app/examples/form/date-picker/different-states.tsx | Updates to showcase all validation message variants |
| apps/examples/app/examples/form/date-picker/small-different-states.tsx | Updates to showcase all validation message variants in small size |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/css/src/form/validation-message/validation-message.css
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.