Skip to content

refactor: rewrite IconSwitch in typescript and add types#19141

Merged
heloiselui merged 3 commits intocarbon-design-system:mainfrom
adamalston:n/a-icon-switch
Jul 16, 2025
Merged

refactor: rewrite IconSwitch in typescript and add types#19141
heloiselui merged 3 commits intocarbon-design-system:mainfrom
adamalston:n/a-icon-switch

Conversation

@adamalston
Copy link
Copy Markdown
Contributor

@adamalston adamalston commented Apr 15, 2025

No issue.

Rewrote IconSwitch in TypeScript.

Changelog

New

  • Added types to IconSwitch.

Changed

  • Rewrote IconSwitch in TypeScript.
  • Replace the references to Switch in the component docs with IconSwitch`.

Testing / Reviewing

I left some TODOs with questions that hopefully someone can answer.

yarn test packages/react

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 15, 2025

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

Name Link
🔨 Latest commit 5020d2c
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6842ed44c78afa00088be8ac
😎 Deploy Preview https://deploy-preview-19141--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
Copy Markdown

netlify Bot commented Apr 15, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2185859
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/684451130cad290008ba9ab8
😎 Deploy Preview https://deploy-preview-19141--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
Copy Markdown

codecov Bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.65%. Comparing base (639bce3) to head (2185859).
Report is 171 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19141      +/-   ##
==========================================
- Coverage   84.65%   84.65%   -0.01%     
==========================================
  Files         373      373              
  Lines       14715    14713       -2     
  Branches     4846     4819      -27     
==========================================
- Hits        12457    12455       -2     
+ Misses       2108     2107       -1     
- Partials      150      151       +1     

☔ 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.

@adamalston adamalston marked this pull request as ready for review April 15, 2025 16:46
@adamalston adamalston requested a review from a team as a code owner April 15, 2025 16:46
@adamalston adamalston requested review from a team, Gururajj77 and kennylam April 15, 2025 16:46
Comment on lines +60 to +63
// TODO:
// 1. Should the deprecated options be deleted?
// 2. The list doesn't include all of the options available in the
// component. Is it supposed to?
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.

Yes, the deprecated options should be deleted and use the new options instead. I also checked with @thyhmdo on caret alignment and confirmed that toolip placements should not include -start/-end for left/right and they should default to the center alignment.

Those alignments should be used for popover.

@heloiselui heloiselui added this pull request to the merge queue Jul 16, 2025
Merged via the queue into carbon-design-system:main with commit 2c1adee Jul 16, 2025
36 checks passed
@adamalston adamalston deleted the n/a-icon-switch branch July 25, 2025 01:34
AlexanderMelox pushed a commit to AlexanderMelox/carbon that referenced this pull request Apr 28, 2026
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.

4 participants