Skip to content

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

Merged
merged 4 commits into from
Jun 25, 2025
Merged

Conversation

tenphi
Copy link
Member

@tenphi tenphi commented Jun 24, 2025

No description provided.

Copy link

changeset-bot bot commented Jun 24, 2025

🦋 Changeset detected

Latest commit: b12a8c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

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

Copy link

vercel bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cube-ui-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2025 9:23am

Copy link

netlify bot commented Jun 24, 2025

Deploy Preview for cube-uikit-docs failed.

Name Link
🔨 Latest commit b12a8c7
🔍 Latest deploy log https://app.netlify.com/projects/cube-uikit-docs/deploys/685bbfc9def35300086a0c7f

Copy link
Contributor

github-actions bot commented Jun 24, 2025

📦 NPM canary release

Deployed canary version 0.0.0-canary-cb75d4f.

Copy link
Contributor

github-actions bot commented Jun 24, 2025

🏗 Docs are successfully deployed!

👀 Preview: https://685bc01267bf98c7ce0ab84a--cube-uikit-docs.netlify.app

Copy link
Contributor

github-actions bot commented Jun 24, 2025

🧪 Storybook is successfully deployed!

Copy link
Contributor

github-actions bot commented Jun 24, 2025

🏋️ Size limit report

Name Size Passed?
All 254.72 KB (+0.05% 🔺) Yes 🎉
Tree shaking (just a Button) 21.72 KB (0% 🟰) Yes 🎉
Tree shaking (just an Icon) 11.4 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@tenphi tenphi requested a review from Copilot June 24, 2025 19:08
Copilot

This comment was marked as outdated.

@tenphi tenphi requested a review from Copilot June 25, 2025 08:47
Copy link
Contributor

@Copilot Copilot AI left a 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.

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.

1 participant