Skip to content
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 and convert two components #161

Merged
merged 8 commits into from
Jun 30, 2022

Conversation

tristen
Copy link
Member

@tristen tristen commented Jun 29, 2022

This PR is large which is mostly due to the package-lock changes. There are - however - a number of files that have been affected as part of this work.

  • Rewrites src/components/icon as a functional component and uses accessible-icon from Radix as an internal primitive.
  • Rewrites src/components/control-wrapper as a functional component.
  • Introduces TypeScript to the source code and converts:
    • src/docs/*
    • src/components/utils/*
    • src/components/icon/*
    • src/components/control-wrapper/*
  • Adds React Testing Library to newly ported components

Note I am not merging this branch into main but into an [email protected] feature branch.

Closes #144

@tristen tristen mentioned this pull request Jun 29, 2022
@tristen tristen marked this pull request as ready for review June 29, 2022 21:42
@badiuoanaalexandra
Copy link
Contributor

Do you mind if I add .nvmrc file to your branch? Seems that it needs npm version 16 for it to work?

@@ -0,0 +1,25 @@
{
"compilerOptions": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am complete newbie here, but from what I was reading I think we should include declaration: true, which should generate d.ts files and in package.json we should have "types" property to specify where the types should be generated. This is important for people using typescript to get autocomplete features and the actual benefits that come with using Typescript. Any thoughts on this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@badiuoanaalexandra I think I'm going to walk back on the commit here and add this declaration:true as its own issue to tackle in #163

@tristen tristen deleted the issue-144 branch June 30, 2022 18:55
tristen added a commit that referenced this pull request Jul 28, 2022
* Drop a lot of stuff for now and add TypeScript
* Add first radix-ui piece to icon component
* Move utils to TypeScript
* Tests
* Revert on a bunch of work

This reverts commit 0b6dc34.
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.

2 participants