Skip to content

Conversation

@krava11i
Copy link

@krava11i krava11i commented Nov 25, 2025

Previously when no icons or only select icons are used the item name was diplayed with the 1rem icon width. This fix enables the correct use of context-menu-items with and without icons.

Screenshot From 2025-11-25 11-40-25 Screenshot From 2025-11-25 11-40-49

Changelog

New

Changed

  • context-menu-item styles

Removed

@krava11i krava11i requested a review from a team as a code owner November 25, 2025 10:17
@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for carbon-components-angular ready!

Name Link
🔨 Latest commit f36757a
🔍 Latest deploy log https://app.netlify.com/projects/carbon-components-angular/deploys/692d78dc6e466f00096d1d4f
😎 Deploy Preview https://deploy-preview-3201--carbon-components-angular.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 project configuration.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

DCO Assistant Lite bot All contributors have signed the DCO.

@krava11i
Copy link
Author

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

@krava11i krava11i force-pushed the fix/context-menu-item-content branch from 1747677 to befcbef Compare November 25, 2025 10:30
@krava11i
Copy link
Author

recheck

@krava11i
Copy link
Author

Oh, I saw this doesn't fix the problem and there allready is todo written in the code for this. I try to find another valid solution.

@krava11i krava11i marked this pull request as draft November 27, 2025 15:43
when no icons or only select icons are used the item name was diplayed with 1rem icon width
@krava11i krava11i force-pushed the fix/context-menu-item-content branch from befcbef to f36757a Compare December 1, 2025 11:15
@krava11i
Copy link
Author

krava11i commented Dec 1, 2025

I fixed the css selector to decide whether the icon class should be set or not. While doing this fix I stumbled upon a todo which said the class setting should listen for the onpush change detection. I implemented a solution for that but reverted it afterwards. From a usability point of view the spacing in the context-menu-item should be set on init so the content doesn't jump when selected or deselected. So I think this fix does the job. Now on init when an icon or type checkbox / radio is set all items are getting displayed with the icon space on the left and otherwise without it.

@krava11i krava11i marked this pull request as ready for review December 1, 2025 11:25
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.

1 participant