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

refactor: Add TypeScript types to inlinecheckbox #17729

Merged
merged 10 commits into from
Nov 13, 2024

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Oct 14, 2024

Closes #17677

Added Tpyescript types to inlinecheckbox

I am curious why ariaLabel is marked both deprecated and required

 ariaLabel: deprecate(
    PropTypes.string.isRequired,
    'The `ariaLabel` prop has been deprecated in favor of `aria-label`. This prop will be removed in the next major release.'

Changelog

New

  • added interface with typings matching the proptypes
  • separated onChange for radio and checkbox in TableSelectRow
  • converted index.js to index.tsx

Changed

  • js file to tsx

Removed

  • js file is deleted

Testing / Reviewing

check the deploy preview and make sure no console errors are present

Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit e3b4912
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6734be215499b100080f0718
😎 Deploy Preview https://deploy-preview-17729--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 configuration.

Copy link

netlify bot commented Oct 19, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit e3b4912
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6734be2103f3040008346b17
😎 Deploy Preview https://deploy-preview-17729--v11-carbon-web-components.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 configuration.

@Gururajj77 Gururajj77 marked this pull request as ready for review October 21, 2024 17:20
@Gururajj77 Gururajj77 requested a review from a team as a code owner October 21, 2024 17:20
Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e3b4912
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6734be213651f00008382c60
😎 Deploy Preview https://deploy-preview-17729--v11-carbon-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 configuration.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.09%. Comparing base (5cf7bff) to head (e3b4912).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../react/src/components/DataTable/TableSelectRow.tsx 85.71% 2 Missing ⚠️
...t/src/components/InlineCheckbox/InlineCheckbox.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17729      +/-   ##
==========================================
- Coverage   82.10%   82.09%   -0.01%     
==========================================
  Files         404      404              
  Lines       14107    14117      +10     
  Branches     4426     4434       +8     
==========================================
+ Hits        11582    11590       +8     
- Misses       2363     2364       +1     
- Partials      162      163       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@2nikhiltom 2nikhiltom changed the title refactor: rename .js to .tsx refactor: Add TypeScript types to inlinecheckbox Nov 4, 2024
@2nikhiltom 2nikhiltom requested a review from annawen1 November 11, 2024 07:47
@tay1orjones
Copy link
Member

I am curious why ariaLabel is marked both deprecated and required

It was required before it was deprecated. We can't make it's replacement (aria-label) required because that's a breaking change. We could make ariaLabel optional without a breaking change, but then it would be possible for the consumer to put the component into a non-accessible state without an aria label. To get around that we could add a dev warning if neither is provided.

@tay1orjones tay1orjones added this pull request to the merge queue Nov 13, 2024
Merged via the queue into carbon-design-system:main with commit ad23c63 Nov 13, 2024
40 checks passed
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 inlineCheckbox
5 participants