Fluentui: Fabric Core Icons are being rendered instead of Fluent UI Icons

Created on 3 Jul 2020  路  16Comments  路  Source: microsoft/fluentui

Environment Information

  • Package version(s):
{
    "dependencies": {
        "@fluentui/react": "^7.114.0",
        "@uifabric/file-type-icons": "^7.3.13",
        "@uifabric/react-cards": "^0.109.81",
    }
}

Please provide a reproduction of the bug in a codepen:

https://codepen.io/GuiCavi/pen/ExPozOo?editors=0010

Actual behavior:

Looks like some *Logo icons are being rendered as Fabric Core Icons instead of Fluent UI React. (haven't loaded the Fabric Core stylesheet)

<Icon
    iconName="OneNoteLogo"
    className={classNames.cardIcon}
    style={{ color: theme.palette.themePrimary }}
/>

actual behavior (custom example)

Expected behavior:

If not loaded the Fabric Core stylesheet, should render the Fabric UI React Icons

<Icon
    iconName="OneNoteLogo"
/>

expected behavior (print from available icons in doc)

Priorities and help requested:

Are you willing to submit a PR to fix? No, I don't know the where is the problem

Requested priority: Normal?

Products/sites affected: Fluent UI React

Documentation Icons

All 16 comments

BTW, just found something weird.

I went into DocumentCard docs and the first image was loaded.

image


After, navigate to Icon docs and clicked on this link: For a list of icons, visit our icon documentation.

Navigate back to Icon docs (by history.back, not redirecting), and to DocumentCard docs. This way, I got the second image.

image


Here a gif to help
ezgif com-video-to-gif

@GuiCavi - Can you file a separate issue for the website issue you found? That would be helpful for making traction on both issues.

@dzearing / @JustSlone - We don't have icon owner - so I'm bring this to your attention

@paulgildea sure. I thought they were related... I'll fill another then. Thanks for the reply

I have the same icon issues, too.
These are the icons I got
image
But I was expecting this type of MS brand icons
image

My package.json

        "@fluentui/react": "7.105.10",
        "@fluentui/styles": "0.47.0",

React code example (same as @GuiCavi )

<Icon
    iconName="OneNoteLogo"
/>

Putting this back for investigation.

@GuiCavi - Currently brand icons are not supported by rendering using Icon component.

There are 2 ways you can use brand icon in your app:
you can do

<link
  rel="stylesheet"
  href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css"
/>

<div class="ms-BrandIcon--icon96 ms-BrandIcon--word" />

or

<img src="https://static2.sharepointonline.com/files/fabric/assets/brand-icons/product/svg/word_48x1.svg" alt="Word product icon" />

Thanks for the dispatch, @paulgildea and the investigation, @xugao .
I will move my code to use the CDN image path.

By the wan, the documentation of the fluent UI really need some update in the brand icon section.

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!

Thanks for the investigation @xugao and @paulgildea

Oh okay, got it for the brand icons. The fact is that i wasn't trying to use brand icons. As you can see in the image below, there is an "brand icon" for OneNote in Fluent UI Core icons.

image

And if you check the Fabric Core icons, as below, there is a different one..

image

The problem is not the difference between them, is why when using Fabric UI Core I get Fabric Core icons.

I believe that was not exactly @Vivihung problem, since she needed to render brand icons.

@Vivihung, agreed on the brand Icon page needing an update! I'll spin up a quick fix to the example on the page based on @xugao's suggested fix here.

@GuiCavi, actually (and it took me an embarrassingly long time to realize this) I'm pretty sure these are the monochrome version of the new Office icons! (https://news.microsoft.com/europe/2018/11/29/say-hello-to-microsofts-new-office-icons/)

There is clearly a bug in the website showing the old icons, but https://uifabricicons.azurewebsites.net/ and Fluent UI React seem correct here.

@JustSlone thanks for the reply.

Got it. So, just for resuming the issue: The icons that Fluent UI React is showing when we use it are the right ones and the icon doc is the one that needs some kind of fix, right? 馃槃

@GuiCavi that is my understanding. I'll check with some folks tomorrow to confirm.

@JustSlone so, it kills my question. Feel free to leave this issue as open till the fix is done or you can close it. Thanks for the attention to all of the team! 馃槃

@GuiCavi thank you for the report! Can you open the separate issue for the website showing the old (or just inconsistent) monochrome brand icons? Then I can close this one out.

I've confirmed these are in-fact the monochrome versions of the new icons, closing this issue. Thanks!

Can you open the separate issue for the website showing the old (or just inconsistent) monochrome brand icons?

@JustSlone, still needed to open another issue as you asked? Or you guys already aware of it? I can do it without problem.

Was this page helpful?
0 / 5 - 0 ratings