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(Menu): fix extra gap issue when the menu doesnt contain any item with icon #18718

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

amal-k-joy
Copy link
Contributor

Contributes #18338

We have cds menu as parent and menu items as children inside a slot. We need to apply a particular style when none of the items has rendered with an icon. If any of the items is rendered with icon, we need to reserve a blank space for all menu items in that parent menu, otherwise not. Styling from parent does not work as in react.

Here I am dispatching an event from menu item when there is an icon and listened by parent menu and class is added to the parent menu accordingly.
The child items style is then handled using css variables.

Testing / Reviewing

Local storybook

@amal-k-joy amal-k-joy requested review from a team as code owners February 27, 2025 10:22
@amal-k-joy amal-k-joy requested a review from kennylam February 27, 2025 10:22
Copy link

netlify bot commented Feb 27, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit fc06407
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67c03cff2610fc000808df4a
😎 Deploy Preview https://deploy-preview-18718--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 27, 2025

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

Name Link
🔨 Latest commit fc06407
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67c03cff5967f400083ef612
😎 Deploy Preview https://deploy-preview-18718--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 27, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fc06407
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67c03cfff37d07000819fb66
😎 Deploy Preview https://deploy-preview-18718--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 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.34%. Comparing base (b67877b) to head (fc06407).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18718      +/-   ##
==========================================
- Coverage   84.97%   84.34%   -0.64%     
==========================================
  Files         408      408              
  Lines       14542    14645     +103     
  Branches     4764     4791      +27     
==========================================
- Hits        12357    12352       -5     
- Misses       2024     2131     +107     
- Partials      161      162       +1     

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

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.

2 participants