Skip to content

Conversation

@wkeese
Copy link
Contributor

@wkeese wkeese commented Oct 29, 2025

Closes #20832.

Fix Typescript declarations for Slider and SliderSkeleton.

Those components do not have a property named "propTypes", but the declarations in Slider.d.ts and Slider.Skeleton.d.ts claimed they did.

I think the problem happens because there's some magic that tries to generate Typescript declarations based on the PropTypes, and that is fragile. I followed the example of Row.tsx to avoid / workaround that issue.

Changelog

Changed

  • Fixed Typescript declarations for Slider and SliderSkeleton.

Testing / Reviewing

Built my application without any Typescript errors.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

Those components do not have a property named "propTypes",
but the declarations in Slider.d.ts and Slider.Skeleton.d.ts
claimed they did.

I think the problem happens because there's some magic that tries
to generate Typescript declarations based on the PropTypes, and
that is fragile.  I followed the example of Row.tsx to avoid /
workaround that issue.

Fixes carbon-design-system#20832.
@netlify
Copy link

netlify bot commented Oct 29, 2025

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

Name Link
🔨 Latest commit b9af56f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69029bddd0992800084ed801
😎 Deploy Preview https://deploy-preview-20833--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 project configuration.

@netlify
Copy link

netlify bot commented Oct 29, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b9af56f
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/69029bddfb7a7d00087781c8
😎 Deploy Preview https://deploy-preview-20833--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 project configuration.

@netlify
Copy link

netlify bot commented Oct 29, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b9af56f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69029bdd0e7beb0008a0a251
😎 Deploy Preview https://deploy-preview-20833--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 project configuration.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.32%. Comparing base (bce2fb8) to head (b9af56f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20833      +/-   ##
==========================================
- Coverage   92.35%   92.32%   -0.03%     
==========================================
  Files         511      511              
  Lines       37247    37247              
  Branches     5726     5669      -57     
==========================================
- Hits        34398    34388      -10     
- Misses       2700     2711      +11     
+ Partials      149      148       -1     
Flag Coverage Δ
main-packages 85.49% <100.00%> (ø)
web-components 96.66% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wkeese wkeese marked this pull request as ready for review October 29, 2025 13:29
@wkeese wkeese requested a review from a team as a code owner October 29, 2025 13:29
@wkeese wkeese requested review from Gururajj77 and emyarod October 29, 2025 13:29
@wkeese
Copy link
Contributor Author

wkeese commented Oct 29, 2025

@adamalston - You may want to review this as the problem started with your #20329 (although Slider's typescript declarations before your PR were also broken, but in a different way).

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me!

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.

[Bug]: Slider: typescript declaration regression

2 participants