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

Add typescript types to combo box #12873

Conversation

sierrawetmore
Copy link
Contributor

Closes #12538

This PR converts ComboBox.js to typescript.

Changelog

Changed

  • ComboBox.js has been converted to TS

Testing / Reviewing

These changes can be tested and verified by running a fresh yarn, yarn build and yarn storybook. Verify that the behavior in the ComboBox story remains unchanged

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

DCO Assistant Lite bot All contributors have signed the DCO.

@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b15f51e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/63e533cb8c9ffa0008428e4b
😎 Deploy Preview https://deploy-preview-12873--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sierrawetmore sierrawetmore marked this pull request as draft December 16, 2022 20:06
@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b15f51e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/63e533cb85748e00077a5803
😎 Deploy Preview https://deploy-preview-12873--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sierrawetmore
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@sierrawetmore
Copy link
Contributor Author

recheck

@sierrawetmore sierrawetmore marked this pull request as ready for review December 16, 2022 21:34
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Hey, thanks for contributing this! One minor ask - instead of renaming the .js file to .tsx, could you actually rename it using git?

git mv packages/react/src/components/ComboBox/ComboBox.js packages/react/src/components/ComboBox/ComboBox.tsx

This way the diff will clearly show the file extension change but also the proper unified diff showing your changes within file.

Right now it's hard to tell what you've added to the file vs was was in it to begin with.

Also we should wait to merge this until #12787 is in

@tay1orjones
Copy link
Member

Here’s an example of how the diff should look after renaming via git mv alongside changes within the file

image

@sierrawetmore
Copy link
Contributor Author

sierrawetmore commented Dec 19, 2022

Thanks, didn't realize that was the better way of renaming it. It should look better now!

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

@sierrawetmore Awesome yeah that looks great! #12787 is in - I think it caused some merge conflicts here

@aledavila
Copy link
Contributor

Bump @sierrawetmore

@sierrawetmore
Copy link
Contributor Author

This is on my to-do list in the next couple days. Also waiting to see where we land on the generic types conversation.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

The biggest blocker here I think is the props being destructured out of ...rest. Also a few questions below

packages/react/src/components/ComboBox/ComboBox.tsx Outdated Show resolved Hide resolved
packages/react/src/components/ComboBox/ComboBox.tsx Outdated Show resolved Hide resolved
packages/react/src/components/ComboBox/ComboBox.tsx Outdated Show resolved Hide resolved
packages/react/src/components/ComboBox/ComboBox.tsx Outdated Show resolved Hide resolved
packages/react/src/components/ComboBox/ComboBox.tsx Outdated Show resolved Hide resolved
@sierrawetmore sierrawetmore force-pushed the Add-Typescript-types-to-ComboBox branch from 055f1c1 to 17d4c74 Compare February 3, 2023 16:14
@sierrawetmore sierrawetmore requested review from tay1orjones and removed request for mbarrer February 3, 2023 16:32
Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Functionality hasn't changed, no failing tests / a11y violations. LGTM 👍🏻 ✅

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Thank you! 🏆

@sierrawetmore sierrawetmore force-pushed the Add-Typescript-types-to-ComboBox branch from 17d4c74 to b15f51e Compare February 9, 2023 17:56
@kodiakhq kodiakhq bot merged commit 2233e1e into carbon-design-system:main Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TypeScript types to ComboBox
4 participants