Open oliviertassinari opened 2 years ago
Alternatively (or additionally) to what you're proposing, we can move the icons package to a separate repository. The icons don't change often and it doesn't make sense to include them in every build.
Better more icons then less, sometimes you just pick one which has similar to needed shape and don't care what does it actually mean. Anyway tree shaking will cut not used icons from your app.
It would depend on the problem that we want to fix. For instance, some people scan all the icons in the search of one that might fit their use case when the search yields no results (I have done this countless times). Removing icons that are never used would remove noise and improve the DX.
IMHO, we don't yet have a clear pain to solve to push this issue forward. I have used the "on hold" label to signal that. So far, it's simply a solution proposal, for an unknown problem. The potential problems that come to mind:
Developers facing:
Maintainers facing:
Duplicates
Latest version
Summary 💡
The
@mui/icons-material
package has significantly grown in size in the last few months. Google is adding more icons. in v4, we had around 1.1k icons https://v4.mui.com/components/material-icons/, in v5 we are already at 1.9k icons. They are many that seem useless: less is more and distracting for developers.Also, more icons put stress on the infrastructure. #12432 is one example, but it also challenges the Netlify build and more. I wonder if it would make sense to remove icons that are low in popularity.
Examples 🌈
Who needs this icon? https://fonts.google.com/icons?selected=Material+Icons+Outlined:assignment_returned&icon.query=currency+franc
"nobody"
Motivation 🔦
https://github.com/mui-org/material-ui/pull/29328#issuecomment-968165315