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

Update icons and remove obsolete API #8421

Merged
merged 3 commits into from
Mar 30, 2024
Merged

Conversation

danielchalmers
Copy link
Contributor

Description

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@danielchalmers
Copy link
Contributor Author

@henon script did not seem to include EditDocument

#7479 (comment)

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.29%. Comparing base (a047ed3) to head (8d86312).
Report is 50 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8421      +/-   ##
==========================================
+ Coverage   88.88%   89.29%   +0.40%     
==========================================
  Files         414      411       -3     
  Lines       12294    11900     -394     
  Branches     2455     2356      -99     
==========================================
- Hits        10928    10626     -302     
+ Misses        836      751      -85     
+ Partials      530      523       -7     

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

@henon
Copy link
Collaborator

henon commented Mar 23, 2024

Interesting, I wouldn't have expected that so many icons changed. Did you do some random control samples if the changed icons look OK?

@ScarletKuro
Copy link
Member

I think the problem is that when you open the official https://fonts.google.com/icons website, select "Material Icons" (old ones) and select "Filled" you will see a request going here https://fonts.googleapis.com/css2?family=Material+Icons&v=1711197937047
and then it fetches https://fonts.gstatic.com/s/materialicons/v141/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
So it seems now the old material icons is a font too and they do not provide the metadata for new icons here https://fonts.google.com/metadata/icons so it seems it's not really possible to fetch them now automatically?

Interesting, I wouldn't have expected that so many icons changed. Did you do some random control samples if the changed icons look OK?

This is normal, google was always fixing the existing icons, and considering that it was run last time on 2022/12/28 by me... I'm not surprised.

@ScarletKuro
Copy link
Member

ScarletKuro commented Mar 23, 2024

Tho what's weird that I do see the "edit_document" here https://github.com/google/material-design-icons/tree/master/symbols/web
and it's svg. Maybe they just do not update the metadata anymore, it's hard to say, would be easier to ask google in the https://github.com/google/material-design-icons/issues

@ScarletKuro
Copy link
Member

I found this: https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true
but the JSON looks corrupted, look at the start )]}' i do see the "edit_document", but this json also includes Material Symbols Outlined, Material Symbols Rounded, Material Symbols Sharp that we do not really need.

@ScarletKuro
Copy link
Member

but the JSON looks corrupted, look at the start )]}'

Nvm about this, the original one https://fonts.google.com/metadata/icons has the same thing

@ScarletKuro
Copy link
Member

ScarletKuro commented Mar 23, 2024

It doesn't seems like we can just replace the url with the new one.
for example in old one the 10k icon says that all families are supported, but in new one it says the 10k doesn't support outlined, round, sharp, two tone and our script will try to fetch the sharp one /s/i/materialiconssharp/10k/v256/24px.svg which will lead to exception.
It doesn't exist for v256, but exist for v10: http://fonts.gstatic.com/s/i/materialiconssharp/10k/v10/24px.svg
The script would need to look the "unsupported_families".

@danielchalmers
Copy link
Contributor Author

Is this relevant?

Remove the backwards compatibility forwarding structures for our Icons

https://github.com/MudBlazor/MudBlazor/projects/13#card-82213304

@ScarletKuro
Copy link
Member

Is this relevant?

Remove the backwards compatibility forwarding structures for our Icons

https://github.com/MudBlazor/MudBlazor/projects/13#card-82213304

Yes, we need to remove all icons from obsolete folder https://github.com/MudBlazor/MudBlazor/tree/dev/src/MudBlazor/Icons/Obsolete
And update the script to not generate that folder

@danielchalmers
Copy link
Contributor Author

Yes, we need to remove all icons from obsolete folder https://github.com/MudBlazor/MudBlazor/tree/dev/src/MudBlazor/Icons/Obsolete And update the script to not generate that folder

@ScarletKuro

Do you want me to do that in this PR? Did you figure out how to get the new icons?

@ScarletKuro
Copy link
Member

Do you want me to do that in this PR?

You can do the removal PR, i don't mind, just don't forget to update the powershell script so it wouldn't generate them back.

Did you figure out how to get the new icons?

I said here #8421 (comment), but that would require to improve the script, currently there are more important things to do than just add few missing icons

@danielchalmers
Copy link
Contributor Author

@ScarletKuro obsolete icons are gone

@danielchalmers danielchalmers changed the title Update icons Update icons & Remove obsolete ones Mar 29, 2024
@ScarletKuro
Copy link
Member

LGTM

@ScarletKuro ScarletKuro requested a review from henon March 30, 2024 00:31
@henon henon added enhancement New feature or request breaking change v7 New major MudBlazor version and removed PR: needs review labels Mar 30, 2024
@henon henon mentioned this pull request Mar 30, 2024
@henon henon changed the title Update icons & Remove obsolete ones Update icons & Remove obsolete API Mar 30, 2024
@henon henon changed the title Update icons & Remove obsolete API Update icons and remove obsolete API Mar 30, 2024
@henon henon merged commit f1391d8 into MudBlazor:dev Mar 30, 2024
3 of 4 checks passed
@henon
Copy link
Collaborator

henon commented Mar 30, 2024

v7.0.0 Migration Guide #8447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change enhancement New feature or request v7 New major MudBlazor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants