-
Notifications
You must be signed in to change notification settings - Fork 843
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
Introduce TypeScript support into the dev & build systems #1317
Introduce TypeScript support into the dev & build systems #1317
Conversation
Is there a plan for migrating components to TS? Will you / we / someone just work through them in a series of PRs? I can help if you like. |
I've tested them briefly in Kibana, doing more today & tomorrow.
I'm not sure what happened to make linking unhappy (it's something about the nested-nested node_modules in EUI), but I've started following this pattern:
I'm putting together a screencast walkthrough of the EuiSpacer conversion to help bring people up to speed. The plan is then a series of PRs - I was planning on putting a script together that can list the next candidates for conversion as we have to do a bottom-up approach to avoid importing a JS file into TS. |
FWIW, this npm pack process only worked for me when I did |
…ug in importing files
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.
Added comments look good.
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.
This is fantastic. I tested everything by converting a component in TS. chandlerprall#7
Only other comment I'd make other than the ones below is that we should update the Yeoman scripts to build TSX files and docs for new components. If that's time consuming I'm OK merging this now and making it a separate PR.
className, | ||
size, | ||
...rest | ||
}) => { | ||
const classes = classNames( | ||
'euiSpacer', | ||
sizeToClassNameMap[size], | ||
size ? sizeToClassNameMap[size] : undefined, |
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.
We should cement this as a pattern. Your vid had you redeclaring the default prop value, which I'm sure people might do since it's clean, but let's make sure we do the ternary check in review so we don't have dupe values.
@jasonrhodes @pugnascotia @snide Thank you all for your help on this; I've pushed up the final requested changes (yeoman template update, small docs codegen change). I'll merge this Friday morning Eastern Time unless anything else is mentioned. |
Cool. I'll give the new stuff a check. |
jenkins test this |
1 similar comment
jenkins test this |
Summary
closes #1262
common
,required_props
, and thepredicates
service have been convertedChecklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components