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

Deletion policy for icon names? #5665

Closed
mattpr opened this issue Nov 26, 2020 · 2 comments
Closed

Deletion policy for icon names? #5665

mattpr opened this issue Nov 26, 2020 · 2 comments
Labels
Question Question from a user.

Comments

@mattpr
Copy link

mattpr commented Nov 26, 2020

Hey,

We discovered today that we were missing icon links on a site.
Traced the problem to an upgrade of MDI lib without going through and updating all our markup.
In particular linkedin-box and xing-box were gone.

I see this here:
https://dev.materialdesignicons.com/upgrade#4.9.95-to-5.0.45

And I suppose we should be locking to minor versions and reading the release notes for every package before upgrading. I see this is happening even on minor version changes (but hopefully not on a patch level):

https://dev.materialdesignicons.com/upgrade#5.1.45-to-5.2.45

What I am wondering...

I understand there is a need to replace, update or remove some icons over time, especially brand icons that may be changing.

However it would be quite nice if the old icon names (e.g. linkedin-box and xing-box) were kept (perhaps in a separate "backwards-compat" file or package) and just pointed at the new "best alternative" icon.

Yes it means that people that upgrade without checking release notes might be surprised to see the icon change on their site. However it will avoid that icons/links just quietly disappear from the site after updating the MDI lib...which is less likely to be noticed right away and is more of a breaking change.

Maybe this already exists and I just need to be installing mdi-backwards-compat or something in order to not have icons disappearing?

For some sites, going through all the markup to update all icon references could be quite a chore.
The reason we did the update was because there were new icons we wanted to use.
We didn't realize the upgrade would break old icons.
Yes we should lock versions and always read release notes before updating a package.

Now we are grepping through the html/templates and re-checking every single mdi-ICONNAME to see if ICONNAME still exists or not because we have no confidence there are other "silent failures" (missing icons/links we haven't noticed yet).

Anyway, maybe there is already a solution for this issue...otherwise perhaps something to consider (a separate compat package would allow people that don't want these extra styles to just ignore them).

Thanks!

@mattpr mattpr added the Question Question from a user. label Nov 26, 2020
@mririgoyen
Copy link
Collaborator

mririgoyen commented Nov 26, 2020

As with every released package out there, the solution is to check the changelog before updating. This is especially true on a major version change, which typically indicates breaking changes.

We also create long-running, pinned breaking changes issues for every major version. For example, here's the one for the 5.0 release: #4901

And here's the one for the upcoming 6.0 release: #5409

Additionally, we are actively removing brand icons for two reasons:

  • There is too much risk in maintaining someone else's brand
  • Brand icons are not Material.

We recommend using Simple Icons for brand icons, as that is all they do. There library is compatible with our tooling (e.g. @mdi/react).

And lastly, we will not be providing backwards compatibility layers. If you need new icons, but need to maintain old icons, you'll need to engineer a solution for those scenarios. Sorry!

One more thing... your statement about "Now we are grepping through the html/templates and re-checking every single mdi-ICONNAME" leads me to believe you're still using the webfont. Please consider migrating off of the webfont in the future. Every time we release, the font grows in size and you're putting that burden on your end-users, having them download hundreds, if not thousands, of icons they probably aren't even using.

@mattpr
Copy link
Author

mattpr commented Feb 22, 2021

Thanks for taking the time to write a detailed answer with educational and constructive advise. Much appreciated.

You make a very good point about the webfont. This was a much older project that could probably use some more updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Question from a user.
Projects
None yet
Development

No branches or pull requests

2 participants