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

chore: Types for FileUploader, FileUploaderButton, FileUploaderDropContainer, FileUploaderItem, FileUploaderSkeleton, Filename, Upload and ButtonSkeleton #13992

Merged

Conversation

imp-dance
Copy link
Contributor

@imp-dance imp-dance commented Jun 13, 2023

Closes #12545
Part of #13229
Part of #13562

Changelog

New

  • Added types for the following components, and renamed to .tsx:
    • FileUploader
    • FileUploaderButton
    • FileUploaderDropContainer
    • FileUploaderItem
    • FileUploaderSkeleton
    • Filename
    • Upload
    • ButtonSkeleton

Changed

  • Filename.tabIndex changed from string -> number in type and PropType.

Additional notes
* Also added types to Loading and ButtonSkeleton components. (outside issue scope, but required for issue)
* We should probably share a ButtonKind type. Could be derived from the constant in prop-types/types.js.

@imp-dance imp-dance requested a review from a team as a code owner June 13, 2023 13:16
@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit 96da1b8
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/6499ad3a27c7e2000897e369
😎 Deploy Preview https://deploy-preview-13992--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.

@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 96da1b8
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6499ad3a5ba0a70008363c2c
😎 Deploy Preview https://deploy-preview-13992--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.

@tw15egan
Copy link
Member

@imp-dance looks like we have some test failures

@imp-dance
Copy link
Contributor Author

imp-dance commented Jun 13, 2023

@tw15egan Yeah I saw, seems related to this change:

  • Filename.tabIndex changed from string -> number in type and PropType.

What's the appropriate way to do/propose a breaking change like this?

An alternative method could be keeping it as a string but parsing it as an int internally.

So should I keep it as a string, or just update the test snapshot?

@tw15egan
Copy link
Member

@imp-dance if possible, let's keep it a string so it has less of an effect downstream. We could also add number as a valid propType along with string, if you think that would help

@imp-dance imp-dance requested a review from a team as a code owner June 13, 2023 20:10
@imp-dance
Copy link
Contributor Author

@tw15egan Sure thing, just pushed a commit that adds both as string & number as valid types, refactored the code to properly parse them and updated the snapshot.

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.

This looks pretty solid, thanks! I found just a couple minor items to address, let me know what you think

@tay1orjones
Copy link
Member

@tw15egan This is ready for a re-review

@imp-dance There's one minor conflict in button skeleton

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.

LGTM 👍 ✅ Thanks for contributing! 🎉 💪🏻

@imp-dance
Copy link
Contributor Author

@tay1orjones Conflict should be fixed now, merged with latest main 👍

@kodiakhq kodiakhq bot merged commit 033ecc7 into carbon-design-system:main Jun 26, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants