-
Notifications
You must be signed in to change notification settings - Fork 6
feat(Field): message -> errorMessage prop #711
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
Conversation
🦋 Changeset detectedLatest commit: b12a8c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❌ Deploy Preview for cube-uikit-docs failed.
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-cb75d4f. |
🏗 Docs are successfully deployed!👀 Preview: https://685bc01267bf98c7ce0ab84a--cube-uikit-docs.netlify.app |
🧪 Storybook is successfully deployed!
|
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
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.
Pull Request Overview
This PR updates the form and field components to deprecate the legacy message prop in favor of using errorMessage and description for clearer error and description handling.
- Deprecated the message prop across multiple files and introduced errorMessage and description props.
- Updated associated tests, stories, and documentation to reflect the new prop usage.
- Adjusted component logic to ensure errorMessage takes precedence over message where applicable.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/shared/form.ts | Added deprecation notice for message and introduced errorMessage. |
src/components/overlays/Dialog/*.docs.mdx | Updated documentation formatting with horizontal separators. |
src/components/form/Form/use-field/* | Passed new description and errorMessage props through useField. |
src/components/form/Form/Field.tsx | Updated Field component to destructure and pass errorMessage/description. |
src/components/form/Form/Field.stories.tsx | Renamed and updated story props from message to errorMessage. |
src/components/form/FieldWrapper/* | Modified FieldWrapper to create a styled description component and prioritize errorMessage over message. |
.changeset/slimy-vans-provide.md | Documented the breaking change in a changeset note. |
Comments suppressed due to low confidence (1)
src/shared/form.ts:37
- Consider updating the project documentation and migration guides to clearly instruct developers on replacing the deprecated 'message' prop with 'errorMessage' and 'description'.
* @deprecated Use `errorMessage` for error messages and `description` for field descriptions instead.
No description provided.