Skip to content
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

fix: add autoAlign to inner IconButton #18533

Conversation

richardpilot
Copy link
Contributor

Closes #17305

Added the autoAlign prop to allow the inner IconButton to use the floating-ui component. This allows for the tooltip popover to render over the table rather than inside it, preventing the overflow scrollbar from appearing.

Changelog

Changed

  • Added autoAlign={true} prop to inner IconButton in OverflowMenu

Testing / Reviewing

  • Verified that the autoAlign property on the IconButton within a OverMenu within a DataTable is honored.

@richardpilot richardpilot requested a review from a team as a code owner February 5, 2025 21:09
Copy link

netlify bot commented Feb 5, 2025

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

Name Link
🔨 Latest commit 8af9d35
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67a3d39131c2920008a1c3ca
😎 Deploy Preview https://deploy-preview-18533--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 Feb 5, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 8af9d35
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67a3d3919f0e290008dc2ff6
😎 Deploy Preview https://deploy-preview-18533--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 Feb 5, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8af9d35
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67a3d391ad55a50008b6d874
😎 Deploy Preview https://deploy-preview-18533--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 Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.11%. Comparing base (3727760) to head (8af9d35).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18533      +/-   ##
==========================================
+ Coverage   84.10%   84.11%   +0.01%     
==========================================
  Files         408      408              
  Lines       14466    14466              
  Branches     4656     4676      +20     
==========================================
+ Hits        12166    12168       +2     
+ Misses       2134     2132       -2     
  Partials      166      166              

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

@richardpilot
Copy link
Contributor Author

@tay1orjones Apologies for the recreate. My Git client combined with my inexperience with git completely ruined the commits on the last one.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

I know on the previous PR I said we might want to add this as a prop, but looking at it closer now I think it's fine to hardcode this for now 👍

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

@ariellalgilmore pointed out to me that other is already spread on IconButton, so setting autoAlign on OverflowMenu should trickle down to IconButton without needing to hardcode it like this.

https://stackblitz.com/edit/jsesilma?file=src%2Findex.scss,src%2FApp.jsx

Does that work in your use case?

@richardpilot
Copy link
Contributor Author

I can confirm this works for us. Shall I close this PR?

@richardpilot richardpilot deleted the 17305-autoalign-iconbutton-overflowmenu branch February 11, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants