-
Notifications
You must be signed in to change notification settings - Fork 600
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
fix(fast-components): add missing type info to registration functions #5473
Conversation
@janechu Any idea what's going on here with the schema generation error that's showing up? |
Hey folks. This really needs reviews because we can't make the React wrappers work in TypeScript with our components without this being merged. /cc @chrisdholt @nicholasrice |
@EisenbergEffect is this still a needed PR? Assuming so, but want to confirm with you. |
Yep. Without this, the React wrapper can't infer the types properly and the resultant React component is missing properties. We'll need to make a similar update to our Fluent components as well. |
Sounds good - looks like there are some issues with the build regarding component schemas, which is odd. We can take a look at this in the next day or so to figure out how to get this unblocked. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this as we've removed |
Pull Request
📖 Description
This PR fixes an issue with our component registration functions where type information was being lost in certain cases. This caused downstream effects in our React wrappers, which could not be accurately typed, and were then unusable in React.
🎫 Issues
fast-react-wrapper
#5387👩💻 Reviewer Notes
The changes are applied to the
index.ts
files of all the FAST Components. You will see that I have explicitly declared the type params for all calls tocompose
. There are two reasons for this:While doing the work, I noticed that a few components that had special option types weren't using those in their registry code. So, I added those.
Documentation has been updated to call out this scenario.
📑 Test Plan
Added some code to the React wrapper tests to ensure that the types flow correctly and React components with all properties are generated.
✅ Checklist
General
$ yarn change
⏭ Next Steps
There are several follow-ups needed:
compose
that does the same thing under the hood. We'd keep the original, but deprecate it, and update code and docs for the new API.avatar
,calendar
,picker
, andsearch
.