Skip to content

Conversation

adiitxa
Copy link
Contributor

@adiitxa adiitxa commented Jul 25, 2025

Summary

This PR replaces the hardcoded minWidth: 56px in ListItemIcon with theme.spacing(4.5) (36px), aligning spacing with other components like MenuItem. This ensures consistent theming and avoids layout inconsistencies.

This issue is visible in the MUI here:
👉 https://mui.com/material-ui/react-list/#nested-list
(Nested ListItemIcon shows inconsistent spacing due to hardcoded minWidth)

Fixes

Closes #46596
Ensures icon spacing is responsive and theme-consistent.

Testing

  • Verified visually in local Storybook and MUI docs (List, Menu)
  • Confirmed spacing updates across RTL and default themes

Screenshots

🔴 Before

bug

✅ After

Fixed

Checklist

  • Follows MUI theme conventions
  • No hardcoded styles
  • Visual regression verified
  • Added screenshot proof

@mui-bot
Copy link

mui-bot commented Jul 25, 2025

Netlify deploy preview

https://deploy-preview-46597--material-ui.netlify.app/

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 🔺+12B(0.00%) 🔺+7B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against c91f6e4

@adiitxa
Copy link
Contributor Author

adiitxa commented Jul 25, 2025

Hi! This PR fixes #46596
Could a maintainer please add the appropriate test label (test:skip or test:done) to pass the required check? This fix is purely visual
could you please add a test label here? 🙏

Thanks!

@zannager zannager added scope: list Changes related to the list test labels Jul 26, 2025
@zannager zannager requested a review from siriwatknp July 26, 2025 06:47
@adiitxa adiitxa changed the title fix(ListItemIcon): replaced hardcoded minWidth with theme.spacing fix(ListItemIcon): use theme.spacing instead of hardcoded minWidth Jul 27, 2025
@adiitxa
Copy link
Contributor Author

adiitxa commented Jul 27, 2025

Hi @ZeeshanTamboli
PR aligns ListItemIcon spacing with theme.spacing(4.5). Verified with screenshots.

review when you get a chance. Thanks! 🙏

@siriwatknp siriwatknp added on hold There is a blocker, we need to wait. breaking change Introduces changes that are not backward compatible. labels Jul 28, 2025
@siriwatknp
Copy link
Member

Thanks for submitting the PR. It's definitely better to me but it's a breaking change so I don't think this can be slot in v7. I'll keep this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Introduces changes that are not backward compatible. on hold There is a blocker, we need to wait. scope: list Changes related to the list test v8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hardcoded width in ListItemIcon
4 participants