Skip to content

feat: migrate @carbon/themes to TypeScript#22166

Merged
kennylam merged 4 commits into
carbon-design-system:mainfrom
adamalston:n/a-themes
Jun 1, 2026
Merged

feat: migrate @carbon/themes to TypeScript#22166
kennylam merged 4 commits into
carbon-design-system:mainfrom
adamalston:n/a-themes

Conversation

@adamalston

@adamalston adamalston commented May 4, 2026

Copy link
Copy Markdown
Contributor

No issue.

Migrated @carbon/themes to TypeScript.

Changelog

New

  • Migrated @carbon/themes to TypeScript.
  • Added type definitions for @carbon/themes.
  • Installed @types/color to resolve type errors.

Testing / Reviewing

Build the package and check the types it emits.

I'm curious to know if anyone has more information about the TODO. I'm not sure whether I'm missing some context.

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

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 8ad6e5f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6a1a160f0c29980009428714
😎 Deploy Preview https://deploy-preview-22166--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ad6e5f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6a1a16122e3f3e000958b1ab
😎 Deploy Preview https://deploy-preview-22166--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.40%. Comparing base (ebb0b33) to head (8ad6e5f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22166      +/-   ##
==========================================
- Coverage   95.53%   95.40%   -0.14%     
==========================================
  Files         582      551      -31     
  Lines       50472    48624    -1848     
  Branches     6808     6745      -63     
==========================================
- Hits        48218    46389    -1829     
+ Misses       2121     2110      -11     
+ Partials      133      125       -8     
Flag Coverage Δ
main-packages 87.96% <ø> (-1.27%) ⬇️
web-components 98.07% <ø> (-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.

@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 8ad6e5f
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6a1a160f75edd00008195b42
😎 Deploy Preview https://deploy-preview-22166--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

getTokenSet(name: string) {
for (const child of this) {
if (!child.kind === 'TokenSet') {
// TODO: Is this code necessary given the old code was invalid?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You mean because the old condition

if (!child.kind === 'TokenSet') {

was invalid due to child.kind being typecasted to a boolean so this would always be true/false === 'TokenSet', which always resolves as false?

true === 'TokenSet'
// false

false === 'TokenSet'
// also false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea, the boolean conversion breaking the comparison.

@maradwan26 maradwan26 added this pull request to the merge queue May 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 22, 2026
@maradwan26 maradwan26 added this pull request to the merge queue May 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 22, 2026
@riddhybansal riddhybansal added this pull request to the merge queue May 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 27, 2026
@riddhybansal riddhybansal added this pull request to the merge queue May 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 27, 2026
@heloiselui heloiselui added this pull request to the merge queue May 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 29, 2026
@kennylam kennylam added this pull request to the merge queue Jun 1, 2026
Merged via the queue into carbon-design-system:main with commit 7363e14 Jun 1, 2026
39 of 40 checks passed
@adamalston adamalston deleted the n/a-themes branch June 1, 2026 18:38
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.

5 participants