Skip to content

refactor: rewrite ClickListener #18962

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

Merged

Conversation

adamalston
Copy link
Contributor

@adamalston adamalston commented Mar 30, 2025

Closes #18960

Rewrote ClickListener.

Changelog

Changed

  • Converted ClickListener to a functional component.
  • Rewrote ClickListener in TypeScript.

Testing / Reviewing

yarn test packages/react

ClickListener is only used in one file which makes me question whether it's necessary or if there's something else that should be used instead. Maybe in another pull request, I could look into substituting ClickListener for useOutsideClick. useOutsideClick should probably be ported/rewritten in TypeScript first and that can't happen until #18950 moves forward.

Copy link

netlify bot commented Mar 30, 2025

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

Name Link
🔨 Latest commit cdb7c8b
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67e98f84cd1bac000806d7b5
😎 Deploy Preview https://deploy-preview-18962--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.

Copy link

netlify bot commented Mar 30, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit cdb7c8b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67e98f846d67370008d9f115
😎 Deploy Preview https://deploy-preview-18962--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 Mar 30, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit cdb7c8b
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67e98f845fa2a9000812329d
😎 Deploy Preview https://deploy-preview-18962--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 Mar 30, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.85%. Comparing base (2601d36) to head (cdb7c8b).
Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
...react/src/components/OverflowMenu/OverflowMenu.tsx 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18962      +/-   ##
==========================================
- Coverage   84.88%   84.85%   -0.04%     
==========================================
  Files         396      395       -1     
  Lines       14512    14487      -25     
  Branches     4738     4713      -25     
==========================================
- Hits        12319    12293      -26     
- Misses       2044     2046       +2     
+ Partials      149      148       -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 March 30, 2025 22:10
@adamalston adamalston requested review from a team as code owners March 30, 2025 22:10
@kennylam kennylam added this pull request to the merge queue Apr 8, 2025
Merged via the queue into carbon-design-system:main with commit 901e319 Apr 8, 2025
54 of 55 checks passed
@adamalston adamalston deleted the 18960-click-listener branch April 8, 2025 13:27
@carbon-automation
Copy link
Contributor

Hey there! v11.80.0 was just released that references this issue/PR.

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.

Rewrite ClickListener
4 participants