Skip to content

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

Merged
tay1orjones merged 3 commits into
carbon-design-system:mainfrom
jose-biescas:bug-18957-overflow-align-type
Apr 20, 2025
Merged

fix(overflowmenu): added typing to align prop#19131
tay1orjones merged 3 commits into
carbon-design-system:mainfrom
jose-biescas:bug-18957-overflow-align-type

Conversation

@jose-biescas

Copy link
Copy Markdown
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 a review from a team as a code owner April 14, 2025 15:03
@jose-biescas jose-biescas requested review from a team, 2nikhiltom and alisonjoseph April 14, 2025 15:03
@github-actions

github-actions Bot commented Apr 14, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@netlify

netlify Bot commented Apr 14, 2025

Copy link
Copy Markdown

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.

@netlify

netlify Bot commented Apr 14, 2025

Copy link
Copy Markdown

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.

@netlify

netlify Bot commented Apr 14, 2025

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

recheck

Comment thread packages/react/src/components/OverflowMenu/OverflowMenu.tsx Outdated
Comment thread packages/react/src/components/OverflowMenu/OverflowMenu.tsx Outdated
Comment thread packages/react/src/components/OverflowMenu/OverflowMenu.tsx

@tay1orjones tay1orjones left a comment

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.

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.

Comment thread packages/react/src/components/OverflowMenu/OverflowMenu.tsx Outdated
Comment thread packages/react/src/components/OverflowMenu/OverflowMenu.stories.js
* 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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@codecov

codecov Bot commented Apr 18, 2025

Copy link
Copy Markdown

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
AlexanderMelox pushed a commit to AlexanderMelox/carbon that referenced this pull request Jun 10, 2025
…9131)

* fix(overflowmenu): added typing to align prop

* chore(overflowmenu): removed unnecessary types

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

* chore(overflowmenu-storybook): updated storybook align options to latest list

---------

Co-authored-by: jose-biescas <jose.biescas@ibm.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Jun 26, 2025
* fix(OverflowMenu): fix types

Fix OverflowMenuProps to include properties that get passed through
to IconButton, for example align, autoAlign, and tooltip.

Relatedly, fix TableToolbarMenuProps to extend OverflowMenuProps.
I also removed the aria-label as it's redundant with iconDescription.

* chore(OverflowMenu): align is inherited from IconButtonProps

PR #19131 added align manually but I changed it to inherit
from IconButtonProps (rather than repeating the definition).

---------

Co-authored-by: Riddhi Bansal <41935566+riddhybansal@users.noreply.github.com>
heloiselui pushed a commit to guidari/carbon that referenced this pull request Jul 11, 2025
…9131)

* fix(overflowmenu): added typing to align prop

* chore(overflowmenu): removed unnecessary types

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

* chore(overflowmenu-storybook): updated storybook align options to latest list

---------

Co-authored-by: jose-biescas <jose.biescas@ibm.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
heloiselui pushed a commit to guidari/carbon that referenced this pull request Jul 11, 2025
* fix(OverflowMenu): fix types

Fix OverflowMenuProps to include properties that get passed through
to IconButton, for example align, autoAlign, and tooltip.

Relatedly, fix TableToolbarMenuProps to extend OverflowMenuProps.
I also removed the aria-label as it's redundant with iconDescription.

* chore(OverflowMenu): align is inherited from IconButtonProps

PR carbon-design-system#19131 added align manually but I changed it to inherit
from IconButtonProps (rather than repeating the definition).

---------

Co-authored-by: Riddhi Bansal <41935566+riddhybansal@users.noreply.github.com>
AlexanderMelox pushed a commit to AlexanderMelox/carbon that referenced this pull request Apr 28, 2026
* fix(OverflowMenu): fix types

Fix OverflowMenuProps to include properties that get passed through
to IconButton, for example align, autoAlign, and tooltip.

Relatedly, fix TableToolbarMenuProps to extend OverflowMenuProps.
I also removed the aria-label as it's redundant with iconDescription.

* chore(OverflowMenu): align is inherited from IconButtonProps

PR carbon-design-system#19131 added align manually but I changed it to inherit
from IconButtonProps (rather than repeating the definition).

---------

Co-authored-by: Riddhi Bansal <41935566+riddhybansal@users.noreply.github.com>
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