Skip to content

fix(overflowmenu): added typing to align prop #19131

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

Conversation

jose-biescas
Copy link
Contributor

Closes #18957

Adds a type to the align prop in OverflowMenu

Changelog

New

  • Added align property

Testing / Reviewing

Go to the Default storybook for OverflowMenu and the align property can be controlled via a dropdown with allowed prop values

@jose-biescas jose-biescas requested review from a team as code owners April 14, 2025 15:03
Copy link
Contributor

github-actions bot commented Apr 14, 2025

Thanks for your submission! We ask that you all sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


1 out of 2 committers have signed the DCO.
✅ (tay1orjones)[https://github.com/tay1orjones]
@jose-biescas
jose-biescas seems not to be a GitHub user. You need a GitHub account to be able to sign the DCO. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

@jose-biescas
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2731b08
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67fd23d5e677170008b2fdeb
😎 Deploy Preview https://deploy-preview-19131--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 Apr 14, 2025

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

Name Link
🔨 Latest commit 3c31b3f
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/680291ccb506390008a250c1
😎 Deploy Preview https://deploy-preview-19131--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 Apr 14, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 3c31b3f
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/680291cc7fb8a20008a8cb3b
😎 Deploy Preview https://deploy-preview-19131--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.

@jose-biescas jose-biescas force-pushed the bug-18957-overflow-align-type branch from 2731b08 to a9b073c Compare April 14, 2025 16:26
@jose-biescas
Copy link
Contributor Author

recheck

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.

A couple comments but otherwise looks good to me. Thanks for taking this on!


Having align alongside direction and flipped is probably going to lead to some confusion. Prop/type comments help though since they explicitly mention "tooltip". The new OverflowMenu implementation calls it tooltipAlignment to avoid this confusion.

This being the old implementation though I don't think it's necessary to try and get a new tooltipAlignment to work alongside the existing align that some might be using. Plus it would add another layer of complexity having to iron out the types for all that.

I just want to make note of this, there's no action for you to take here.

* chore(overflowmenu): added todo waiting on consolidation of carbon-design-system#19081

* chore(overflowmenu-storybook): updated storybook align options to latest list
@tay1orjones
Copy link
Member

@jose-biescas The first commit a9b073c was made with a user/config that doesn't match your github.com profile, so the DCO bot will continually fail on this one. We can override it for this PR though, just something to be aware of next time.

@jose-biescas
Copy link
Contributor Author

@tay1orjones Apologies for that, not sure what happened. Will make sure future commits are also verified/signed. Thank you!

Copy link

codecov bot commented Apr 18, 2025

Codecov Report

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

Project coverage is 84.36%. Comparing base (e073464) to head (3c31b3f).
Report is 6 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   #19131      +/-   ##
==========================================
- Coverage   84.37%   84.36%   -0.02%     
==========================================
  Files         388      388              
  Lines       14547    14550       +3     
  Branches     4774     4753      -21     
==========================================
+ Hits        12274    12275       +1     
- Misses       2113     2116       +3     
+ Partials      160      159       -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.

@tay1orjones tay1orjones added this pull request to the merge queue Apr 20, 2025
Merged via the queue into carbon-design-system:main with commit 2fcb9f0 Apr 20, 2025
36 of 37 checks passed
wkeese added a commit to wkeese/carbon that referenced this pull request May 23, 2025
PR carbon-design-system#19131 added align manually but I changed it to inherit
from IconButtonProps (rather than repeating the definition).
wkeese added a commit to wkeese/carbon that referenced this pull request May 23, 2025
PR carbon-design-system#19131 added align manually but I changed it to inherit
from IconButtonProps (rather than repeating the definition).
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.

[Bug]: The OverflowMenu align prop isn't typed
5 participants