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

[icons] Add social icons #17274

Merged
merged 4 commits into from
Sep 6, 2019
Merged

[icons] Add social icons #17274

merged 4 commits into from
Sep 6, 2019

Conversation

mbrookes
Copy link
Member

@mbrookes mbrookes commented Sep 1, 2019

@mbrookes mbrookes added the package: icons Specific to @mui/icons label Sep 1, 2019
@mui mui deleted a comment from mui-pr-bot Sep 2, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2019

These changes open the door to a broad topic: should we author our own icons? I think that it's the type of decisions we need to be careful with (type 1, hard to revert).

Cost. Fontawesome has 1648 icons for a given variant. material.io is 60% behind. I would trust Fontawesome for having prioritized the most important ones. That might be all that it's needed. https://materialdesignicons.com/ has more icons, I haven't count, maybe 2k? We document this alternative. Maybe we don't have to author anything. @leMaik has an interesting project leveraging these components.

Value. The situation seems significantly better since the last synonyms iteration, but I think that we should wait it has more data and see if we still can improve the list. For instance, we might realize that the brand icons aren't the most important ones to add: https://github.com/google/material-design-icons/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
I also think that we should comper the % of no results vs the number of page views of the page. This would give an idea of the developers frustration.

A few stats:

I would propose that we keep a close eye on the no results of the search icon page, before doing anything. cc @mui-org/core-contributors

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2019

A second thought, almost all of the popular icon sets available have brand icons, so even if they are not the most important icons we could add, they are probably still important.

There is one important aspect that I have overlooked, brand icons name and shapes are supposed to be invariant, it should be safe to add them, we should be able to keep them for a decade.

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2019

Disclamer, adding the brand icons wasn't the idea of Matt, this thread is the results of my self doubts and reflection, blame me, and only me.

@mbrookes
Copy link
Member Author

mbrookes commented Sep 3, 2019

I think that we should wait it has more data and see if we still can improve the list

The data came from the Material Design Icons top 5000 search result that @Templarian kindly shared on Twitter:

https://t.co/Glp3hiFv8v This is the top 5000 search results for the last year. That might actually be helpful. We track search -> icon click. Early on we used this to figure out icons to make, but not as helpful after 4k.

— Austin Andrews (@Templarian) August 21, 2019

Here's the breakdown:

Query Rank Searches Percent
facebook 32 24,365 0.50%
twitter 79 12,773 0.26%
instagram 86 11,823 0.24%
youtube 137 7,534 0.15%
linkedin 141 7,170 0.15%
apple 213 4,363 0.09%
whatsapp 191 4,972 0.10%
telegram 385 2,124 0.04%
pinterest 574 1,220 0.02%
reddit 831 740 0.02%
snapchat 1566 285 0.01%
       
google 65 14,919 0.30%
android 261 3,503 0.07%
iphone 444 1,774 0.04%

I've aggregated stubs that are strongly associated with the full name, but not those that could be associated with other icons, or are full words in their own right (tele, pin, link etc.).

For comparison are google, android and iphone that there are already icons for in the Material Icons set.

One thing in favour of adding social icons is that for other UI elements, there is usually a reasonable substitute to be found. But brands are brands, so for a user hoping to use a single source for icons, and needing social icons, these will help. Of course they could always use the paths taken from MDI along with the SvgIcon component.

I don't think that this should automatically open the door to adding a multitude of additional icons.

@oliviertassinari
Copy link
Member

@mbrookes Thanks for the stats, very valuable! Ok, I think that we should add them for convenience and because it's pretty safe :).

I don't think that this should automatically open the door to adding a multitude of additional icons.

Agree

@Templarian
Copy link

You may find this useful also. We came to a decision roughly a year ago to do a large brand deprecation as part of v5. The roadmap doc below outlines that process.

https://dev.materialdesignicons.com/roadmap/brand-icons

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2019

@mbrookes yarn src:icons starts by removing all the files in the folder the new brand icons have been added. I'm updating a bit the pull request to account for this constraint. Also, the barrel index needs to be updated.

@mui-pr-bot
Copy link

mui-pr-bot commented Sep 3, 2019

No bundle size changes comparing 833738d...bc7dbfb

Generated by 🚫 dangerJS against bc7dbfb

@mbrookes
Copy link
Member Author

mbrookes commented Sep 3, 2019

yarn src:icons starts by removing all the files in the folder

I had assumed that this was fixed in #17259, since that retains the icons removed by Google in the latest release. If not, then we need to accommodate those too.

@oliviertassinari oliviertassinari merged commit 0792fbe into mui:master Sep 6, 2019
@mbrookes mbrookes deleted the icons-social branch September 6, 2019 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: icons Specific to @mui/icons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants