Skip to content

Conversation

@maradwan26
Copy link
Contributor

@maradwan26 maradwan26 commented Nov 13, 2025

Closes #20838
Closes #20963

Fixes bugs for cds-tooltip, aligns WC stories with React, and adds controls to all stories

Changelog

React

New

  • Added controls to all stories
  • Added TODO comments to remove the highContrast prop in the next major release
    • highContrast should always be true for the Tooltip component, it should not be configurable

Changed

  • Changed the options for the align prop to use -start -end alignments instead of the deprecated -left -top -right -bottom

Removed

  • Removed highContrast from the control panel and the props table in the Overview page

Web Components

New

  • Added controls to all stories
  • Fixed a bug where the tooltip caret was not visible when using autoalign
    • I also noticed a small visual bug with the cds-popover caret during bottom and right alignments when using border and autoalign, I fixed it in this PR, too.
  • Fixed a bug with the top/bottom-start/end alignments where the caret and content would get misaligned when the cds-tooltip-content text was short

Changed

  • Changed all stories to align with the React storybook

Testing / Reviewing

Web Components

  • Tooltip functionality and styles should be aligned with React
  • Storybook controls should work as expected

React

  • Storybook controls should work as expected

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

@maradwan26 maradwan26 requested a review from a team as a code owner November 13, 2025 18:15
@maradwan26 maradwan26 requested review from a team, emyarod, heloiselui and sunny-babbar and removed request for a team and emyarod November 13, 2025 18:15
@netlify
Copy link

netlify bot commented Nov 13, 2025

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

Name Link
🔨 Latest commit a4fbd7b
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6916202be851880008a5b6e5
😎 Deploy Preview https://deploy-preview-21018--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 Nov 13, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit a4fbd7b
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6916202b2ab9800008c367f9
😎 Deploy Preview https://deploy-preview-21018--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 Nov 13, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a4fbd7b
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6916202b4c1f2c000848ee1c
😎 Deploy Preview https://deploy-preview-21018--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 Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.58%. Comparing base (b13440b) to head (de40320).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21018      +/-   ##
==========================================
- Coverage   92.59%   92.58%   -0.01%     
==========================================
  Files         515      515              
  Lines       38219    38219              
  Branches     5864     5802      -62     
==========================================
- Hits        35387    35385       -2     
- Misses       2682     2685       +3     
+ Partials      150      149       -1     
Flag Coverage Δ
main-packages 85.58% <100.00%> (ø)
web-components 96.87% <100.00%> (-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
Copy link

netlify bot commented Nov 13, 2025

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

Name Link
🔨 Latest commit de40320
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/691f55997ca5a900083acc92
😎 Deploy Preview https://deploy-preview-21018--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 Nov 13, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit de40320
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/691f5599ae218a0008c63ae2
😎 Deploy Preview https://deploy-preview-21018--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 Nov 13, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit de40320
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/691f559930f30700088d320b
😎 Deploy Preview https://deploy-preview-21018--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.

@heloiselui
Copy link
Contributor

Hey @maradwan26 looking great, just noticed some things:

WC:

  • dropShadow: I think it should be set to false by default.
  • Tooltip > Alignment: When I set defaultOpen = true and label = "Test", the tooltip appears little off.
Screen.Recording.2025-11-14.at.17.25.55.mov

@maradwan26
Copy link
Contributor Author

maradwan26 commented Nov 14, 2025

@heloiselui

dropShadow: I think it should be set to false by default.

Fixed ✅

Tooltip > Alignment: When I set defaultOpen = true and label = "Test", the tooltip appears little off.

Thanks for noticing! This is an issue for -start and -end for the top and bottom alignments. So the fix had to be done in popover.scss, which is also used for:

  • ai-label
  • toggletip
  • tooltip
  • popover
  • popover (tabTip)

I fixed it here✅ and double checked to ensure there isn't any regression to the other components.

@maradwan26
Copy link
Contributor Author

Also noticed the cds-toggletip caret is broken, opened an issue for it

Copy link
Contributor

@heloiselui heloiselui left a comment

Choose a reason for hiding this comment

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

I just noticed a few minor things, but LGTM! 🚀

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.

[Tooltip]: add controls args to every story React|WC Parity: Tooltip

4 participants