-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(Forms): enhance typing and add docs on how to deal with TypeScript types #4343
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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.
Looks good to me 🥇
Maybe @snorrekim can take a quick look at this as well, as he seems to have good knowledge and thoughts around this in a recent Slack thread.
My only concern is if this change can/will blow up with a lot of TS errors for applications using Eufemia Forms, like it has done a few times previously, resulting in a bugfix release changing to any 😂
Yes, it will influence type definitions in projects as we basically going from "any" to require some types to be defined. |
Maybe we'll have to add a description or some kind of guide of what the projects need to do when encountering the TS error (high probability this will happen). Reason why I think this is smart is because we'll definitely get many messages in regards to "what to do now that my build does not work anymore", etc. Worst-case if they don't want to type, can they just cast/set it to be any on their side? |
Yes, they can. But I agree, we should make the docs better on that. Will commit something 👍 |
b10f649
to
ea1e800
Compare
## [10.58.0](v10.57.1...v10.58.0) (2024-11-29) ### ✨ Features * **Forms:** add `showConfirmDialog` to Iterate.RemoveButton ([#4330](#4330)) ([76bddf0](76bddf0)) * **Forms:** add `variant="filled"` and `toolbarVariant="custom"` to Iterate.EditContainer and Iterate.ViewContainer ([#4329](#4329)) ([b2b9eef](b2b9eef)) * **Forms:** add support for using a function references instead of a string based id ([#4331](#4331)) ([a6e3bc3](a6e3bc3)) * **Forms:** enhance typing and add docs on how to deal with TypeScript types ([#4343](#4343)) ([10b199b](10b199b)) * **Forms:** introduce `decoupleForm` prop to Form.Handler ([#4332](#4332)) ([0b02b6e](0b02b6e)) ### 🐛 Bug Fixes * **DatePicker:** make sure the picker and input only reacts to the props that have changed ([#4342](#4342)) ([4cd52a3](4cd52a3)) * **Forms.Card:** remove outline when variant="basic" on Section containers when used in Wizard ([#4336](#4336)) ([ebad212](ebad212)) * **forms:** add `sessionStorageId` support to Field.Upload with empty file list rendering ([#4339](#4339)) ([d02a0af](d02a0af)) * **NumberFormat:** improve regex for parsing phone numbers with country codes ([#4340](#4340)) ([96613ed](96613ed)), closes [#4337](#4337)
🎉 This PR is included in version 10.58.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The main change is that we go from:
to
and enhance the TypeScript support docs for the "Getting Started" section the
Form.Handler
andForm.Isolation
docs.To disable types you can do so by:
or